mirror of
https://github.com/tribufu/tribufu-java
synced 2026-05-06 06:47:27 +00:00
Release v1.3.0
This commit is contained in:
parent
46eec14060
commit
05878c3e24
73 changed files with 10656 additions and 4822 deletions
|
|
@ -22,37 +22,44 @@ src/main/java/com/tribufu/generated/models/Account.java
|
|||
src/main/java/com/tribufu/generated/models/Application.java
|
||||
src/main/java/com/tribufu/generated/models/ApplicationType.java
|
||||
src/main/java/com/tribufu/generated/models/AuthorizeRequest.java
|
||||
src/main/java/com/tribufu/generated/models/Client.java
|
||||
src/main/java/com/tribufu/generated/models/ClientInfo.java
|
||||
src/main/java/com/tribufu/generated/models/ClientType.java
|
||||
src/main/java/com/tribufu/generated/models/CodeChallengeMethod.java
|
||||
src/main/java/com/tribufu/generated/models/CodeResponse.java
|
||||
src/main/java/com/tribufu/generated/models/CreateUser.java
|
||||
src/main/java/com/tribufu/generated/models/CryptoViewModel.java
|
||||
src/main/java/com/tribufu/generated/models/Game.java
|
||||
src/main/java/com/tribufu/generated/models/GameServer.java
|
||||
src/main/java/com/tribufu/generated/models/GameServerCluster.java
|
||||
src/main/java/com/tribufu/generated/models/GameServerQuery.java
|
||||
src/main/java/com/tribufu/generated/models/GameServerStatus.java
|
||||
src/main/java/com/tribufu/generated/models/GrantType.java
|
||||
src/main/java/com/tribufu/generated/models/Group.java
|
||||
src/main/java/com/tribufu/generated/models/GroupGame.java
|
||||
src/main/java/com/tribufu/generated/models/GroupApplication.java
|
||||
src/main/java/com/tribufu/generated/models/GroupMember.java
|
||||
src/main/java/com/tribufu/generated/models/GroupRank.java
|
||||
src/main/java/com/tribufu/generated/models/HashViewModel.java
|
||||
src/main/java/com/tribufu/generated/models/IntrospectRequest.java
|
||||
src/main/java/com/tribufu/generated/models/IntrospectResponse.java
|
||||
src/main/java/com/tribufu/generated/models/IpAddress.java
|
||||
src/main/java/com/tribufu/generated/models/LeaderboardItem.java
|
||||
src/main/java/com/tribufu/generated/models/LeaderboardOrder.java
|
||||
src/main/java/com/tribufu/generated/models/LoginProvider.java
|
||||
src/main/java/com/tribufu/generated/models/LoginRequest.java
|
||||
src/main/java/com/tribufu/generated/models/LoginResponse.java
|
||||
src/main/java/com/tribufu/generated/models/ModelPackage.java
|
||||
src/main/java/com/tribufu/generated/models/PackageRelease.java
|
||||
src/main/java/com/tribufu/generated/models/Product.java
|
||||
src/main/java/com/tribufu/generated/models/ProductPrice.java
|
||||
src/main/java/com/tribufu/generated/models/ProductType.java
|
||||
src/main/java/com/tribufu/generated/models/Profile.java
|
||||
src/main/java/com/tribufu/generated/models/ProfileGame.java
|
||||
src/main/java/com/tribufu/generated/models/ProfileGroup.java
|
||||
src/main/java/com/tribufu/generated/models/RefreshRequest.java
|
||||
src/main/java/com/tribufu/generated/models/RegisterRequest.java
|
||||
src/main/java/com/tribufu/generated/models/ResponseType.java
|
||||
src/main/java/com/tribufu/generated/models/RevokeRequest.java
|
||||
src/main/java/com/tribufu/generated/models/SearchRequest.java
|
||||
src/main/java/com/tribufu/generated/models/Search.java
|
||||
src/main/java/com/tribufu/generated/models/SearchType.java
|
||||
src/main/java/com/tribufu/generated/models/ServerMetrics.java
|
||||
src/main/java/com/tribufu/generated/models/ServerStatus.java
|
||||
src/main/java/com/tribufu/generated/models/Subscription.java
|
||||
src/main/java/com/tribufu/generated/models/StorageFile.java
|
||||
src/main/java/com/tribufu/generated/models/TokenHintType.java
|
||||
src/main/java/com/tribufu/generated/models/TokenRequest.java
|
||||
src/main/java/com/tribufu/generated/models/TokenResponse.java
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ apply plugin: "java"
|
|||
apply plugin: "com.diffplug.spotless"
|
||||
|
||||
group = "com.tribufu"
|
||||
version = "1.1.0"
|
||||
version = "1.3.0"
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
|
|
|
|||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<manifest package="com.tribufu" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<manifest package="com.tribufu.generated" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application />
|
||||
</manifest>
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -141,7 +141,7 @@ public class ApiClient {
|
|||
json = new JSON();
|
||||
|
||||
// Set default User-Agent.
|
||||
setUserAgent("OpenAPI-Generator/1.1.0/java");
|
||||
setUserAgent("OpenAPI-Generator/1.3.0/java");
|
||||
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -21,7 +21,7 @@ import java.util.List;
|
|||
* <p>ApiException class.</p>
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
@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 ApiException extends Exception {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -13,9 +13,9 @@
|
|||
|
||||
package com.tribufu.generated;
|
||||
|
||||
@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 Configuration {
|
||||
public static final String VERSION = "1.1.0";
|
||||
public static final String VERSION = "1.3.0";
|
||||
|
||||
private static volatile ApiClient defaultApiClient = new ApiClient();
|
||||
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -96,29 +96,34 @@ public class JSON {
|
|||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.Account.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.Application.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.AuthorizeRequest.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.Client.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.ClientInfo.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.CodeResponse.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.CreateUser.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.CryptoViewModel.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.Game.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.GameServer.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.GameServerCluster.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.GameServerQuery.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.Group.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.GroupGame.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.GroupApplication.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.GroupMember.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.HashViewModel.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.IntrospectRequest.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.IntrospectResponse.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.IpAddress.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.LeaderboardItem.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.LoginRequest.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.LoginResponse.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.ModelPackage.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.PackageRelease.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.Product.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.ProductPrice.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.Profile.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.ProfileGame.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.ProfileGroup.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.RefreshRequest.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.RegisterRequest.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.RevokeRequest.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.SearchRequest.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.Search.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.ServerMetrics.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.Subscription.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.StorageFile.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.TokenRequest.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.TokenResponse.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new com.tribufu.generated.models.UpdateProfile.CustomTypeAdapterFactory());
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
package com.tribufu.generated;
|
||||
|
||||
@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 Pair {
|
||||
private String name = "";
|
||||
private String value = "";
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -18,7 +18,7 @@ import java.util.Map;
|
|||
/**
|
||||
* Representing a Server configuration.
|
||||
*/
|
||||
@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 ServerConfiguration {
|
||||
public String URL;
|
||||
public String description;
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -18,7 +18,7 @@ import java.util.HashSet;
|
|||
/**
|
||||
* Representing a Server Variable for server URL template substitution.
|
||||
*/
|
||||
@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 ServerVariable {
|
||||
public String description;
|
||||
public String defaultValue;
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -16,7 +16,7 @@ package com.tribufu.generated;
|
|||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
@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 StringUtil {
|
||||
/**
|
||||
* Check if the given array contains the given value (with case-insensitive comparison).
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -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).
|
||||
|
|
@ -20,7 +20,7 @@ import java.net.URI;
|
|||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@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 ApiKeyAuth implements Authentication {
|
||||
private final String location;
|
||||
private final String paramName;
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -22,7 +22,7 @@ import java.util.Map;
|
|||
import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@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 HttpBearerAuth implements Authentication {
|
||||
private final String scheme;
|
||||
private Supplier<String> tokenSupplier;
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -21,7 +21,7 @@ import java.util.Map;
|
|||
/**
|
||||
* Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
|
||||
*/
|
||||
@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 abstract class AbstractOpenApiSchema {
|
||||
|
||||
// store the actual instance of the schema/object
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -51,7 +51,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* Account
|
||||
*/
|
||||
@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 Account {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
|
|
@ -65,7 +65,7 @@ public class Account {
|
|||
|
||||
public static final String SERIALIZED_NAME_PROVIDER = "provider";
|
||||
@SerializedName(SERIALIZED_NAME_PROVIDER)
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
private LoginProvider provider;
|
||||
|
||||
public static final String SERIALIZED_NAME_USER_ID = "user_id";
|
||||
|
|
@ -134,7 +134,7 @@ public class Account {
|
|||
}
|
||||
|
||||
|
||||
public Account provider(@javax.annotation.Nullable LoginProvider provider) {
|
||||
public Account provider(@javax.annotation.Nonnull LoginProvider provider) {
|
||||
this.provider = provider;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -143,12 +143,12 @@ public class Account {
|
|||
* Get provider
|
||||
* @return provider
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
public LoginProvider getProvider() {
|
||||
return provider;
|
||||
}
|
||||
|
||||
public void setProvider(@javax.annotation.Nullable LoginProvider provider) {
|
||||
public void setProvider(@javax.annotation.Nonnull LoginProvider provider) {
|
||||
this.provider = provider;
|
||||
}
|
||||
|
||||
|
|
@ -329,6 +329,8 @@ public class Account {
|
|||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("id");
|
||||
openapiRequiredFields.add("provider");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -351,6 +353,13 @@ public class Account {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Account` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : Account.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()));
|
||||
|
|
@ -358,10 +367,8 @@ public class Account {
|
|||
if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
|
||||
}
|
||||
// validate the optional field `provider`
|
||||
if (jsonObj.get("provider") != null && !jsonObj.get("provider").isJsonNull()) {
|
||||
// validate the required field `provider`
|
||||
LoginProvider.validateJsonElement(jsonObj.get("provider"));
|
||||
}
|
||||
if ((jsonObj.get("user_id") != null && !jsonObj.get("user_id").isJsonNull()) && !jsonObj.get("user_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -52,7 +52,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* Application
|
||||
*/
|
||||
@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 Application {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
|
|
@ -99,51 +99,11 @@ public class Application {
|
|||
@javax.annotation.Nullable
|
||||
private URI libraryImageUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_PARENT_ID = "parent_id";
|
||||
@SerializedName(SERIALIZED_NAME_PARENT_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String parentId;
|
||||
|
||||
public static final String SERIALIZED_NAME_SLUG = "slug";
|
||||
@SerializedName(SERIALIZED_NAME_SLUG)
|
||||
@javax.annotation.Nullable
|
||||
private String slug;
|
||||
|
||||
public static final String SERIALIZED_NAME_VISIBILITY = "visibility";
|
||||
@SerializedName(SERIALIZED_NAME_VISIBILITY)
|
||||
@javax.annotation.Nullable
|
||||
private Integer visibility;
|
||||
|
||||
public static final String SERIALIZED_NAME_PASSWORD = "password";
|
||||
@SerializedName(SERIALIZED_NAME_PASSWORD)
|
||||
@javax.annotation.Nullable
|
||||
private String password;
|
||||
|
||||
public static final String SERIALIZED_NAME_PRIMARY = "primary";
|
||||
@SerializedName(SERIALIZED_NAME_PRIMARY)
|
||||
@javax.annotation.Nullable
|
||||
private Integer primary;
|
||||
|
||||
public static final String SERIALIZED_NAME_USER_COUNT = "user_count";
|
||||
@SerializedName(SERIALIZED_NAME_USER_COUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer userCount;
|
||||
|
||||
public static final String SERIALIZED_NAME_ACHIEVEMENT_COUNT = "achievement_count";
|
||||
@SerializedName(SERIALIZED_NAME_ACHIEVEMENT_COUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer achievementCount;
|
||||
|
||||
public static final String SERIALIZED_NAME_BADGE_COUNT = "badge_count";
|
||||
@SerializedName(SERIALIZED_NAME_BADGE_COUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer badgeCount;
|
||||
|
||||
public static final String SERIALIZED_NAME_DOWNLOAD_COUNT = "download_count";
|
||||
@SerializedName(SERIALIZED_NAME_DOWNLOAD_COUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer downloadCount;
|
||||
|
||||
public static final String SERIALIZED_NAME_CREATED = "created";
|
||||
@SerializedName(SERIALIZED_NAME_CREATED)
|
||||
@javax.annotation.Nullable
|
||||
|
|
@ -328,25 +288,6 @@ public class Application {
|
|||
}
|
||||
|
||||
|
||||
public Application parentId(@javax.annotation.Nullable String parentId) {
|
||||
this.parentId = parentId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get parentId
|
||||
* @return parentId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(@javax.annotation.Nullable String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
|
||||
public Application slug(@javax.annotation.Nullable String slug) {
|
||||
this.slug = slug;
|
||||
return this;
|
||||
|
|
@ -366,139 +307,6 @@ public class Application {
|
|||
}
|
||||
|
||||
|
||||
public Application visibility(@javax.annotation.Nullable Integer visibility) {
|
||||
this.visibility = visibility;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get visibility
|
||||
* @return visibility
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getVisibility() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
public void setVisibility(@javax.annotation.Nullable Integer visibility) {
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
|
||||
public Application password(@javax.annotation.Nullable String password) {
|
||||
this.password = password;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get password
|
||||
* @return password
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(@javax.annotation.Nullable String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
|
||||
public Application primary(@javax.annotation.Nullable Integer primary) {
|
||||
this.primary = primary;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get primary
|
||||
* @return primary
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getPrimary() {
|
||||
return primary;
|
||||
}
|
||||
|
||||
public void setPrimary(@javax.annotation.Nullable Integer primary) {
|
||||
this.primary = primary;
|
||||
}
|
||||
|
||||
|
||||
public Application userCount(@javax.annotation.Nullable Integer userCount) {
|
||||
this.userCount = userCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get userCount
|
||||
* @return userCount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getUserCount() {
|
||||
return userCount;
|
||||
}
|
||||
|
||||
public void setUserCount(@javax.annotation.Nullable Integer userCount) {
|
||||
this.userCount = userCount;
|
||||
}
|
||||
|
||||
|
||||
public Application achievementCount(@javax.annotation.Nullable Integer achievementCount) {
|
||||
this.achievementCount = achievementCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get achievementCount
|
||||
* @return achievementCount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getAchievementCount() {
|
||||
return achievementCount;
|
||||
}
|
||||
|
||||
public void setAchievementCount(@javax.annotation.Nullable Integer achievementCount) {
|
||||
this.achievementCount = achievementCount;
|
||||
}
|
||||
|
||||
|
||||
public Application badgeCount(@javax.annotation.Nullable Integer badgeCount) {
|
||||
this.badgeCount = badgeCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get badgeCount
|
||||
* @return badgeCount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getBadgeCount() {
|
||||
return badgeCount;
|
||||
}
|
||||
|
||||
public void setBadgeCount(@javax.annotation.Nullable Integer badgeCount) {
|
||||
this.badgeCount = badgeCount;
|
||||
}
|
||||
|
||||
|
||||
public Application downloadCount(@javax.annotation.Nullable Integer downloadCount) {
|
||||
this.downloadCount = downloadCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get downloadCount
|
||||
* @return downloadCount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getDownloadCount() {
|
||||
return downloadCount;
|
||||
}
|
||||
|
||||
public void setDownloadCount(@javax.annotation.Nullable Integer downloadCount) {
|
||||
this.downloadCount = downloadCount;
|
||||
}
|
||||
|
||||
|
||||
public Application created(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
return this;
|
||||
|
|
@ -556,15 +364,7 @@ public class Application {
|
|||
Objects.equals(this.bannerUrl, application.bannerUrl) &&
|
||||
Objects.equals(this.capsuleImageUrl, application.capsuleImageUrl) &&
|
||||
Objects.equals(this.libraryImageUrl, application.libraryImageUrl) &&
|
||||
Objects.equals(this.parentId, application.parentId) &&
|
||||
Objects.equals(this.slug, application.slug) &&
|
||||
Objects.equals(this.visibility, application.visibility) &&
|
||||
Objects.equals(this.password, application.password) &&
|
||||
Objects.equals(this.primary, application.primary) &&
|
||||
Objects.equals(this.userCount, application.userCount) &&
|
||||
Objects.equals(this.achievementCount, application.achievementCount) &&
|
||||
Objects.equals(this.badgeCount, application.badgeCount) &&
|
||||
Objects.equals(this.downloadCount, application.downloadCount) &&
|
||||
Objects.equals(this.created, application.created) &&
|
||||
Objects.equals(this.updated, application.updated);
|
||||
}
|
||||
|
|
@ -575,7 +375,7 @@ public class Application {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, description, type, organizationId, iconUrl, bannerUrl, capsuleImageUrl, libraryImageUrl, parentId, slug, visibility, password, primary, userCount, achievementCount, badgeCount, downloadCount, created, updated);
|
||||
return Objects.hash(id, name, description, type, organizationId, iconUrl, bannerUrl, capsuleImageUrl, libraryImageUrl, slug, created, updated);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
|
|
@ -598,15 +398,7 @@ public class Application {
|
|||
sb.append(" bannerUrl: ").append(toIndentedString(bannerUrl)).append("\n");
|
||||
sb.append(" capsuleImageUrl: ").append(toIndentedString(capsuleImageUrl)).append("\n");
|
||||
sb.append(" libraryImageUrl: ").append(toIndentedString(libraryImageUrl)).append("\n");
|
||||
sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n");
|
||||
sb.append(" slug: ").append(toIndentedString(slug)).append("\n");
|
||||
sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n");
|
||||
sb.append(" password: ").append(toIndentedString(password)).append("\n");
|
||||
sb.append(" primary: ").append(toIndentedString(primary)).append("\n");
|
||||
sb.append(" userCount: ").append(toIndentedString(userCount)).append("\n");
|
||||
sb.append(" achievementCount: ").append(toIndentedString(achievementCount)).append("\n");
|
||||
sb.append(" badgeCount: ").append(toIndentedString(badgeCount)).append("\n");
|
||||
sb.append(" downloadCount: ").append(toIndentedString(downloadCount)).append("\n");
|
||||
sb.append(" created: ").append(toIndentedString(created)).append("\n");
|
||||
sb.append(" updated: ").append(toIndentedString(updated)).append("\n");
|
||||
sb.append("}");
|
||||
|
|
@ -640,20 +432,13 @@ public class Application {
|
|||
openapiFields.add("banner_url");
|
||||
openapiFields.add("capsule_image_url");
|
||||
openapiFields.add("library_image_url");
|
||||
openapiFields.add("parent_id");
|
||||
openapiFields.add("slug");
|
||||
openapiFields.add("visibility");
|
||||
openapiFields.add("password");
|
||||
openapiFields.add("primary");
|
||||
openapiFields.add("user_count");
|
||||
openapiFields.add("achievement_count");
|
||||
openapiFields.add("badge_count");
|
||||
openapiFields.add("download_count");
|
||||
openapiFields.add("created");
|
||||
openapiFields.add("updated");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -676,6 +461,13 @@ public class Application {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Application` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : Application.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()));
|
||||
|
|
@ -705,15 +497,9 @@ public class Application {
|
|||
if ((jsonObj.get("library_image_url") != null && !jsonObj.get("library_image_url").isJsonNull()) && !jsonObj.get("library_image_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `library_image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("library_image_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("parent_id") != null && !jsonObj.get("parent_id").isJsonNull()) && !jsonObj.get("parent_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `parent_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parent_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("slug") != null && !jsonObj.get("slug").isJsonNull()) && !jsonObj.get("slug").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `slug` to be a primitive type in the JSON string but got `%s`", jsonObj.get("slug").toString()));
|
||||
}
|
||||
if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -51,7 +51,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* AuthorizeRequest
|
||||
*/
|
||||
@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 AuthorizeRequest {
|
||||
public static final String SERIALIZED_NAME_RESPONSE_TYPE = "response_type";
|
||||
@SerializedName(SERIALIZED_NAME_RESPONSE_TYPE)
|
||||
|
|
@ -60,7 +60,7 @@ public class AuthorizeRequest {
|
|||
|
||||
public static final String SERIALIZED_NAME_CLIENT_ID = "client_id";
|
||||
@SerializedName(SERIALIZED_NAME_CLIENT_ID)
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
private String clientId;
|
||||
|
||||
public static final String SERIALIZED_NAME_CODE_CHALLENGE = "code_challenge";
|
||||
|
|
@ -110,7 +110,7 @@ public class AuthorizeRequest {
|
|||
}
|
||||
|
||||
|
||||
public AuthorizeRequest clientId(@javax.annotation.Nullable String clientId) {
|
||||
public AuthorizeRequest clientId(@javax.annotation.Nonnull String clientId) {
|
||||
this.clientId = clientId;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -119,12 +119,12 @@ public class AuthorizeRequest {
|
|||
* Get clientId
|
||||
* @return clientId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setClientId(@javax.annotation.Nullable String clientId) {
|
||||
public void setClientId(@javax.annotation.Nonnull String clientId) {
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
|
|
@ -302,6 +302,8 @@ public class AuthorizeRequest {
|
|||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("client_id");
|
||||
openapiRequiredFields.add("redirect_uri");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -324,12 +326,19 @@ public class AuthorizeRequest {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthorizeRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : AuthorizeRequest.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();
|
||||
// validate the optional field `response_type`
|
||||
if (jsonObj.get("response_type") != null && !jsonObj.get("response_type").isJsonNull()) {
|
||||
ResponseType.validateJsonElement(jsonObj.get("response_type"));
|
||||
}
|
||||
if ((jsonObj.get("client_id") != null && !jsonObj.get("client_id").isJsonNull()) && !jsonObj.get("client_id").isJsonPrimitive()) {
|
||||
if (!jsonObj.get("client_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `client_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("code_challenge") != null && !jsonObj.get("code_challenge").isJsonNull()) && !jsonObj.get("code_challenge").isJsonPrimitive()) {
|
||||
|
|
|
|||
583
src/main/java/com/tribufu/generated/models/Client.java
Normal file
583
src/main/java/com/tribufu/generated/models/Client.java
Normal file
|
|
@ -0,0 +1,583 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* 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).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package com.tribufu.generated.models;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.tribufu.generated.models.ClientType;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
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;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* Client
|
||||
*/
|
||||
@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 Client {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String id;
|
||||
|
||||
public static final String SERIALIZED_NAME_NAME = "name";
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
@javax.annotation.Nullable
|
||||
private String name;
|
||||
|
||||
public static final String SERIALIZED_NAME_TYPE = "type";
|
||||
@SerializedName(SERIALIZED_NAME_TYPE)
|
||||
@javax.annotation.Nullable
|
||||
private ClientType type;
|
||||
|
||||
public static final String SERIALIZED_NAME_ORGANIZATION_ID = "organization_id";
|
||||
@SerializedName(SERIALIZED_NAME_ORGANIZATION_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String organizationId;
|
||||
|
||||
public static final String SERIALIZED_NAME_TRUSTED = "trusted";
|
||||
@SerializedName(SERIALIZED_NAME_TRUSTED)
|
||||
@javax.annotation.Nullable
|
||||
private Boolean trusted;
|
||||
|
||||
public static final String SERIALIZED_NAME_WEBSITE_URL = "website_url";
|
||||
@SerializedName(SERIALIZED_NAME_WEBSITE_URL)
|
||||
@javax.annotation.Nullable
|
||||
private String websiteUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_PHOTO_URL = "photo_url";
|
||||
@SerializedName(SERIALIZED_NAME_PHOTO_URL)
|
||||
@javax.annotation.Nullable
|
||||
private URI photoUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_BACKGROUND_URL = "background_url";
|
||||
@SerializedName(SERIALIZED_NAME_BACKGROUND_URL)
|
||||
@javax.annotation.Nullable
|
||||
private URI backgroundUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_REDIRECTS = "redirects";
|
||||
@SerializedName(SERIALIZED_NAME_REDIRECTS)
|
||||
@javax.annotation.Nullable
|
||||
private String redirects;
|
||||
|
||||
public static final String SERIALIZED_NAME_SCOPES = "scopes";
|
||||
@SerializedName(SERIALIZED_NAME_SCOPES)
|
||||
@javax.annotation.Nullable
|
||||
private String scopes;
|
||||
|
||||
public static final String SERIALIZED_NAME_PERMISSIONS = "permissions";
|
||||
@SerializedName(SERIALIZED_NAME_PERMISSIONS)
|
||||
@javax.annotation.Nullable
|
||||
private List<String> permissions;
|
||||
|
||||
public static final String SERIALIZED_NAME_CREATED = "created";
|
||||
@SerializedName(SERIALIZED_NAME_CREATED)
|
||||
@javax.annotation.Nullable
|
||||
private OffsetDateTime created;
|
||||
|
||||
public static final String SERIALIZED_NAME_UPDATED = "updated";
|
||||
@SerializedName(SERIALIZED_NAME_UPDATED)
|
||||
@javax.annotation.Nullable
|
||||
private OffsetDateTime updated;
|
||||
|
||||
public Client() {
|
||||
}
|
||||
|
||||
public Client(
|
||||
List<String> permissions
|
||||
) {
|
||||
this();
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
public Client id(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public Client name(@javax.annotation.Nullable String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(@javax.annotation.Nullable String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
public Client type(@javax.annotation.Nullable ClientType type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type
|
||||
* @return type
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public ClientType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(@javax.annotation.Nullable ClientType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
public Client organizationId(@javax.annotation.Nullable String organizationId) {
|
||||
this.organizationId = organizationId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get organizationId
|
||||
* @return organizationId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getOrganizationId() {
|
||||
return organizationId;
|
||||
}
|
||||
|
||||
public void setOrganizationId(@javax.annotation.Nullable String organizationId) {
|
||||
this.organizationId = organizationId;
|
||||
}
|
||||
|
||||
|
||||
public Client trusted(@javax.annotation.Nullable Boolean trusted) {
|
||||
this.trusted = trusted;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get trusted
|
||||
* @return trusted
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Boolean getTrusted() {
|
||||
return trusted;
|
||||
}
|
||||
|
||||
public void setTrusted(@javax.annotation.Nullable Boolean trusted) {
|
||||
this.trusted = trusted;
|
||||
}
|
||||
|
||||
|
||||
public Client websiteUrl(@javax.annotation.Nullable String websiteUrl) {
|
||||
this.websiteUrl = websiteUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get websiteUrl
|
||||
* @return websiteUrl
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getWebsiteUrl() {
|
||||
return websiteUrl;
|
||||
}
|
||||
|
||||
public void setWebsiteUrl(@javax.annotation.Nullable String websiteUrl) {
|
||||
this.websiteUrl = websiteUrl;
|
||||
}
|
||||
|
||||
|
||||
public Client photoUrl(@javax.annotation.Nullable URI photoUrl) {
|
||||
this.photoUrl = photoUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get photoUrl
|
||||
* @return photoUrl
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public URI getPhotoUrl() {
|
||||
return photoUrl;
|
||||
}
|
||||
|
||||
public void setPhotoUrl(@javax.annotation.Nullable URI photoUrl) {
|
||||
this.photoUrl = photoUrl;
|
||||
}
|
||||
|
||||
|
||||
public Client backgroundUrl(@javax.annotation.Nullable URI backgroundUrl) {
|
||||
this.backgroundUrl = backgroundUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get backgroundUrl
|
||||
* @return backgroundUrl
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public URI getBackgroundUrl() {
|
||||
return backgroundUrl;
|
||||
}
|
||||
|
||||
public void setBackgroundUrl(@javax.annotation.Nullable URI backgroundUrl) {
|
||||
this.backgroundUrl = backgroundUrl;
|
||||
}
|
||||
|
||||
|
||||
public Client redirects(@javax.annotation.Nullable String redirects) {
|
||||
this.redirects = redirects;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get redirects
|
||||
* @return redirects
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getRedirects() {
|
||||
return redirects;
|
||||
}
|
||||
|
||||
public void setRedirects(@javax.annotation.Nullable String redirects) {
|
||||
this.redirects = redirects;
|
||||
}
|
||||
|
||||
|
||||
public Client scopes(@javax.annotation.Nullable String scopes) {
|
||||
this.scopes = scopes;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scopes
|
||||
* @return scopes
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getScopes() {
|
||||
return scopes;
|
||||
}
|
||||
|
||||
public void setScopes(@javax.annotation.Nullable String scopes) {
|
||||
this.scopes = scopes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get permissions
|
||||
* @return permissions
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public List<String> getPermissions() {
|
||||
return permissions;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Client created(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
* @return created
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public OffsetDateTime getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
public void setCreated(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
|
||||
public Client updated(@javax.annotation.Nullable OffsetDateTime updated) {
|
||||
this.updated = updated;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
* @return updated
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public OffsetDateTime getUpdated() {
|
||||
return updated;
|
||||
}
|
||||
|
||||
public void setUpdated(@javax.annotation.Nullable OffsetDateTime updated) {
|
||||
this.updated = updated;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Client client = (Client) o;
|
||||
return Objects.equals(this.id, client.id) &&
|
||||
Objects.equals(this.name, client.name) &&
|
||||
Objects.equals(this.type, client.type) &&
|
||||
Objects.equals(this.organizationId, client.organizationId) &&
|
||||
Objects.equals(this.trusted, client.trusted) &&
|
||||
Objects.equals(this.websiteUrl, client.websiteUrl) &&
|
||||
Objects.equals(this.photoUrl, client.photoUrl) &&
|
||||
Objects.equals(this.backgroundUrl, client.backgroundUrl) &&
|
||||
Objects.equals(this.redirects, client.redirects) &&
|
||||
Objects.equals(this.scopes, client.scopes) &&
|
||||
Objects.equals(this.permissions, client.permissions) &&
|
||||
Objects.equals(this.created, client.created) &&
|
||||
Objects.equals(this.updated, client.updated);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, type, organizationId, trusted, websiteUrl, photoUrl, backgroundUrl, redirects, scopes, permissions, created, updated);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Client {\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n");
|
||||
sb.append(" trusted: ").append(toIndentedString(trusted)).append("\n");
|
||||
sb.append(" websiteUrl: ").append(toIndentedString(websiteUrl)).append("\n");
|
||||
sb.append(" photoUrl: ").append(toIndentedString(photoUrl)).append("\n");
|
||||
sb.append(" backgroundUrl: ").append(toIndentedString(backgroundUrl)).append("\n");
|
||||
sb.append(" redirects: ").append(toIndentedString(redirects)).append("\n");
|
||||
sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n");
|
||||
sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n");
|
||||
sb.append(" created: ").append(toIndentedString(created)).append("\n");
|
||||
sb.append(" updated: ").append(toIndentedString(updated)).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(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public static HashSet<String> openapiFields;
|
||||
public static HashSet<String> openapiRequiredFields;
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("name");
|
||||
openapiFields.add("type");
|
||||
openapiFields.add("organization_id");
|
||||
openapiFields.add("trusted");
|
||||
openapiFields.add("website_url");
|
||||
openapiFields.add("photo_url");
|
||||
openapiFields.add("background_url");
|
||||
openapiFields.add("redirects");
|
||||
openapiFields.add("scopes");
|
||||
openapiFields.add("permissions");
|
||||
openapiFields.add("created");
|
||||
openapiFields.add("updated");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to Client
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!Client.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in Client is not found in the empty JSON string", Client.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!Client.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Client` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : Client.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()));
|
||||
}
|
||||
if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
|
||||
}
|
||||
// validate the optional field `type`
|
||||
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
|
||||
ClientType.validateJsonElement(jsonObj.get("type"));
|
||||
}
|
||||
if ((jsonObj.get("organization_id") != null && !jsonObj.get("organization_id").isJsonNull()) && !jsonObj.get("organization_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `organization_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("website_url") != null && !jsonObj.get("website_url").isJsonNull()) && !jsonObj.get("website_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `website_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("photo_url") != null && !jsonObj.get("photo_url").isJsonNull()) && !jsonObj.get("photo_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `photo_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("photo_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("background_url") != null && !jsonObj.get("background_url").isJsonNull()) && !jsonObj.get("background_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `background_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("background_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("redirects") != null && !jsonObj.get("redirects").isJsonNull()) && !jsonObj.get("redirects").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `redirects` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirects").toString()));
|
||||
}
|
||||
if ((jsonObj.get("scopes") != null && !jsonObj.get("scopes").isJsonNull()) && !jsonObj.get("scopes").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `scopes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scopes").toString()));
|
||||
}
|
||||
// ensure the optional json data is an array if present
|
||||
if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull() && !jsonObj.get("permissions").isJsonArray()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!Client.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'Client' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<Client> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(Client.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<Client>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, Client value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Client read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
}
|
||||
|
||||
}.nullSafe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of Client given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of Client
|
||||
* @throws IOException if the JSON string is invalid with respect to Client
|
||||
*/
|
||||
public static Client fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, Client.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of Client to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
public String toJson() {
|
||||
return JSON.getGson().toJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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,11 @@ 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.ClientType;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
import java.util.List;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
|
@ -48,53 +50,58 @@ import java.util.Set;
|
|||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* RegisterRequest
|
||||
* ClientInfo
|
||||
*/
|
||||
@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")
|
||||
public class RegisterRequest {
|
||||
public static final String SERIALIZED_NAME_UUID = "uuid";
|
||||
@SerializedName(SERIALIZED_NAME_UUID)
|
||||
@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 ClientInfo {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
@javax.annotation.Nullable
|
||||
private UUID uuid;
|
||||
private String id;
|
||||
|
||||
public static final String SERIALIZED_NAME_NAME = "name";
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
@javax.annotation.Nonnull
|
||||
@javax.annotation.Nullable
|
||||
private String name;
|
||||
|
||||
public static final String SERIALIZED_NAME_EMAIL = "email";
|
||||
@SerializedName(SERIALIZED_NAME_EMAIL)
|
||||
public static final String SERIALIZED_NAME_TYPE = "type";
|
||||
@SerializedName(SERIALIZED_NAME_TYPE)
|
||||
@javax.annotation.Nullable
|
||||
private String email;
|
||||
private ClientType type;
|
||||
|
||||
public static final String SERIALIZED_NAME_PASSWORD = "password";
|
||||
@SerializedName(SERIALIZED_NAME_PASSWORD)
|
||||
@javax.annotation.Nonnull
|
||||
private String password;
|
||||
public static final String SERIALIZED_NAME_PHOTO_URL = "photo_url";
|
||||
@SerializedName(SERIALIZED_NAME_PHOTO_URL)
|
||||
@javax.annotation.Nullable
|
||||
private String photoUrl;
|
||||
|
||||
public RegisterRequest() {
|
||||
public static final String SERIALIZED_NAME_PERMISSIONS = "permissions";
|
||||
@SerializedName(SERIALIZED_NAME_PERMISSIONS)
|
||||
@javax.annotation.Nullable
|
||||
private List<String> permissions;
|
||||
|
||||
public ClientInfo() {
|
||||
}
|
||||
|
||||
public RegisterRequest uuid(@javax.annotation.Nullable UUID uuid) {
|
||||
this.uuid = uuid;
|
||||
public ClientInfo id(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get uuid
|
||||
* @return uuid
|
||||
* Get id
|
||||
* @return id
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public UUID getUuid() {
|
||||
return uuid;
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setUuid(@javax.annotation.Nullable UUID uuid) {
|
||||
this.uuid = uuid;
|
||||
public void setId(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public RegisterRequest name(@javax.annotation.Nonnull String name) {
|
||||
public ClientInfo name(@javax.annotation.Nullable String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -103,51 +110,78 @@ public class RegisterRequest {
|
|||
* Get name
|
||||
* @return name
|
||||
*/
|
||||
@javax.annotation.Nonnull
|
||||
@javax.annotation.Nullable
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(@javax.annotation.Nonnull String name) {
|
||||
public void setName(@javax.annotation.Nullable String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
public RegisterRequest email(@javax.annotation.Nullable String email) {
|
||||
this.email = email;
|
||||
public ClientInfo type(@javax.annotation.Nullable ClientType type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get email
|
||||
* @return email
|
||||
* Get type
|
||||
* @return type
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getEmail() {
|
||||
return email;
|
||||
public ClientType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setEmail(@javax.annotation.Nullable String email) {
|
||||
this.email = email;
|
||||
public void setType(@javax.annotation.Nullable ClientType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
public RegisterRequest password(@javax.annotation.Nonnull String password) {
|
||||
this.password = password;
|
||||
public ClientInfo photoUrl(@javax.annotation.Nullable String photoUrl) {
|
||||
this.photoUrl = photoUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get password
|
||||
* @return password
|
||||
* Get photoUrl
|
||||
* @return photoUrl
|
||||
*/
|
||||
@javax.annotation.Nonnull
|
||||
public String getPassword() {
|
||||
return password;
|
||||
@javax.annotation.Nullable
|
||||
public String getPhotoUrl() {
|
||||
return photoUrl;
|
||||
}
|
||||
|
||||
public void setPassword(@javax.annotation.Nonnull String password) {
|
||||
this.password = password;
|
||||
public void setPhotoUrl(@javax.annotation.Nullable String photoUrl) {
|
||||
this.photoUrl = photoUrl;
|
||||
}
|
||||
|
||||
|
||||
public ClientInfo permissions(@javax.annotation.Nullable List<String> permissions) {
|
||||
this.permissions = permissions;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClientInfo addPermissionsItem(String permissionsItem) {
|
||||
if (this.permissions == null) {
|
||||
this.permissions = new ArrayList<>();
|
||||
}
|
||||
this.permissions.add(permissionsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get permissions
|
||||
* @return permissions
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public List<String> getPermissions() {
|
||||
return permissions;
|
||||
}
|
||||
|
||||
public void setPermissions(@javax.annotation.Nullable List<String> permissions) {
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -160,11 +194,12 @@ public class RegisterRequest {
|
|||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
RegisterRequest registerRequest = (RegisterRequest) o;
|
||||
return Objects.equals(this.uuid, registerRequest.uuid) &&
|
||||
Objects.equals(this.name, registerRequest.name) &&
|
||||
Objects.equals(this.email, registerRequest.email) &&
|
||||
Objects.equals(this.password, registerRequest.password);
|
||||
ClientInfo clientInfo = (ClientInfo) o;
|
||||
return Objects.equals(this.id, clientInfo.id) &&
|
||||
Objects.equals(this.name, clientInfo.name) &&
|
||||
Objects.equals(this.type, clientInfo.type) &&
|
||||
Objects.equals(this.photoUrl, clientInfo.photoUrl) &&
|
||||
Objects.equals(this.permissions, clientInfo.permissions);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
|
|
@ -173,7 +208,7 @@ public class RegisterRequest {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(uuid, name, email, password);
|
||||
return Objects.hash(id, name, type, photoUrl, permissions);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
|
|
@ -186,11 +221,12 @@ public class RegisterRequest {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class RegisterRequest {\n");
|
||||
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
|
||||
sb.append("class ClientInfo {\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" email: ").append(toIndentedString(email)).append("\n");
|
||||
sb.append(" password: ").append("*").append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append(" photoUrl: ").append(toIndentedString(photoUrl)).append("\n");
|
||||
sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
@ -213,56 +249,61 @@ public class RegisterRequest {
|
|||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("uuid");
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("name");
|
||||
openapiFields.add("email");
|
||||
openapiFields.add("password");
|
||||
openapiFields.add("type");
|
||||
openapiFields.add("photo_url");
|
||||
openapiFields.add("permissions");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
openapiRequiredFields.add("password");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to RegisterRequest
|
||||
* @throws IOException if the JSON Element is invalid with respect to ClientInfo
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!RegisterRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in RegisterRequest is not found in the empty JSON string", RegisterRequest.openapiRequiredFields.toString()));
|
||||
if (!ClientInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in ClientInfo is not found in the empty JSON string", ClientInfo.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!RegisterRequest.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RegisterRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
if (!ClientInfo.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ClientInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : RegisterRequest.openapiRequiredFields) {
|
||||
for (String requiredField : ClientInfo.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("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString()));
|
||||
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()));
|
||||
}
|
||||
if (!jsonObj.get("name").isJsonPrimitive()) {
|
||||
if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
|
||||
}
|
||||
if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
|
||||
// validate the optional field `type`
|
||||
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
|
||||
ClientType.validateJsonElement(jsonObj.get("type"));
|
||||
}
|
||||
if (!jsonObj.get("password").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString()));
|
||||
if ((jsonObj.get("photo_url") != null && !jsonObj.get("photo_url").isJsonNull()) && !jsonObj.get("photo_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `photo_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("photo_url").toString()));
|
||||
}
|
||||
// ensure the optional json data is an array if present
|
||||
if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull() && !jsonObj.get("permissions").isJsonArray()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -270,22 +311,22 @@ public class RegisterRequest {
|
|||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!RegisterRequest.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'RegisterRequest' and its subtypes
|
||||
if (!ClientInfo.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'ClientInfo' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<RegisterRequest> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(RegisterRequest.class));
|
||||
final TypeAdapter<ClientInfo> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(ClientInfo.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<RegisterRequest>() {
|
||||
return (TypeAdapter<T>) new TypeAdapter<ClientInfo>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, RegisterRequest value) throws IOException {
|
||||
public void write(JsonWriter out, ClientInfo value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegisterRequest read(JsonReader in) throws IOException {
|
||||
public ClientInfo read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
|
|
@ -296,18 +337,18 @@ public class RegisterRequest {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create an instance of RegisterRequest given an JSON string
|
||||
* Create an instance of ClientInfo given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of RegisterRequest
|
||||
* @throws IOException if the JSON string is invalid with respect to RegisterRequest
|
||||
* @return An instance of ClientInfo
|
||||
* @throws IOException if the JSON string is invalid with respect to ClientInfo
|
||||
*/
|
||||
public static RegisterRequest fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, RegisterRequest.class);
|
||||
public static ClientInfo fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, ClientInfo.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of RegisterRequest to an JSON string
|
||||
* Convert an instance of ClientInfo to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
80
src/main/java/com/tribufu/generated/models/ClientType.java
Normal file
80
src/main/java/com/tribufu/generated/models/ClientType.java
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* 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).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package com.tribufu.generated.models;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.IOException;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
/**
|
||||
* Gets or Sets ClientType
|
||||
*/
|
||||
@JsonAdapter(ClientType.Adapter.class)
|
||||
public enum ClientType {
|
||||
|
||||
WEB("web"),
|
||||
|
||||
DESKTOP("desktop"),
|
||||
|
||||
MOBILE("mobile");
|
||||
|
||||
private String value;
|
||||
|
||||
ClientType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static ClientType fromValue(String value) {
|
||||
for (ClientType b : ClientType.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<ClientType> {
|
||||
@Override
|
||||
public void write(final JsonWriter jsonWriter, final ClientType enumeration) throws IOException {
|
||||
jsonWriter.value(enumeration.getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientType read(final JsonReader jsonReader) throws IOException {
|
||||
String value = jsonReader.nextString();
|
||||
return ClientType.fromValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
String value = jsonElement.getAsString();
|
||||
ClientType.fromValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -47,58 +47,58 @@ import java.util.Set;
|
|||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* LoginRequest
|
||||
* CodeResponse
|
||||
*/
|
||||
@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")
|
||||
public class LoginRequest {
|
||||
public static final String SERIALIZED_NAME_LOGIN = "login";
|
||||
@SerializedName(SERIALIZED_NAME_LOGIN)
|
||||
@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 CodeResponse {
|
||||
public static final String SERIALIZED_NAME_CODE = "code";
|
||||
@SerializedName(SERIALIZED_NAME_CODE)
|
||||
@javax.annotation.Nullable
|
||||
private String login;
|
||||
private String code;
|
||||
|
||||
public static final String SERIALIZED_NAME_PASSWORD = "password";
|
||||
@SerializedName(SERIALIZED_NAME_PASSWORD)
|
||||
public static final String SERIALIZED_NAME_STATE = "state";
|
||||
@SerializedName(SERIALIZED_NAME_STATE)
|
||||
@javax.annotation.Nullable
|
||||
private String password;
|
||||
private String state;
|
||||
|
||||
public LoginRequest() {
|
||||
public CodeResponse() {
|
||||
}
|
||||
|
||||
public LoginRequest login(@javax.annotation.Nullable String login) {
|
||||
this.login = login;
|
||||
public CodeResponse code(@javax.annotation.Nullable String code) {
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get login
|
||||
* @return login
|
||||
* Get code
|
||||
* @return code
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getLogin() {
|
||||
return login;
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setLogin(@javax.annotation.Nullable String login) {
|
||||
this.login = login;
|
||||
public void setCode(@javax.annotation.Nullable String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
|
||||
public LoginRequest password(@javax.annotation.Nullable String password) {
|
||||
this.password = password;
|
||||
public CodeResponse state(@javax.annotation.Nullable String state) {
|
||||
this.state = state;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get password
|
||||
* @return password
|
||||
* Get state
|
||||
* @return state
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getPassword() {
|
||||
return password;
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setPassword(@javax.annotation.Nullable String password) {
|
||||
this.password = password;
|
||||
public void setState(@javax.annotation.Nullable String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -111,9 +111,9 @@ public class LoginRequest {
|
|||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
LoginRequest loginRequest = (LoginRequest) o;
|
||||
return Objects.equals(this.login, loginRequest.login) &&
|
||||
Objects.equals(this.password, loginRequest.password);
|
||||
CodeResponse codeResponse = (CodeResponse) o;
|
||||
return Objects.equals(this.code, codeResponse.code) &&
|
||||
Objects.equals(this.state, codeResponse.state);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
|
|
@ -122,7 +122,7 @@ public class LoginRequest {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(login, password);
|
||||
return Objects.hash(code, state);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
|
|
@ -135,9 +135,9 @@ public class LoginRequest {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class LoginRequest {\n");
|
||||
sb.append(" login: ").append(toIndentedString(login)).append("\n");
|
||||
sb.append(" password: ").append(toIndentedString(password)).append("\n");
|
||||
sb.append("class CodeResponse {\n");
|
||||
sb.append(" code: ").append(toIndentedString(code)).append("\n");
|
||||
sb.append(" state: ").append(toIndentedString(state)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
@ -160,39 +160,47 @@ public class LoginRequest {
|
|||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("login");
|
||||
openapiFields.add("password");
|
||||
openapiFields.add("code");
|
||||
openapiFields.add("state");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("code");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to LoginRequest
|
||||
* @throws IOException if the JSON Element is invalid with respect to CodeResponse
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!LoginRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in LoginRequest is not found in the empty JSON string", LoginRequest.openapiRequiredFields.toString()));
|
||||
if (!CodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in CodeResponse is not found in the empty JSON string", CodeResponse.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!LoginRequest.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LoginRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
if (!CodeResponse.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CodeResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : CodeResponse.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("login") != null && !jsonObj.get("login").isJsonNull()) && !jsonObj.get("login").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `login` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login").toString()));
|
||||
if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString()));
|
||||
}
|
||||
if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString()));
|
||||
if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -200,22 +208,22 @@ public class LoginRequest {
|
|||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!LoginRequest.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'LoginRequest' and its subtypes
|
||||
if (!CodeResponse.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'CodeResponse' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<LoginRequest> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(LoginRequest.class));
|
||||
final TypeAdapter<CodeResponse> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(CodeResponse.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<LoginRequest>() {
|
||||
return (TypeAdapter<T>) new TypeAdapter<CodeResponse>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, LoginRequest value) throws IOException {
|
||||
public void write(JsonWriter out, CodeResponse value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoginRequest read(JsonReader in) throws IOException {
|
||||
public CodeResponse read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
|
|
@ -226,18 +234,18 @@ public class LoginRequest {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create an instance of LoginRequest given an JSON string
|
||||
* Create an instance of CodeResponse given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of LoginRequest
|
||||
* @throws IOException if the JSON string is invalid with respect to LoginRequest
|
||||
* @return An instance of CodeResponse
|
||||
* @throws IOException if the JSON string is invalid with respect to CodeResponse
|
||||
*/
|
||||
public static LoginRequest fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, LoginRequest.class);
|
||||
public static CodeResponse fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, CodeResponse.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of LoginRequest to an JSON string
|
||||
* Convert an instance of CodeResponse to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
467
src/main/java/com/tribufu/generated/models/CreateUser.java
Normal file
467
src/main/java/com/tribufu/generated/models/CreateUser.java
Normal file
|
|
@ -0,0 +1,467 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* 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).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package com.tribufu.generated.models;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* CreateUser
|
||||
*/
|
||||
@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 CreateUser {
|
||||
public static final String SERIALIZED_NAME_UUID = "uuid";
|
||||
@SerializedName(SERIALIZED_NAME_UUID)
|
||||
@javax.annotation.Nullable
|
||||
private UUID uuid;
|
||||
|
||||
public static final String SERIALIZED_NAME_NAME = "name";
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
@javax.annotation.Nonnull
|
||||
private String name;
|
||||
|
||||
public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name";
|
||||
@SerializedName(SERIALIZED_NAME_DISPLAY_NAME)
|
||||
@javax.annotation.Nullable
|
||||
private String displayName;
|
||||
|
||||
public static final String SERIALIZED_NAME_EMAIL = "email";
|
||||
@SerializedName(SERIALIZED_NAME_EMAIL)
|
||||
@javax.annotation.Nullable
|
||||
private String email;
|
||||
|
||||
public static final String SERIALIZED_NAME_PASSWORD = "password";
|
||||
@SerializedName(SERIALIZED_NAME_PASSWORD)
|
||||
@javax.annotation.Nullable
|
||||
private String password;
|
||||
|
||||
public static final String SERIALIZED_NAME_LANGUAGE = "language";
|
||||
@SerializedName(SERIALIZED_NAME_LANGUAGE)
|
||||
@javax.annotation.Nullable
|
||||
private String language;
|
||||
|
||||
public static final String SERIALIZED_NAME_TIMEZONE = "timezone";
|
||||
@SerializedName(SERIALIZED_NAME_TIMEZONE)
|
||||
@javax.annotation.Nullable
|
||||
private String timezone;
|
||||
|
||||
public static final String SERIALIZED_NAME_CURRENCY = "currency";
|
||||
@SerializedName(SERIALIZED_NAME_CURRENCY)
|
||||
@javax.annotation.Nullable
|
||||
private String currency;
|
||||
|
||||
public static final String SERIALIZED_NAME_IP_ADDRESS = "ip_address";
|
||||
@SerializedName(SERIALIZED_NAME_IP_ADDRESS)
|
||||
@javax.annotation.Nullable
|
||||
private String ipAddress;
|
||||
|
||||
public CreateUser() {
|
||||
}
|
||||
|
||||
public CreateUser uuid(@javax.annotation.Nullable UUID uuid) {
|
||||
this.uuid = uuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get uuid
|
||||
* @return uuid
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public UUID getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public void setUuid(@javax.annotation.Nullable UUID uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
|
||||
public CreateUser name(@javax.annotation.Nonnull String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
*/
|
||||
@javax.annotation.Nonnull
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(@javax.annotation.Nonnull String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
public CreateUser displayName(@javax.annotation.Nullable String displayName) {
|
||||
this.displayName = displayName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get displayName
|
||||
* @return displayName
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(@javax.annotation.Nullable String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
|
||||
public CreateUser email(@javax.annotation.Nullable String email) {
|
||||
this.email = email;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get email
|
||||
* @return email
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(@javax.annotation.Nullable String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
|
||||
public CreateUser password(@javax.annotation.Nullable String password) {
|
||||
this.password = password;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get password
|
||||
* @return password
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(@javax.annotation.Nullable String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
|
||||
public CreateUser language(@javax.annotation.Nullable String language) {
|
||||
this.language = language;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get language
|
||||
* @return language
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getLanguage() {
|
||||
return language;
|
||||
}
|
||||
|
||||
public void setLanguage(@javax.annotation.Nullable String language) {
|
||||
this.language = language;
|
||||
}
|
||||
|
||||
|
||||
public CreateUser timezone(@javax.annotation.Nullable String timezone) {
|
||||
this.timezone = timezone;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get timezone
|
||||
* @return timezone
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getTimezone() {
|
||||
return timezone;
|
||||
}
|
||||
|
||||
public void setTimezone(@javax.annotation.Nullable String timezone) {
|
||||
this.timezone = timezone;
|
||||
}
|
||||
|
||||
|
||||
public CreateUser currency(@javax.annotation.Nullable String currency) {
|
||||
this.currency = currency;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get currency
|
||||
* @return currency
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getCurrency() {
|
||||
return currency;
|
||||
}
|
||||
|
||||
public void setCurrency(@javax.annotation.Nullable String currency) {
|
||||
this.currency = currency;
|
||||
}
|
||||
|
||||
|
||||
public CreateUser ipAddress(@javax.annotation.Nullable String ipAddress) {
|
||||
this.ipAddress = ipAddress;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ipAddress
|
||||
* @return ipAddress
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getIpAddress() {
|
||||
return ipAddress;
|
||||
}
|
||||
|
||||
public void setIpAddress(@javax.annotation.Nullable String ipAddress) {
|
||||
this.ipAddress = ipAddress;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreateUser createUser = (CreateUser) o;
|
||||
return Objects.equals(this.uuid, createUser.uuid) &&
|
||||
Objects.equals(this.name, createUser.name) &&
|
||||
Objects.equals(this.displayName, createUser.displayName) &&
|
||||
Objects.equals(this.email, createUser.email) &&
|
||||
Objects.equals(this.password, createUser.password) &&
|
||||
Objects.equals(this.language, createUser.language) &&
|
||||
Objects.equals(this.timezone, createUser.timezone) &&
|
||||
Objects.equals(this.currency, createUser.currency) &&
|
||||
Objects.equals(this.ipAddress, createUser.ipAddress);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(uuid, name, displayName, email, password, language, timezone, currency, ipAddress);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class CreateUser {\n");
|
||||
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
|
||||
sb.append(" email: ").append(toIndentedString(email)).append("\n");
|
||||
sb.append(" password: ").append("*").append("\n");
|
||||
sb.append(" language: ").append(toIndentedString(language)).append("\n");
|
||||
sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n");
|
||||
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
|
||||
sb.append(" ipAddress: ").append(toIndentedString(ipAddress)).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(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public static HashSet<String> openapiFields;
|
||||
public static HashSet<String> openapiRequiredFields;
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("uuid");
|
||||
openapiFields.add("name");
|
||||
openapiFields.add("display_name");
|
||||
openapiFields.add("email");
|
||||
openapiFields.add("password");
|
||||
openapiFields.add("language");
|
||||
openapiFields.add("timezone");
|
||||
openapiFields.add("currency");
|
||||
openapiFields.add("ip_address");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to CreateUser
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!CreateUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in CreateUser is not found in the empty JSON string", CreateUser.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!CreateUser.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateUser` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : CreateUser.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("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString()));
|
||||
}
|
||||
if (!jsonObj.get("name").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
|
||||
}
|
||||
if ((jsonObj.get("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString()));
|
||||
}
|
||||
if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
|
||||
}
|
||||
if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString()));
|
||||
}
|
||||
if ((jsonObj.get("language") != null && !jsonObj.get("language").isJsonNull()) && !jsonObj.get("language").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `language` to be a primitive type in the JSON string but got `%s`", jsonObj.get("language").toString()));
|
||||
}
|
||||
if ((jsonObj.get("timezone") != null && !jsonObj.get("timezone").isJsonNull()) && !jsonObj.get("timezone").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `timezone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timezone").toString()));
|
||||
}
|
||||
if ((jsonObj.get("currency") != null && !jsonObj.get("currency").isJsonNull()) && !jsonObj.get("currency").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString()));
|
||||
}
|
||||
if ((jsonObj.get("ip_address") != null && !jsonObj.get("ip_address").isJsonNull()) && !jsonObj.get("ip_address").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `ip_address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip_address").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!CreateUser.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'CreateUser' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<CreateUser> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(CreateUser.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<CreateUser>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, CreateUser value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreateUser read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
}
|
||||
|
||||
}.nullSafe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of CreateUser given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of CreateUser
|
||||
* @throws IOException if the JSON string is invalid with respect to CreateUser
|
||||
*/
|
||||
public static CreateUser fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, CreateUser.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of CreateUser to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
public String toJson() {
|
||||
return JSON.getGson().toJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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).
|
||||
|
|
@ -49,7 +49,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* CryptoViewModel
|
||||
*/
|
||||
@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 CryptoViewModel {
|
||||
public static final String SERIALIZED_NAME_ENCODED = "encoded";
|
||||
@SerializedName(SERIALIZED_NAME_ENCODED)
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -52,63 +52,8 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* Game
|
||||
*/
|
||||
@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 Game {
|
||||
public static final String SERIALIZED_NAME_GAME_PORT = "game_port";
|
||||
@SerializedName(SERIALIZED_NAME_GAME_PORT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer gamePort;
|
||||
|
||||
public static final String SERIALIZED_NAME_QUERY_PORT = "query_port";
|
||||
@SerializedName(SERIALIZED_NAME_QUERY_PORT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer queryPort;
|
||||
|
||||
public static final String SERIALIZED_NAME_RCON_PORT = "rcon_port";
|
||||
@SerializedName(SERIALIZED_NAME_RCON_PORT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer rconPort;
|
||||
|
||||
public static final String SERIALIZED_NAME_SERVER_COUNT = "server_count";
|
||||
@SerializedName(SERIALIZED_NAME_SERVER_COUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer serverCount;
|
||||
|
||||
public static final String SERIALIZED_NAME_STEAM_APP_ID = "steam_app_id";
|
||||
@SerializedName(SERIALIZED_NAME_STEAM_APP_ID)
|
||||
@javax.annotation.Nullable
|
||||
private Integer steamAppId;
|
||||
|
||||
public static final String SERIALIZED_NAME_STEAM_SERVER_APP_ID = "steam_server_app_id";
|
||||
@SerializedName(SERIALIZED_NAME_STEAM_SERVER_APP_ID)
|
||||
@javax.annotation.Nullable
|
||||
private Integer steamServerAppId;
|
||||
|
||||
public static final String SERIALIZED_NAME_ENABLE_SERVERS = "enable_servers";
|
||||
@SerializedName(SERIALIZED_NAME_ENABLE_SERVERS)
|
||||
@javax.annotation.Nullable
|
||||
private Boolean enableServers;
|
||||
|
||||
public static final String SERIALIZED_NAME_RUST_GAMEDIG_ID = "rust_gamedig_id";
|
||||
@SerializedName(SERIALIZED_NAME_RUST_GAMEDIG_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String rustGamedigId;
|
||||
|
||||
public static final String SERIALIZED_NAME_NODE_GAMEDIG_ID = "node_gamedig_id";
|
||||
@SerializedName(SERIALIZED_NAME_NODE_GAMEDIG_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String nodeGamedigId;
|
||||
|
||||
public static final String SERIALIZED_NAME_SERVER_CONNECT_URL = "server_connect_url";
|
||||
@SerializedName(SERIALIZED_NAME_SERVER_CONNECT_URL)
|
||||
@javax.annotation.Nullable
|
||||
private String serverConnectUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_SERVER_TAGS = "server_tags";
|
||||
@SerializedName(SERIALIZED_NAME_SERVER_TAGS)
|
||||
@javax.annotation.Nullable
|
||||
private String serverTags;
|
||||
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
@javax.annotation.Nullable
|
||||
|
|
@ -154,51 +99,11 @@ public class Game {
|
|||
@javax.annotation.Nullable
|
||||
private URI libraryImageUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_PARENT_ID = "parent_id";
|
||||
@SerializedName(SERIALIZED_NAME_PARENT_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String parentId;
|
||||
|
||||
public static final String SERIALIZED_NAME_SLUG = "slug";
|
||||
@SerializedName(SERIALIZED_NAME_SLUG)
|
||||
@javax.annotation.Nullable
|
||||
private String slug;
|
||||
|
||||
public static final String SERIALIZED_NAME_VISIBILITY = "visibility";
|
||||
@SerializedName(SERIALIZED_NAME_VISIBILITY)
|
||||
@javax.annotation.Nullable
|
||||
private Integer visibility;
|
||||
|
||||
public static final String SERIALIZED_NAME_PASSWORD = "password";
|
||||
@SerializedName(SERIALIZED_NAME_PASSWORD)
|
||||
@javax.annotation.Nullable
|
||||
private String password;
|
||||
|
||||
public static final String SERIALIZED_NAME_PRIMARY = "primary";
|
||||
@SerializedName(SERIALIZED_NAME_PRIMARY)
|
||||
@javax.annotation.Nullable
|
||||
private Integer primary;
|
||||
|
||||
public static final String SERIALIZED_NAME_USER_COUNT = "user_count";
|
||||
@SerializedName(SERIALIZED_NAME_USER_COUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer userCount;
|
||||
|
||||
public static final String SERIALIZED_NAME_ACHIEVEMENT_COUNT = "achievement_count";
|
||||
@SerializedName(SERIALIZED_NAME_ACHIEVEMENT_COUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer achievementCount;
|
||||
|
||||
public static final String SERIALIZED_NAME_BADGE_COUNT = "badge_count";
|
||||
@SerializedName(SERIALIZED_NAME_BADGE_COUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer badgeCount;
|
||||
|
||||
public static final String SERIALIZED_NAME_DOWNLOAD_COUNT = "download_count";
|
||||
@SerializedName(SERIALIZED_NAME_DOWNLOAD_COUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer downloadCount;
|
||||
|
||||
public static final String SERIALIZED_NAME_CREATED = "created";
|
||||
@SerializedName(SERIALIZED_NAME_CREATED)
|
||||
@javax.annotation.Nullable
|
||||
|
|
@ -209,218 +114,44 @@ public class Game {
|
|||
@javax.annotation.Nullable
|
||||
private OffsetDateTime updated;
|
||||
|
||||
public static final String SERIALIZED_NAME_ENABLE_SERVERS = "enable_servers";
|
||||
@SerializedName(SERIALIZED_NAME_ENABLE_SERVERS)
|
||||
@javax.annotation.Nullable
|
||||
private Boolean enableServers;
|
||||
|
||||
public static final String SERIALIZED_NAME_GAME_PORT = "game_port";
|
||||
@SerializedName(SERIALIZED_NAME_GAME_PORT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer gamePort;
|
||||
|
||||
public static final String SERIALIZED_NAME_QUERY_PORT = "query_port";
|
||||
@SerializedName(SERIALIZED_NAME_QUERY_PORT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer queryPort;
|
||||
|
||||
public static final String SERIALIZED_NAME_RCON_PORT = "rcon_port";
|
||||
@SerializedName(SERIALIZED_NAME_RCON_PORT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer rconPort;
|
||||
|
||||
public static final String SERIALIZED_NAME_GAMEDIG_ID = "gamedig_id";
|
||||
@SerializedName(SERIALIZED_NAME_GAMEDIG_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String gamedigId;
|
||||
|
||||
public static final String SERIALIZED_NAME_STEAM_APP_ID = "steam_app_id";
|
||||
@SerializedName(SERIALIZED_NAME_STEAM_APP_ID)
|
||||
@javax.annotation.Nullable
|
||||
private Integer steamAppId;
|
||||
|
||||
public static final String SERIALIZED_NAME_STEAM_SERVER_APP_ID = "steam_server_app_id";
|
||||
@SerializedName(SERIALIZED_NAME_STEAM_SERVER_APP_ID)
|
||||
@javax.annotation.Nullable
|
||||
private Integer steamServerAppId;
|
||||
|
||||
public Game() {
|
||||
}
|
||||
|
||||
public Game gamePort(@javax.annotation.Nullable Integer gamePort) {
|
||||
this.gamePort = gamePort;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gamePort
|
||||
* @return gamePort
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getGamePort() {
|
||||
return gamePort;
|
||||
}
|
||||
|
||||
public void setGamePort(@javax.annotation.Nullable Integer gamePort) {
|
||||
this.gamePort = gamePort;
|
||||
}
|
||||
|
||||
|
||||
public Game queryPort(@javax.annotation.Nullable Integer queryPort) {
|
||||
this.queryPort = queryPort;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get queryPort
|
||||
* @return queryPort
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getQueryPort() {
|
||||
return queryPort;
|
||||
}
|
||||
|
||||
public void setQueryPort(@javax.annotation.Nullable Integer queryPort) {
|
||||
this.queryPort = queryPort;
|
||||
}
|
||||
|
||||
|
||||
public Game rconPort(@javax.annotation.Nullable Integer rconPort) {
|
||||
this.rconPort = rconPort;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get rconPort
|
||||
* @return rconPort
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getRconPort() {
|
||||
return rconPort;
|
||||
}
|
||||
|
||||
public void setRconPort(@javax.annotation.Nullable Integer rconPort) {
|
||||
this.rconPort = rconPort;
|
||||
}
|
||||
|
||||
|
||||
public Game serverCount(@javax.annotation.Nullable Integer serverCount) {
|
||||
this.serverCount = serverCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get serverCount
|
||||
* @return serverCount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getServerCount() {
|
||||
return serverCount;
|
||||
}
|
||||
|
||||
public void setServerCount(@javax.annotation.Nullable Integer serverCount) {
|
||||
this.serverCount = serverCount;
|
||||
}
|
||||
|
||||
|
||||
public Game steamAppId(@javax.annotation.Nullable Integer steamAppId) {
|
||||
this.steamAppId = steamAppId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get steamAppId
|
||||
* @return steamAppId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getSteamAppId() {
|
||||
return steamAppId;
|
||||
}
|
||||
|
||||
public void setSteamAppId(@javax.annotation.Nullable Integer steamAppId) {
|
||||
this.steamAppId = steamAppId;
|
||||
}
|
||||
|
||||
|
||||
public Game steamServerAppId(@javax.annotation.Nullable Integer steamServerAppId) {
|
||||
this.steamServerAppId = steamServerAppId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get steamServerAppId
|
||||
* @return steamServerAppId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getSteamServerAppId() {
|
||||
return steamServerAppId;
|
||||
}
|
||||
|
||||
public void setSteamServerAppId(@javax.annotation.Nullable Integer steamServerAppId) {
|
||||
this.steamServerAppId = steamServerAppId;
|
||||
}
|
||||
|
||||
|
||||
public Game enableServers(@javax.annotation.Nullable Boolean enableServers) {
|
||||
this.enableServers = enableServers;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get enableServers
|
||||
* @return enableServers
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Boolean getEnableServers() {
|
||||
return enableServers;
|
||||
}
|
||||
|
||||
public void setEnableServers(@javax.annotation.Nullable Boolean enableServers) {
|
||||
this.enableServers = enableServers;
|
||||
}
|
||||
|
||||
|
||||
public Game rustGamedigId(@javax.annotation.Nullable String rustGamedigId) {
|
||||
this.rustGamedigId = rustGamedigId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get rustGamedigId
|
||||
* @return rustGamedigId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getRustGamedigId() {
|
||||
return rustGamedigId;
|
||||
}
|
||||
|
||||
public void setRustGamedigId(@javax.annotation.Nullable String rustGamedigId) {
|
||||
this.rustGamedigId = rustGamedigId;
|
||||
}
|
||||
|
||||
|
||||
public Game nodeGamedigId(@javax.annotation.Nullable String nodeGamedigId) {
|
||||
this.nodeGamedigId = nodeGamedigId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nodeGamedigId
|
||||
* @return nodeGamedigId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getNodeGamedigId() {
|
||||
return nodeGamedigId;
|
||||
}
|
||||
|
||||
public void setNodeGamedigId(@javax.annotation.Nullable String nodeGamedigId) {
|
||||
this.nodeGamedigId = nodeGamedigId;
|
||||
}
|
||||
|
||||
|
||||
public Game serverConnectUrl(@javax.annotation.Nullable String serverConnectUrl) {
|
||||
this.serverConnectUrl = serverConnectUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get serverConnectUrl
|
||||
* @return serverConnectUrl
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getServerConnectUrl() {
|
||||
return serverConnectUrl;
|
||||
}
|
||||
|
||||
public void setServerConnectUrl(@javax.annotation.Nullable String serverConnectUrl) {
|
||||
this.serverConnectUrl = serverConnectUrl;
|
||||
}
|
||||
|
||||
|
||||
public Game serverTags(@javax.annotation.Nullable String serverTags) {
|
||||
this.serverTags = serverTags;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get serverTags
|
||||
* @return serverTags
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getServerTags() {
|
||||
return serverTags;
|
||||
}
|
||||
|
||||
public void setServerTags(@javax.annotation.Nullable String serverTags) {
|
||||
this.serverTags = serverTags;
|
||||
}
|
||||
|
||||
|
||||
public Game id(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
|
|
@ -592,25 +323,6 @@ public class Game {
|
|||
}
|
||||
|
||||
|
||||
public Game parentId(@javax.annotation.Nullable String parentId) {
|
||||
this.parentId = parentId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get parentId
|
||||
* @return parentId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(@javax.annotation.Nullable String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
|
||||
public Game slug(@javax.annotation.Nullable String slug) {
|
||||
this.slug = slug;
|
||||
return this;
|
||||
|
|
@ -630,139 +342,6 @@ public class Game {
|
|||
}
|
||||
|
||||
|
||||
public Game visibility(@javax.annotation.Nullable Integer visibility) {
|
||||
this.visibility = visibility;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get visibility
|
||||
* @return visibility
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getVisibility() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
public void setVisibility(@javax.annotation.Nullable Integer visibility) {
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
|
||||
public Game password(@javax.annotation.Nullable String password) {
|
||||
this.password = password;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get password
|
||||
* @return password
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(@javax.annotation.Nullable String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
|
||||
public Game primary(@javax.annotation.Nullable Integer primary) {
|
||||
this.primary = primary;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get primary
|
||||
* @return primary
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getPrimary() {
|
||||
return primary;
|
||||
}
|
||||
|
||||
public void setPrimary(@javax.annotation.Nullable Integer primary) {
|
||||
this.primary = primary;
|
||||
}
|
||||
|
||||
|
||||
public Game userCount(@javax.annotation.Nullable Integer userCount) {
|
||||
this.userCount = userCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get userCount
|
||||
* @return userCount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getUserCount() {
|
||||
return userCount;
|
||||
}
|
||||
|
||||
public void setUserCount(@javax.annotation.Nullable Integer userCount) {
|
||||
this.userCount = userCount;
|
||||
}
|
||||
|
||||
|
||||
public Game achievementCount(@javax.annotation.Nullable Integer achievementCount) {
|
||||
this.achievementCount = achievementCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get achievementCount
|
||||
* @return achievementCount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getAchievementCount() {
|
||||
return achievementCount;
|
||||
}
|
||||
|
||||
public void setAchievementCount(@javax.annotation.Nullable Integer achievementCount) {
|
||||
this.achievementCount = achievementCount;
|
||||
}
|
||||
|
||||
|
||||
public Game badgeCount(@javax.annotation.Nullable Integer badgeCount) {
|
||||
this.badgeCount = badgeCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get badgeCount
|
||||
* @return badgeCount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getBadgeCount() {
|
||||
return badgeCount;
|
||||
}
|
||||
|
||||
public void setBadgeCount(@javax.annotation.Nullable Integer badgeCount) {
|
||||
this.badgeCount = badgeCount;
|
||||
}
|
||||
|
||||
|
||||
public Game downloadCount(@javax.annotation.Nullable Integer downloadCount) {
|
||||
this.downloadCount = downloadCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get downloadCount
|
||||
* @return downloadCount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getDownloadCount() {
|
||||
return downloadCount;
|
||||
}
|
||||
|
||||
public void setDownloadCount(@javax.annotation.Nullable Integer downloadCount) {
|
||||
this.downloadCount = downloadCount;
|
||||
}
|
||||
|
||||
|
||||
public Game created(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
return this;
|
||||
|
|
@ -801,6 +380,139 @@ public class Game {
|
|||
}
|
||||
|
||||
|
||||
public Game enableServers(@javax.annotation.Nullable Boolean enableServers) {
|
||||
this.enableServers = enableServers;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get enableServers
|
||||
* @return enableServers
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Boolean getEnableServers() {
|
||||
return enableServers;
|
||||
}
|
||||
|
||||
public void setEnableServers(@javax.annotation.Nullable Boolean enableServers) {
|
||||
this.enableServers = enableServers;
|
||||
}
|
||||
|
||||
|
||||
public Game gamePort(@javax.annotation.Nullable Integer gamePort) {
|
||||
this.gamePort = gamePort;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gamePort
|
||||
* @return gamePort
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getGamePort() {
|
||||
return gamePort;
|
||||
}
|
||||
|
||||
public void setGamePort(@javax.annotation.Nullable Integer gamePort) {
|
||||
this.gamePort = gamePort;
|
||||
}
|
||||
|
||||
|
||||
public Game queryPort(@javax.annotation.Nullable Integer queryPort) {
|
||||
this.queryPort = queryPort;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get queryPort
|
||||
* @return queryPort
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getQueryPort() {
|
||||
return queryPort;
|
||||
}
|
||||
|
||||
public void setQueryPort(@javax.annotation.Nullable Integer queryPort) {
|
||||
this.queryPort = queryPort;
|
||||
}
|
||||
|
||||
|
||||
public Game rconPort(@javax.annotation.Nullable Integer rconPort) {
|
||||
this.rconPort = rconPort;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get rconPort
|
||||
* @return rconPort
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getRconPort() {
|
||||
return rconPort;
|
||||
}
|
||||
|
||||
public void setRconPort(@javax.annotation.Nullable Integer rconPort) {
|
||||
this.rconPort = rconPort;
|
||||
}
|
||||
|
||||
|
||||
public Game gamedigId(@javax.annotation.Nullable String gamedigId) {
|
||||
this.gamedigId = gamedigId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gamedigId
|
||||
* @return gamedigId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getGamedigId() {
|
||||
return gamedigId;
|
||||
}
|
||||
|
||||
public void setGamedigId(@javax.annotation.Nullable String gamedigId) {
|
||||
this.gamedigId = gamedigId;
|
||||
}
|
||||
|
||||
|
||||
public Game steamAppId(@javax.annotation.Nullable Integer steamAppId) {
|
||||
this.steamAppId = steamAppId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get steamAppId
|
||||
* @return steamAppId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getSteamAppId() {
|
||||
return steamAppId;
|
||||
}
|
||||
|
||||
public void setSteamAppId(@javax.annotation.Nullable Integer steamAppId) {
|
||||
this.steamAppId = steamAppId;
|
||||
}
|
||||
|
||||
|
||||
public Game steamServerAppId(@javax.annotation.Nullable Integer steamServerAppId) {
|
||||
this.steamServerAppId = steamServerAppId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get steamServerAppId
|
||||
* @return steamServerAppId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getSteamServerAppId() {
|
||||
return steamServerAppId;
|
||||
}
|
||||
|
||||
public void setSteamServerAppId(@javax.annotation.Nullable Integer steamServerAppId) {
|
||||
this.steamServerAppId = steamServerAppId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
|
@ -811,18 +523,7 @@ public class Game {
|
|||
return false;
|
||||
}
|
||||
Game game = (Game) o;
|
||||
return Objects.equals(this.gamePort, game.gamePort) &&
|
||||
Objects.equals(this.queryPort, game.queryPort) &&
|
||||
Objects.equals(this.rconPort, game.rconPort) &&
|
||||
Objects.equals(this.serverCount, game.serverCount) &&
|
||||
Objects.equals(this.steamAppId, game.steamAppId) &&
|
||||
Objects.equals(this.steamServerAppId, game.steamServerAppId) &&
|
||||
Objects.equals(this.enableServers, game.enableServers) &&
|
||||
Objects.equals(this.rustGamedigId, game.rustGamedigId) &&
|
||||
Objects.equals(this.nodeGamedigId, game.nodeGamedigId) &&
|
||||
Objects.equals(this.serverConnectUrl, game.serverConnectUrl) &&
|
||||
Objects.equals(this.serverTags, game.serverTags) &&
|
||||
Objects.equals(this.id, game.id) &&
|
||||
return Objects.equals(this.id, game.id) &&
|
||||
Objects.equals(this.name, game.name) &&
|
||||
Objects.equals(this.description, game.description) &&
|
||||
Objects.equals(this.type, game.type) &&
|
||||
|
|
@ -831,17 +532,16 @@ public class Game {
|
|||
Objects.equals(this.bannerUrl, game.bannerUrl) &&
|
||||
Objects.equals(this.capsuleImageUrl, game.capsuleImageUrl) &&
|
||||
Objects.equals(this.libraryImageUrl, game.libraryImageUrl) &&
|
||||
Objects.equals(this.parentId, game.parentId) &&
|
||||
Objects.equals(this.slug, game.slug) &&
|
||||
Objects.equals(this.visibility, game.visibility) &&
|
||||
Objects.equals(this.password, game.password) &&
|
||||
Objects.equals(this.primary, game.primary) &&
|
||||
Objects.equals(this.userCount, game.userCount) &&
|
||||
Objects.equals(this.achievementCount, game.achievementCount) &&
|
||||
Objects.equals(this.badgeCount, game.badgeCount) &&
|
||||
Objects.equals(this.downloadCount, game.downloadCount) &&
|
||||
Objects.equals(this.created, game.created) &&
|
||||
Objects.equals(this.updated, game.updated);
|
||||
Objects.equals(this.updated, game.updated) &&
|
||||
Objects.equals(this.enableServers, game.enableServers) &&
|
||||
Objects.equals(this.gamePort, game.gamePort) &&
|
||||
Objects.equals(this.queryPort, game.queryPort) &&
|
||||
Objects.equals(this.rconPort, game.rconPort) &&
|
||||
Objects.equals(this.gamedigId, game.gamedigId) &&
|
||||
Objects.equals(this.steamAppId, game.steamAppId) &&
|
||||
Objects.equals(this.steamServerAppId, game.steamServerAppId);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
|
|
@ -850,7 +550,7 @@ public class Game {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(gamePort, queryPort, rconPort, serverCount, steamAppId, steamServerAppId, enableServers, rustGamedigId, nodeGamedigId, serverConnectUrl, serverTags, id, name, description, type, organizationId, iconUrl, bannerUrl, capsuleImageUrl, libraryImageUrl, parentId, slug, visibility, password, primary, userCount, achievementCount, badgeCount, downloadCount, created, updated);
|
||||
return Objects.hash(id, name, description, type, organizationId, iconUrl, bannerUrl, capsuleImageUrl, libraryImageUrl, slug, created, updated, enableServers, gamePort, queryPort, rconPort, gamedigId, steamAppId, steamServerAppId);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
|
|
@ -864,17 +564,6 @@ public class Game {
|
|||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Game {\n");
|
||||
sb.append(" gamePort: ").append(toIndentedString(gamePort)).append("\n");
|
||||
sb.append(" queryPort: ").append(toIndentedString(queryPort)).append("\n");
|
||||
sb.append(" rconPort: ").append(toIndentedString(rconPort)).append("\n");
|
||||
sb.append(" serverCount: ").append(toIndentedString(serverCount)).append("\n");
|
||||
sb.append(" steamAppId: ").append(toIndentedString(steamAppId)).append("\n");
|
||||
sb.append(" steamServerAppId: ").append(toIndentedString(steamServerAppId)).append("\n");
|
||||
sb.append(" enableServers: ").append(toIndentedString(enableServers)).append("\n");
|
||||
sb.append(" rustGamedigId: ").append(toIndentedString(rustGamedigId)).append("\n");
|
||||
sb.append(" nodeGamedigId: ").append(toIndentedString(nodeGamedigId)).append("\n");
|
||||
sb.append(" serverConnectUrl: ").append(toIndentedString(serverConnectUrl)).append("\n");
|
||||
sb.append(" serverTags: ").append(toIndentedString(serverTags)).append("\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" description: ").append(toIndentedString(description)).append("\n");
|
||||
|
|
@ -884,17 +573,16 @@ public class Game {
|
|||
sb.append(" bannerUrl: ").append(toIndentedString(bannerUrl)).append("\n");
|
||||
sb.append(" capsuleImageUrl: ").append(toIndentedString(capsuleImageUrl)).append("\n");
|
||||
sb.append(" libraryImageUrl: ").append(toIndentedString(libraryImageUrl)).append("\n");
|
||||
sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n");
|
||||
sb.append(" slug: ").append(toIndentedString(slug)).append("\n");
|
||||
sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n");
|
||||
sb.append(" password: ").append(toIndentedString(password)).append("\n");
|
||||
sb.append(" primary: ").append(toIndentedString(primary)).append("\n");
|
||||
sb.append(" userCount: ").append(toIndentedString(userCount)).append("\n");
|
||||
sb.append(" achievementCount: ").append(toIndentedString(achievementCount)).append("\n");
|
||||
sb.append(" badgeCount: ").append(toIndentedString(badgeCount)).append("\n");
|
||||
sb.append(" downloadCount: ").append(toIndentedString(downloadCount)).append("\n");
|
||||
sb.append(" created: ").append(toIndentedString(created)).append("\n");
|
||||
sb.append(" updated: ").append(toIndentedString(updated)).append("\n");
|
||||
sb.append(" enableServers: ").append(toIndentedString(enableServers)).append("\n");
|
||||
sb.append(" gamePort: ").append(toIndentedString(gamePort)).append("\n");
|
||||
sb.append(" queryPort: ").append(toIndentedString(queryPort)).append("\n");
|
||||
sb.append(" rconPort: ").append(toIndentedString(rconPort)).append("\n");
|
||||
sb.append(" gamedigId: ").append(toIndentedString(gamedigId)).append("\n");
|
||||
sb.append(" steamAppId: ").append(toIndentedString(steamAppId)).append("\n");
|
||||
sb.append(" steamServerAppId: ").append(toIndentedString(steamServerAppId)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
@ -917,17 +605,6 @@ public class Game {
|
|||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("game_port");
|
||||
openapiFields.add("query_port");
|
||||
openapiFields.add("rcon_port");
|
||||
openapiFields.add("server_count");
|
||||
openapiFields.add("steam_app_id");
|
||||
openapiFields.add("steam_server_app_id");
|
||||
openapiFields.add("enable_servers");
|
||||
openapiFields.add("rust_gamedig_id");
|
||||
openapiFields.add("node_gamedig_id");
|
||||
openapiFields.add("server_connect_url");
|
||||
openapiFields.add("server_tags");
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("name");
|
||||
openapiFields.add("description");
|
||||
|
|
@ -937,20 +614,20 @@ public class Game {
|
|||
openapiFields.add("banner_url");
|
||||
openapiFields.add("capsule_image_url");
|
||||
openapiFields.add("library_image_url");
|
||||
openapiFields.add("parent_id");
|
||||
openapiFields.add("slug");
|
||||
openapiFields.add("visibility");
|
||||
openapiFields.add("password");
|
||||
openapiFields.add("primary");
|
||||
openapiFields.add("user_count");
|
||||
openapiFields.add("achievement_count");
|
||||
openapiFields.add("badge_count");
|
||||
openapiFields.add("download_count");
|
||||
openapiFields.add("created");
|
||||
openapiFields.add("updated");
|
||||
openapiFields.add("enable_servers");
|
||||
openapiFields.add("game_port");
|
||||
openapiFields.add("query_port");
|
||||
openapiFields.add("rcon_port");
|
||||
openapiFields.add("gamedig_id");
|
||||
openapiFields.add("steam_app_id");
|
||||
openapiFields.add("steam_server_app_id");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -973,19 +650,14 @@ public class Game {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Game` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : Game.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("rust_gamedig_id") != null && !jsonObj.get("rust_gamedig_id").isJsonNull()) && !jsonObj.get("rust_gamedig_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `rust_gamedig_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rust_gamedig_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("node_gamedig_id") != null && !jsonObj.get("node_gamedig_id").isJsonNull()) && !jsonObj.get("node_gamedig_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `node_gamedig_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("node_gamedig_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("server_connect_url") != null && !jsonObj.get("server_connect_url").isJsonNull()) && !jsonObj.get("server_connect_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `server_connect_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("server_connect_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("server_tags") != null && !jsonObj.get("server_tags").isJsonNull()) && !jsonObj.get("server_tags").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `server_tags` to be a primitive type in the JSON string but got `%s`", jsonObj.get("server_tags").toString()));
|
||||
}
|
||||
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()));
|
||||
}
|
||||
|
|
@ -1014,14 +686,11 @@ public class Game {
|
|||
if ((jsonObj.get("library_image_url") != null && !jsonObj.get("library_image_url").isJsonNull()) && !jsonObj.get("library_image_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `library_image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("library_image_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("parent_id") != null && !jsonObj.get("parent_id").isJsonNull()) && !jsonObj.get("parent_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `parent_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parent_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("slug") != null && !jsonObj.get("slug").isJsonNull()) && !jsonObj.get("slug").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `slug` to be a primitive type in the JSON string but got `%s`", jsonObj.get("slug").toString()));
|
||||
}
|
||||
if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString()));
|
||||
if ((jsonObj.get("gamedig_id") != null && !jsonObj.get("gamedig_id").isJsonNull()) && !jsonObj.get("gamedig_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `gamedig_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gamedig_id").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,7 +19,6 @@ 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.ServerStatus;
|
||||
import java.io.IOException;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Arrays;
|
||||
|
|
@ -51,7 +50,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* GameServer
|
||||
*/
|
||||
@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 GameServer {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
|
|
@ -68,20 +67,35 @@ public class GameServer {
|
|||
@javax.annotation.Nullable
|
||||
private String description;
|
||||
|
||||
public static final String SERIALIZED_NAME_OWNER_ID = "owner_id";
|
||||
@SerializedName(SERIALIZED_NAME_OWNER_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String ownerId;
|
||||
|
||||
public static final String SERIALIZED_NAME_ADDRESS = "address";
|
||||
@SerializedName(SERIALIZED_NAME_ADDRESS)
|
||||
@javax.annotation.Nullable
|
||||
private String address;
|
||||
|
||||
public static final String SERIALIZED_NAME_QUERY_PORT = "query_port";
|
||||
@SerializedName(SERIALIZED_NAME_QUERY_PORT)
|
||||
@javax.annotation.Nonnull
|
||||
private Integer queryPort;
|
||||
|
||||
public static final String SERIALIZED_NAME_GAME_PORT = "game_port";
|
||||
@SerializedName(SERIALIZED_NAME_GAME_PORT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer gamePort;
|
||||
|
||||
public static final String SERIALIZED_NAME_QUERY_PORT = "query_port";
|
||||
@SerializedName(SERIALIZED_NAME_QUERY_PORT)
|
||||
public static final String SERIALIZED_NAME_MAP = "map";
|
||||
@SerializedName(SERIALIZED_NAME_MAP)
|
||||
@javax.annotation.Nullable
|
||||
private Integer queryPort;
|
||||
private String map;
|
||||
|
||||
public static final String SERIALIZED_NAME_VERSION = "version";
|
||||
@SerializedName(SERIALIZED_NAME_VERSION)
|
||||
@javax.annotation.Nullable
|
||||
private String version;
|
||||
|
||||
public static final String SERIALIZED_NAME_GAME_ID = "game_id";
|
||||
@SerializedName(SERIALIZED_NAME_GAME_ID)
|
||||
|
|
@ -93,16 +107,6 @@ public class GameServer {
|
|||
@javax.annotation.Nullable
|
||||
private String gameIconUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_VERSION = "version";
|
||||
@SerializedName(SERIALIZED_NAME_VERSION)
|
||||
@javax.annotation.Nullable
|
||||
private String version;
|
||||
|
||||
public static final String SERIALIZED_NAME_FEATURED = "featured";
|
||||
@SerializedName(SERIALIZED_NAME_FEATURED)
|
||||
@javax.annotation.Nullable
|
||||
private Boolean featured;
|
||||
|
||||
public static final String SERIALIZED_NAME_CLUSTER_ID = "cluster_id";
|
||||
@SerializedName(SERIALIZED_NAME_CLUSTER_ID)
|
||||
@javax.annotation.Nullable
|
||||
|
|
@ -118,56 +122,11 @@ public class GameServer {
|
|||
@javax.annotation.Nullable
|
||||
private String bannerUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_OWNER_ID = "owner_id";
|
||||
@SerializedName(SERIALIZED_NAME_OWNER_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String ownerId;
|
||||
|
||||
public static final String SERIALIZED_NAME_UPTIME = "uptime";
|
||||
@SerializedName(SERIALIZED_NAME_UPTIME)
|
||||
@javax.annotation.Nullable
|
||||
private Double uptime;
|
||||
|
||||
public static final String SERIALIZED_NAME_STATUS = "status";
|
||||
@SerializedName(SERIALIZED_NAME_STATUS)
|
||||
@javax.annotation.Nullable
|
||||
private ServerStatus status;
|
||||
|
||||
public static final String SERIALIZED_NAME_PING = "ping";
|
||||
@SerializedName(SERIALIZED_NAME_PING)
|
||||
@javax.annotation.Nullable
|
||||
private Integer ping;
|
||||
|
||||
public static final String SERIALIZED_NAME_MAP = "map";
|
||||
@SerializedName(SERIALIZED_NAME_MAP)
|
||||
@javax.annotation.Nullable
|
||||
private String map;
|
||||
|
||||
public static final String SERIALIZED_NAME_USED_SLOTS = "used_slots";
|
||||
@SerializedName(SERIALIZED_NAME_USED_SLOTS)
|
||||
@javax.annotation.Nullable
|
||||
private Integer usedSlots;
|
||||
|
||||
public static final String SERIALIZED_NAME_MAX_SLOTS = "max_slots";
|
||||
@SerializedName(SERIALIZED_NAME_MAX_SLOTS)
|
||||
@javax.annotation.Nullable
|
||||
private Integer maxSlots;
|
||||
|
||||
public static final String SERIALIZED_NAME_MOTD = "motd";
|
||||
@SerializedName(SERIALIZED_NAME_MOTD)
|
||||
@javax.annotation.Nullable
|
||||
private String motd;
|
||||
|
||||
public static final String SERIALIZED_NAME_PLAYERS = "players";
|
||||
@SerializedName(SERIALIZED_NAME_PLAYERS)
|
||||
@javax.annotation.Nullable
|
||||
private String players;
|
||||
|
||||
public static final String SERIALIZED_NAME_LAST_ONLINE = "last_online";
|
||||
@SerializedName(SERIALIZED_NAME_LAST_ONLINE)
|
||||
@javax.annotation.Nullable
|
||||
private OffsetDateTime lastOnline;
|
||||
|
||||
public static final String SERIALIZED_NAME_COUNTRY = "country";
|
||||
@SerializedName(SERIALIZED_NAME_COUNTRY)
|
||||
@javax.annotation.Nullable
|
||||
|
|
@ -188,16 +147,6 @@ public class GameServer {
|
|||
@javax.annotation.Nullable
|
||||
private String youtubeVideoUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_TAGS = "tags";
|
||||
@SerializedName(SERIALIZED_NAME_TAGS)
|
||||
@javax.annotation.Nullable
|
||||
private String tags;
|
||||
|
||||
public static final String SERIALIZED_NAME_COMMENT_COUNT = "comment_count";
|
||||
@SerializedName(SERIALIZED_NAME_COMMENT_COUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer commentCount;
|
||||
|
||||
public static final String SERIALIZED_NAME_CREATED = "created";
|
||||
@SerializedName(SERIALIZED_NAME_CREATED)
|
||||
@javax.annotation.Nullable
|
||||
|
|
@ -268,6 +217,25 @@ public class GameServer {
|
|||
}
|
||||
|
||||
|
||||
public GameServer ownerId(@javax.annotation.Nullable String ownerId) {
|
||||
this.ownerId = ownerId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ownerId
|
||||
* @return ownerId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getOwnerId() {
|
||||
return ownerId;
|
||||
}
|
||||
|
||||
public void setOwnerId(@javax.annotation.Nullable String ownerId) {
|
||||
this.ownerId = ownerId;
|
||||
}
|
||||
|
||||
|
||||
public GameServer address(@javax.annotation.Nullable String address) {
|
||||
this.address = address;
|
||||
return this;
|
||||
|
|
@ -287,6 +255,25 @@ public class GameServer {
|
|||
}
|
||||
|
||||
|
||||
public GameServer queryPort(@javax.annotation.Nonnull Integer queryPort) {
|
||||
this.queryPort = queryPort;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get queryPort
|
||||
* @return queryPort
|
||||
*/
|
||||
@javax.annotation.Nonnull
|
||||
public Integer getQueryPort() {
|
||||
return queryPort;
|
||||
}
|
||||
|
||||
public void setQueryPort(@javax.annotation.Nonnull Integer queryPort) {
|
||||
this.queryPort = queryPort;
|
||||
}
|
||||
|
||||
|
||||
public GameServer gamePort(@javax.annotation.Nullable Integer gamePort) {
|
||||
this.gamePort = gamePort;
|
||||
return this;
|
||||
|
|
@ -306,22 +293,41 @@ public class GameServer {
|
|||
}
|
||||
|
||||
|
||||
public GameServer queryPort(@javax.annotation.Nullable Integer queryPort) {
|
||||
this.queryPort = queryPort;
|
||||
public GameServer map(@javax.annotation.Nullable String map) {
|
||||
this.map = map;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get queryPort
|
||||
* @return queryPort
|
||||
* Get map
|
||||
* @return map
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getQueryPort() {
|
||||
return queryPort;
|
||||
public String getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
public void setQueryPort(@javax.annotation.Nullable Integer queryPort) {
|
||||
this.queryPort = queryPort;
|
||||
public void setMap(@javax.annotation.Nullable String map) {
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
|
||||
public GameServer version(@javax.annotation.Nullable String version) {
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get version
|
||||
* @return version
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(@javax.annotation.Nullable String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -363,44 +369,6 @@ public class GameServer {
|
|||
}
|
||||
|
||||
|
||||
public GameServer version(@javax.annotation.Nullable String version) {
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get version
|
||||
* @return version
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(@javax.annotation.Nullable String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
|
||||
public GameServer featured(@javax.annotation.Nullable Boolean featured) {
|
||||
this.featured = featured;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get featured
|
||||
* @return featured
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Boolean getFeatured() {
|
||||
return featured;
|
||||
}
|
||||
|
||||
public void setFeatured(@javax.annotation.Nullable Boolean featured) {
|
||||
this.featured = featured;
|
||||
}
|
||||
|
||||
|
||||
public GameServer clusterId(@javax.annotation.Nullable String clusterId) {
|
||||
this.clusterId = clusterId;
|
||||
return this;
|
||||
|
|
@ -458,25 +426,6 @@ public class GameServer {
|
|||
}
|
||||
|
||||
|
||||
public GameServer ownerId(@javax.annotation.Nullable String ownerId) {
|
||||
this.ownerId = ownerId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ownerId
|
||||
* @return ownerId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getOwnerId() {
|
||||
return ownerId;
|
||||
}
|
||||
|
||||
public void setOwnerId(@javax.annotation.Nullable String ownerId) {
|
||||
this.ownerId = ownerId;
|
||||
}
|
||||
|
||||
|
||||
public GameServer uptime(@javax.annotation.Nullable Double uptime) {
|
||||
this.uptime = uptime;
|
||||
return this;
|
||||
|
|
@ -496,158 +445,6 @@ public class GameServer {
|
|||
}
|
||||
|
||||
|
||||
public GameServer status(@javax.annotation.Nullable ServerStatus status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status
|
||||
* @return status
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public ServerStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(@javax.annotation.Nullable ServerStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
public GameServer ping(@javax.annotation.Nullable Integer ping) {
|
||||
this.ping = ping;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ping
|
||||
* @return ping
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getPing() {
|
||||
return ping;
|
||||
}
|
||||
|
||||
public void setPing(@javax.annotation.Nullable Integer ping) {
|
||||
this.ping = ping;
|
||||
}
|
||||
|
||||
|
||||
public GameServer map(@javax.annotation.Nullable String map) {
|
||||
this.map = map;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get map
|
||||
* @return map
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
public void setMap(@javax.annotation.Nullable String map) {
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
|
||||
public GameServer usedSlots(@javax.annotation.Nullable Integer usedSlots) {
|
||||
this.usedSlots = usedSlots;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get usedSlots
|
||||
* @return usedSlots
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getUsedSlots() {
|
||||
return usedSlots;
|
||||
}
|
||||
|
||||
public void setUsedSlots(@javax.annotation.Nullable Integer usedSlots) {
|
||||
this.usedSlots = usedSlots;
|
||||
}
|
||||
|
||||
|
||||
public GameServer maxSlots(@javax.annotation.Nullable Integer maxSlots) {
|
||||
this.maxSlots = maxSlots;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get maxSlots
|
||||
* @return maxSlots
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getMaxSlots() {
|
||||
return maxSlots;
|
||||
}
|
||||
|
||||
public void setMaxSlots(@javax.annotation.Nullable Integer maxSlots) {
|
||||
this.maxSlots = maxSlots;
|
||||
}
|
||||
|
||||
|
||||
public GameServer motd(@javax.annotation.Nullable String motd) {
|
||||
this.motd = motd;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get motd
|
||||
* @return motd
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getMotd() {
|
||||
return motd;
|
||||
}
|
||||
|
||||
public void setMotd(@javax.annotation.Nullable String motd) {
|
||||
this.motd = motd;
|
||||
}
|
||||
|
||||
|
||||
public GameServer players(@javax.annotation.Nullable String players) {
|
||||
this.players = players;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get players
|
||||
* @return players
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getPlayers() {
|
||||
return players;
|
||||
}
|
||||
|
||||
public void setPlayers(@javax.annotation.Nullable String players) {
|
||||
this.players = players;
|
||||
}
|
||||
|
||||
|
||||
public GameServer lastOnline(@javax.annotation.Nullable OffsetDateTime lastOnline) {
|
||||
this.lastOnline = lastOnline;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lastOnline
|
||||
* @return lastOnline
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public OffsetDateTime getLastOnline() {
|
||||
return lastOnline;
|
||||
}
|
||||
|
||||
public void setLastOnline(@javax.annotation.Nullable OffsetDateTime lastOnline) {
|
||||
this.lastOnline = lastOnline;
|
||||
}
|
||||
|
||||
|
||||
public GameServer country(@javax.annotation.Nullable String country) {
|
||||
this.country = country;
|
||||
return this;
|
||||
|
|
@ -724,44 +521,6 @@ public class GameServer {
|
|||
}
|
||||
|
||||
|
||||
public GameServer tags(@javax.annotation.Nullable String tags) {
|
||||
this.tags = tags;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tags
|
||||
* @return tags
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getTags() {
|
||||
return tags;
|
||||
}
|
||||
|
||||
public void setTags(@javax.annotation.Nullable String tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
|
||||
public GameServer commentCount(@javax.annotation.Nullable Integer commentCount) {
|
||||
this.commentCount = commentCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get commentCount
|
||||
* @return commentCount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getCommentCount() {
|
||||
return commentCount;
|
||||
}
|
||||
|
||||
public void setCommentCount(@javax.annotation.Nullable Integer commentCount) {
|
||||
this.commentCount = commentCount;
|
||||
}
|
||||
|
||||
|
||||
public GameServer created(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
return this;
|
||||
|
|
@ -813,32 +572,22 @@ public class GameServer {
|
|||
return Objects.equals(this.id, gameServer.id) &&
|
||||
Objects.equals(this.name, gameServer.name) &&
|
||||
Objects.equals(this.description, gameServer.description) &&
|
||||
Objects.equals(this.ownerId, gameServer.ownerId) &&
|
||||
Objects.equals(this.address, gameServer.address) &&
|
||||
Objects.equals(this.gamePort, gameServer.gamePort) &&
|
||||
Objects.equals(this.queryPort, gameServer.queryPort) &&
|
||||
Objects.equals(this.gamePort, gameServer.gamePort) &&
|
||||
Objects.equals(this.map, gameServer.map) &&
|
||||
Objects.equals(this.version, gameServer.version) &&
|
||||
Objects.equals(this.gameId, gameServer.gameId) &&
|
||||
Objects.equals(this.gameIconUrl, gameServer.gameIconUrl) &&
|
||||
Objects.equals(this.version, gameServer.version) &&
|
||||
Objects.equals(this.featured, gameServer.featured) &&
|
||||
Objects.equals(this.clusterId, gameServer.clusterId) &&
|
||||
Objects.equals(this.websiteUrl, gameServer.websiteUrl) &&
|
||||
Objects.equals(this.bannerUrl, gameServer.bannerUrl) &&
|
||||
Objects.equals(this.ownerId, gameServer.ownerId) &&
|
||||
Objects.equals(this.uptime, gameServer.uptime) &&
|
||||
Objects.equals(this.status, gameServer.status) &&
|
||||
Objects.equals(this.ping, gameServer.ping) &&
|
||||
Objects.equals(this.map, gameServer.map) &&
|
||||
Objects.equals(this.usedSlots, gameServer.usedSlots) &&
|
||||
Objects.equals(this.maxSlots, gameServer.maxSlots) &&
|
||||
Objects.equals(this.motd, gameServer.motd) &&
|
||||
Objects.equals(this.players, gameServer.players) &&
|
||||
Objects.equals(this.lastOnline, gameServer.lastOnline) &&
|
||||
Objects.equals(this.country, gameServer.country) &&
|
||||
Objects.equals(this.steam, gameServer.steam) &&
|
||||
Objects.equals(this.discordServerId, gameServer.discordServerId) &&
|
||||
Objects.equals(this.youtubeVideoUrl, gameServer.youtubeVideoUrl) &&
|
||||
Objects.equals(this.tags, gameServer.tags) &&
|
||||
Objects.equals(this.commentCount, gameServer.commentCount) &&
|
||||
Objects.equals(this.created, gameServer.created) &&
|
||||
Objects.equals(this.updated, gameServer.updated);
|
||||
}
|
||||
|
|
@ -849,7 +598,7 @@ public class GameServer {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, description, address, gamePort, queryPort, gameId, gameIconUrl, version, featured, clusterId, websiteUrl, bannerUrl, ownerId, uptime, status, ping, map, usedSlots, maxSlots, motd, players, lastOnline, country, steam, discordServerId, youtubeVideoUrl, tags, commentCount, created, updated);
|
||||
return Objects.hash(id, name, description, ownerId, address, queryPort, gamePort, map, version, gameId, gameIconUrl, clusterId, websiteUrl, bannerUrl, uptime, country, steam, discordServerId, youtubeVideoUrl, created, updated);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
|
|
@ -866,32 +615,22 @@ public class GameServer {
|
|||
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(" ownerId: ").append(toIndentedString(ownerId)).append("\n");
|
||||
sb.append(" address: ").append(toIndentedString(address)).append("\n");
|
||||
sb.append(" gamePort: ").append(toIndentedString(gamePort)).append("\n");
|
||||
sb.append(" queryPort: ").append(toIndentedString(queryPort)).append("\n");
|
||||
sb.append(" gamePort: ").append(toIndentedString(gamePort)).append("\n");
|
||||
sb.append(" map: ").append(toIndentedString(map)).append("\n");
|
||||
sb.append(" version: ").append(toIndentedString(version)).append("\n");
|
||||
sb.append(" gameId: ").append(toIndentedString(gameId)).append("\n");
|
||||
sb.append(" gameIconUrl: ").append(toIndentedString(gameIconUrl)).append("\n");
|
||||
sb.append(" version: ").append(toIndentedString(version)).append("\n");
|
||||
sb.append(" featured: ").append(toIndentedString(featured)).append("\n");
|
||||
sb.append(" clusterId: ").append(toIndentedString(clusterId)).append("\n");
|
||||
sb.append(" websiteUrl: ").append(toIndentedString(websiteUrl)).append("\n");
|
||||
sb.append(" bannerUrl: ").append(toIndentedString(bannerUrl)).append("\n");
|
||||
sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n");
|
||||
sb.append(" uptime: ").append(toIndentedString(uptime)).append("\n");
|
||||
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||||
sb.append(" ping: ").append(toIndentedString(ping)).append("\n");
|
||||
sb.append(" map: ").append(toIndentedString(map)).append("\n");
|
||||
sb.append(" usedSlots: ").append(toIndentedString(usedSlots)).append("\n");
|
||||
sb.append(" maxSlots: ").append(toIndentedString(maxSlots)).append("\n");
|
||||
sb.append(" motd: ").append(toIndentedString(motd)).append("\n");
|
||||
sb.append(" players: ").append(toIndentedString(players)).append("\n");
|
||||
sb.append(" lastOnline: ").append(toIndentedString(lastOnline)).append("\n");
|
||||
sb.append(" country: ").append(toIndentedString(country)).append("\n");
|
||||
sb.append(" steam: ").append(toIndentedString(steam)).append("\n");
|
||||
sb.append(" discordServerId: ").append(toIndentedString(discordServerId)).append("\n");
|
||||
sb.append(" youtubeVideoUrl: ").append(toIndentedString(youtubeVideoUrl)).append("\n");
|
||||
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
|
||||
sb.append(" commentCount: ").append(toIndentedString(commentCount)).append("\n");
|
||||
sb.append(" created: ").append(toIndentedString(created)).append("\n");
|
||||
sb.append(" updated: ").append(toIndentedString(updated)).append("\n");
|
||||
sb.append("}");
|
||||
|
|
@ -919,37 +658,30 @@ public class GameServer {
|
|||
openapiFields.add("id");
|
||||
openapiFields.add("name");
|
||||
openapiFields.add("description");
|
||||
openapiFields.add("owner_id");
|
||||
openapiFields.add("address");
|
||||
openapiFields.add("game_port");
|
||||
openapiFields.add("query_port");
|
||||
openapiFields.add("game_port");
|
||||
openapiFields.add("map");
|
||||
openapiFields.add("version");
|
||||
openapiFields.add("game_id");
|
||||
openapiFields.add("game_icon_url");
|
||||
openapiFields.add("version");
|
||||
openapiFields.add("featured");
|
||||
openapiFields.add("cluster_id");
|
||||
openapiFields.add("website_url");
|
||||
openapiFields.add("banner_url");
|
||||
openapiFields.add("owner_id");
|
||||
openapiFields.add("uptime");
|
||||
openapiFields.add("status");
|
||||
openapiFields.add("ping");
|
||||
openapiFields.add("map");
|
||||
openapiFields.add("used_slots");
|
||||
openapiFields.add("max_slots");
|
||||
openapiFields.add("motd");
|
||||
openapiFields.add("players");
|
||||
openapiFields.add("last_online");
|
||||
openapiFields.add("country");
|
||||
openapiFields.add("steam");
|
||||
openapiFields.add("discord_server_id");
|
||||
openapiFields.add("youtube_video_url");
|
||||
openapiFields.add("tags");
|
||||
openapiFields.add("comment_count");
|
||||
openapiFields.add("created");
|
||||
openapiFields.add("updated");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
openapiRequiredFields.add("address");
|
||||
openapiRequiredFields.add("query_port");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -972,6 +704,13 @@ public class GameServer {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GameServer` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : GameServer.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()));
|
||||
|
|
@ -982,18 +721,24 @@ public class GameServer {
|
|||
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("owner_id") != null && !jsonObj.get("owner_id").isJsonNull()) && !jsonObj.get("owner_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `owner_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString()));
|
||||
}
|
||||
if ((jsonObj.get("map") != null && !jsonObj.get("map").isJsonNull()) && !jsonObj.get("map").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `map` to be a primitive type in the JSON string but got `%s`", jsonObj.get("map").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("game_id") != null && !jsonObj.get("game_id").isJsonNull()) && !jsonObj.get("game_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `game_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("game_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("game_icon_url") != null && !jsonObj.get("game_icon_url").isJsonNull()) && !jsonObj.get("game_icon_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `game_icon_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("game_icon_url").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("cluster_id") != null && !jsonObj.get("cluster_id").isJsonNull()) && !jsonObj.get("cluster_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `cluster_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cluster_id").toString()));
|
||||
}
|
||||
|
|
@ -1003,22 +748,6 @@ public class GameServer {
|
|||
if ((jsonObj.get("banner_url") != null && !jsonObj.get("banner_url").isJsonNull()) && !jsonObj.get("banner_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `banner_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("banner_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("owner_id") != null && !jsonObj.get("owner_id").isJsonNull()) && !jsonObj.get("owner_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `owner_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner_id").toString()));
|
||||
}
|
||||
// validate the optional field `status`
|
||||
if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) {
|
||||
ServerStatus.validateJsonElement(jsonObj.get("status"));
|
||||
}
|
||||
if ((jsonObj.get("map") != null && !jsonObj.get("map").isJsonNull()) && !jsonObj.get("map").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `map` to be a primitive type in the JSON string but got `%s`", jsonObj.get("map").toString()));
|
||||
}
|
||||
if ((jsonObj.get("motd") != null && !jsonObj.get("motd").isJsonNull()) && !jsonObj.get("motd").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `motd` to be a primitive type in the JSON string but got `%s`", jsonObj.get("motd").toString()));
|
||||
}
|
||||
if ((jsonObj.get("players") != null && !jsonObj.get("players").isJsonNull()) && !jsonObj.get("players").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `players` to be a primitive type in the JSON string but got `%s`", jsonObj.get("players").toString()));
|
||||
}
|
||||
if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString()));
|
||||
}
|
||||
|
|
@ -1028,9 +757,6 @@ public class GameServer {
|
|||
if ((jsonObj.get("youtube_video_url") != null && !jsonObj.get("youtube_video_url").isJsonNull()) && !jsonObj.get("youtube_video_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `youtube_video_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("youtube_video_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) && !jsonObj.get("tags").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `tags` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tags").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -51,7 +51,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* GameServerCluster
|
||||
*/
|
||||
@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 GameServerCluster {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
|
|
@ -491,6 +491,7 @@ public class GameServerCluster {
|
|||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -513,6 +514,13 @@ public class GameServerCluster {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GameServerCluster` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : GameServerCluster.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()));
|
||||
|
|
|
|||
419
src/main/java/com/tribufu/generated/models/GameServerQuery.java
Normal file
419
src/main/java/com/tribufu/generated/models/GameServerQuery.java
Normal file
|
|
@ -0,0 +1,419 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* 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).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package com.tribufu.generated.models;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.tribufu.generated.models.GameServerStatus;
|
||||
import java.io.IOException;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Arrays;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* GameServerQuery
|
||||
*/
|
||||
@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 GameServerQuery {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String id;
|
||||
|
||||
public static final String SERIALIZED_NAME_SERVER_ID = "server_id";
|
||||
@SerializedName(SERIALIZED_NAME_SERVER_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String serverId;
|
||||
|
||||
public static final String SERIALIZED_NAME_STATUS = "status";
|
||||
@SerializedName(SERIALIZED_NAME_STATUS)
|
||||
@javax.annotation.Nullable
|
||||
private GameServerStatus status;
|
||||
|
||||
public static final String SERIALIZED_NAME_PING = "ping";
|
||||
@SerializedName(SERIALIZED_NAME_PING)
|
||||
@javax.annotation.Nullable
|
||||
private Integer ping;
|
||||
|
||||
public static final String SERIALIZED_NAME_CURRENT_PLAYERS = "current_players";
|
||||
@SerializedName(SERIALIZED_NAME_CURRENT_PLAYERS)
|
||||
@javax.annotation.Nullable
|
||||
private Integer currentPlayers;
|
||||
|
||||
public static final String SERIALIZED_NAME_MAX_PLAYERS = "max_players";
|
||||
@SerializedName(SERIALIZED_NAME_MAX_PLAYERS)
|
||||
@javax.annotation.Nullable
|
||||
private Integer maxPlayers;
|
||||
|
||||
public static final String SERIALIZED_NAME_MOTD = "motd";
|
||||
@SerializedName(SERIALIZED_NAME_MOTD)
|
||||
@javax.annotation.Nullable
|
||||
private String motd;
|
||||
|
||||
public static final String SERIALIZED_NAME_CREATED = "created";
|
||||
@SerializedName(SERIALIZED_NAME_CREATED)
|
||||
@javax.annotation.Nullable
|
||||
private OffsetDateTime created;
|
||||
|
||||
public GameServerQuery() {
|
||||
}
|
||||
|
||||
public GameServerQuery id(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public GameServerQuery serverId(@javax.annotation.Nullable String serverId) {
|
||||
this.serverId = serverId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get serverId
|
||||
* @return serverId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getServerId() {
|
||||
return serverId;
|
||||
}
|
||||
|
||||
public void setServerId(@javax.annotation.Nullable String serverId) {
|
||||
this.serverId = serverId;
|
||||
}
|
||||
|
||||
|
||||
public GameServerQuery status(@javax.annotation.Nullable GameServerStatus status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status
|
||||
* @return status
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public GameServerStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(@javax.annotation.Nullable GameServerStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
public GameServerQuery ping(@javax.annotation.Nullable Integer ping) {
|
||||
this.ping = ping;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ping
|
||||
* @return ping
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getPing() {
|
||||
return ping;
|
||||
}
|
||||
|
||||
public void setPing(@javax.annotation.Nullable Integer ping) {
|
||||
this.ping = ping;
|
||||
}
|
||||
|
||||
|
||||
public GameServerQuery currentPlayers(@javax.annotation.Nullable Integer currentPlayers) {
|
||||
this.currentPlayers = currentPlayers;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get currentPlayers
|
||||
* @return currentPlayers
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getCurrentPlayers() {
|
||||
return currentPlayers;
|
||||
}
|
||||
|
||||
public void setCurrentPlayers(@javax.annotation.Nullable Integer currentPlayers) {
|
||||
this.currentPlayers = currentPlayers;
|
||||
}
|
||||
|
||||
|
||||
public GameServerQuery maxPlayers(@javax.annotation.Nullable Integer maxPlayers) {
|
||||
this.maxPlayers = maxPlayers;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get maxPlayers
|
||||
* @return maxPlayers
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getMaxPlayers() {
|
||||
return maxPlayers;
|
||||
}
|
||||
|
||||
public void setMaxPlayers(@javax.annotation.Nullable Integer maxPlayers) {
|
||||
this.maxPlayers = maxPlayers;
|
||||
}
|
||||
|
||||
|
||||
public GameServerQuery motd(@javax.annotation.Nullable String motd) {
|
||||
this.motd = motd;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get motd
|
||||
* @return motd
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getMotd() {
|
||||
return motd;
|
||||
}
|
||||
|
||||
public void setMotd(@javax.annotation.Nullable String motd) {
|
||||
this.motd = motd;
|
||||
}
|
||||
|
||||
|
||||
public GameServerQuery created(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
* @return created
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public OffsetDateTime getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
public void setCreated(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GameServerQuery gameServerQuery = (GameServerQuery) o;
|
||||
return Objects.equals(this.id, gameServerQuery.id) &&
|
||||
Objects.equals(this.serverId, gameServerQuery.serverId) &&
|
||||
Objects.equals(this.status, gameServerQuery.status) &&
|
||||
Objects.equals(this.ping, gameServerQuery.ping) &&
|
||||
Objects.equals(this.currentPlayers, gameServerQuery.currentPlayers) &&
|
||||
Objects.equals(this.maxPlayers, gameServerQuery.maxPlayers) &&
|
||||
Objects.equals(this.motd, gameServerQuery.motd) &&
|
||||
Objects.equals(this.created, gameServerQuery.created);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, serverId, status, ping, currentPlayers, maxPlayers, motd, created);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class GameServerQuery {\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" serverId: ").append(toIndentedString(serverId)).append("\n");
|
||||
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||||
sb.append(" ping: ").append(toIndentedString(ping)).append("\n");
|
||||
sb.append(" currentPlayers: ").append(toIndentedString(currentPlayers)).append("\n");
|
||||
sb.append(" maxPlayers: ").append(toIndentedString(maxPlayers)).append("\n");
|
||||
sb.append(" motd: ").append(toIndentedString(motd)).append("\n");
|
||||
sb.append(" created: ").append(toIndentedString(created)).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(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public static HashSet<String> openapiFields;
|
||||
public static HashSet<String> openapiRequiredFields;
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("server_id");
|
||||
openapiFields.add("status");
|
||||
openapiFields.add("ping");
|
||||
openapiFields.add("current_players");
|
||||
openapiFields.add("max_players");
|
||||
openapiFields.add("motd");
|
||||
openapiFields.add("created");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to GameServerQuery
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!GameServerQuery.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in GameServerQuery is not found in the empty JSON string", GameServerQuery.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!GameServerQuery.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GameServerQuery` properties. JSON: %s", entry.getKey(), 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()));
|
||||
}
|
||||
if ((jsonObj.get("server_id") != null && !jsonObj.get("server_id").isJsonNull()) && !jsonObj.get("server_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `server_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("server_id").toString()));
|
||||
}
|
||||
// validate the optional field `status`
|
||||
if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) {
|
||||
GameServerStatus.validateJsonElement(jsonObj.get("status"));
|
||||
}
|
||||
if ((jsonObj.get("motd") != null && !jsonObj.get("motd").isJsonNull()) && !jsonObj.get("motd").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `motd` to be a primitive type in the JSON string but got `%s`", jsonObj.get("motd").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!GameServerQuery.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'GameServerQuery' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<GameServerQuery> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(GameServerQuery.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<GameServerQuery>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, GameServerQuery value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GameServerQuery read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
}
|
||||
|
||||
}.nullSafe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of GameServerQuery given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of GameServerQuery
|
||||
* @throws IOException if the JSON string is invalid with respect to GameServerQuery
|
||||
*/
|
||||
public static GameServerQuery fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, GameServerQuery.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of GameServerQuery to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
public String toJson() {
|
||||
return JSON.getGson().toJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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).
|
||||
|
|
@ -24,10 +24,10 @@ import com.google.gson.stream.JsonReader;
|
|||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
/**
|
||||
* Gets or Sets ServerStatus
|
||||
* Gets or Sets GameServerStatus
|
||||
*/
|
||||
@JsonAdapter(ServerStatus.Adapter.class)
|
||||
public enum ServerStatus {
|
||||
@JsonAdapter(GameServerStatus.Adapter.class)
|
||||
public enum GameServerStatus {
|
||||
|
||||
UNKNOWN("unknown"),
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ public enum ServerStatus {
|
|||
|
||||
private String value;
|
||||
|
||||
ServerStatus(String value) {
|
||||
GameServerStatus(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
|
|
@ -50,8 +50,8 @@ public enum ServerStatus {
|
|||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static ServerStatus fromValue(String value) {
|
||||
for (ServerStatus b : ServerStatus.values()) {
|
||||
public static GameServerStatus fromValue(String value) {
|
||||
for (GameServerStatus b : GameServerStatus.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
|
|
@ -59,22 +59,22 @@ public enum ServerStatus {
|
|||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<ServerStatus> {
|
||||
public static class Adapter extends TypeAdapter<GameServerStatus> {
|
||||
@Override
|
||||
public void write(final JsonWriter jsonWriter, final ServerStatus enumeration) throws IOException {
|
||||
public void write(final JsonWriter jsonWriter, final GameServerStatus enumeration) throws IOException {
|
||||
jsonWriter.value(enumeration.getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerStatus read(final JsonReader jsonReader) throws IOException {
|
||||
public GameServerStatus read(final JsonReader jsonReader) throws IOException {
|
||||
String value = jsonReader.nextString();
|
||||
return ServerStatus.fromValue(value);
|
||||
return GameServerStatus.fromValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
String value = jsonElement.getAsString();
|
||||
ServerStatus.fromValue(value);
|
||||
GameServerStatus.fromValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -51,7 +51,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* Group
|
||||
*/
|
||||
@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 Group {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
|
|
@ -545,6 +545,7 @@ public class Group {
|
|||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -567,6 +568,13 @@ public class Group {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Group` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : Group.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()));
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -50,13 +50,13 @@ import java.util.Set;
|
|||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* GroupGame
|
||||
* GroupApplication
|
||||
*/
|
||||
@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")
|
||||
public class GroupGame {
|
||||
@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 GroupApplication {
|
||||
public static final String SERIALIZED_NAME_GROUP_ID = "group_id";
|
||||
@SerializedName(SERIALIZED_NAME_GROUP_ID)
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
private String groupId;
|
||||
|
||||
public static final String SERIALIZED_NAME_GROUP = "group";
|
||||
|
|
@ -89,10 +89,10 @@ public class GroupGame {
|
|||
@javax.annotation.Nullable
|
||||
private OffsetDateTime lastUsed;
|
||||
|
||||
public GroupGame() {
|
||||
public GroupApplication() {
|
||||
}
|
||||
|
||||
public GroupGame groupId(@javax.annotation.Nullable String groupId) {
|
||||
public GroupApplication groupId(@javax.annotation.Nonnull String groupId) {
|
||||
this.groupId = groupId;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -101,17 +101,17 @@ public class GroupGame {
|
|||
* Get groupId
|
||||
* @return groupId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
public String getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(@javax.annotation.Nullable String groupId) {
|
||||
public void setGroupId(@javax.annotation.Nonnull String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
|
||||
public GroupGame group(@javax.annotation.Nullable Group group) {
|
||||
public GroupApplication group(@javax.annotation.Nullable Group group) {
|
||||
this.group = group;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -130,7 +130,7 @@ public class GroupGame {
|
|||
}
|
||||
|
||||
|
||||
public GroupGame applicationId(@javax.annotation.Nullable String applicationId) {
|
||||
public GroupApplication applicationId(@javax.annotation.Nullable String applicationId) {
|
||||
this.applicationId = applicationId;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -149,7 +149,7 @@ public class GroupGame {
|
|||
}
|
||||
|
||||
|
||||
public GroupGame application(@javax.annotation.Nullable Application application) {
|
||||
public GroupApplication application(@javax.annotation.Nullable Application application) {
|
||||
this.application = application;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ public class GroupGame {
|
|||
}
|
||||
|
||||
|
||||
public GroupGame stats(@javax.annotation.Nullable Object stats) {
|
||||
public GroupApplication stats(@javax.annotation.Nullable Object stats) {
|
||||
this.stats = stats;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -187,7 +187,7 @@ public class GroupGame {
|
|||
}
|
||||
|
||||
|
||||
public GroupGame acquired(@javax.annotation.Nullable OffsetDateTime acquired) {
|
||||
public GroupApplication acquired(@javax.annotation.Nullable OffsetDateTime acquired) {
|
||||
this.acquired = acquired;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -206,7 +206,7 @@ public class GroupGame {
|
|||
}
|
||||
|
||||
|
||||
public GroupGame lastUsed(@javax.annotation.Nullable OffsetDateTime lastUsed) {
|
||||
public GroupApplication lastUsed(@javax.annotation.Nullable OffsetDateTime lastUsed) {
|
||||
this.lastUsed = lastUsed;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -234,14 +234,14 @@ public class GroupGame {
|
|||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GroupGame groupGame = (GroupGame) o;
|
||||
return Objects.equals(this.groupId, groupGame.groupId) &&
|
||||
Objects.equals(this.group, groupGame.group) &&
|
||||
Objects.equals(this.applicationId, groupGame.applicationId) &&
|
||||
Objects.equals(this.application, groupGame.application) &&
|
||||
Objects.equals(this.stats, groupGame.stats) &&
|
||||
Objects.equals(this.acquired, groupGame.acquired) &&
|
||||
Objects.equals(this.lastUsed, groupGame.lastUsed);
|
||||
GroupApplication groupApplication = (GroupApplication) o;
|
||||
return Objects.equals(this.groupId, groupApplication.groupId) &&
|
||||
Objects.equals(this.group, groupApplication.group) &&
|
||||
Objects.equals(this.applicationId, groupApplication.applicationId) &&
|
||||
Objects.equals(this.application, groupApplication.application) &&
|
||||
Objects.equals(this.stats, groupApplication.stats) &&
|
||||
Objects.equals(this.acquired, groupApplication.acquired) &&
|
||||
Objects.equals(this.lastUsed, groupApplication.lastUsed);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
|
|
@ -263,7 +263,7 @@ public class GroupGame {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class GroupGame {\n");
|
||||
sb.append("class GroupApplication {\n");
|
||||
sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n");
|
||||
sb.append(" group: ").append(toIndentedString(group)).append("\n");
|
||||
sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n");
|
||||
|
|
@ -303,30 +303,38 @@ public class GroupGame {
|
|||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("group_id");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to GroupGame
|
||||
* @throws IOException if the JSON Element is invalid with respect to GroupApplication
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!GroupGame.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in GroupGame is not found in the empty JSON string", GroupGame.openapiRequiredFields.toString()));
|
||||
if (!GroupApplication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in GroupApplication is not found in the empty JSON string", GroupApplication.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!GroupGame.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupGame` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
if (!GroupApplication.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupApplication` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : GroupApplication.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("group_id") != null && !jsonObj.get("group_id").isJsonNull()) && !jsonObj.get("group_id").isJsonPrimitive()) {
|
||||
if (!jsonObj.get("group_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `group_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("group_id").toString()));
|
||||
}
|
||||
// validate the optional field `group`
|
||||
|
|
@ -346,22 +354,22 @@ public class GroupGame {
|
|||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!GroupGame.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'GroupGame' and its subtypes
|
||||
if (!GroupApplication.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'GroupApplication' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<GroupGame> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(GroupGame.class));
|
||||
final TypeAdapter<GroupApplication> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(GroupApplication.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<GroupGame>() {
|
||||
return (TypeAdapter<T>) new TypeAdapter<GroupApplication>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, GroupGame value) throws IOException {
|
||||
public void write(JsonWriter out, GroupApplication value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GroupGame read(JsonReader in) throws IOException {
|
||||
public GroupApplication read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
|
|
@ -372,18 +380,18 @@ public class GroupGame {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create an instance of GroupGame given an JSON string
|
||||
* Create an instance of GroupApplication given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of GroupGame
|
||||
* @throws IOException if the JSON string is invalid with respect to GroupGame
|
||||
* @return An instance of GroupApplication
|
||||
* @throws IOException if the JSON string is invalid with respect to GroupApplication
|
||||
*/
|
||||
public static GroupGame fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, GroupGame.class);
|
||||
public static GroupApplication fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, GroupApplication.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of GroupGame to an JSON string
|
||||
* Convert an instance of GroupApplication to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
|
|
@ -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).
|
||||
|
|
@ -52,7 +52,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* GroupMember
|
||||
*/
|
||||
@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 GroupMember {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -21,7 +21,6 @@ import com.google.gson.stream.JsonReader;
|
|||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
|
@ -49,7 +48,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* HashViewModel
|
||||
*/
|
||||
@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 HashViewModel {
|
||||
public static final String SERIALIZED_NAME_VALUE = "value";
|
||||
@SerializedName(SERIALIZED_NAME_VALUE)
|
||||
|
|
@ -91,22 +90,11 @@ public class HashViewModel {
|
|||
return Objects.equals(this.value, hashViewModel.value);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(value);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
|
@ -138,6 +126,7 @@ public class HashViewModel {
|
|||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("value");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -160,6 +149,13 @@ public class HashViewModel {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HashViewModel` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : HashViewModel.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("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString()));
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -22,7 +22,6 @@ import com.google.gson.stream.JsonWriter;
|
|||
import com.tribufu.generated.models.TokenHintType;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
|
@ -50,7 +49,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* IntrospectRequest
|
||||
*/
|
||||
@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 IntrospectRequest {
|
||||
public static final String SERIALIZED_NAME_TOKEN = "token";
|
||||
@SerializedName(SERIALIZED_NAME_TOKEN)
|
||||
|
|
@ -59,7 +58,7 @@ public class IntrospectRequest {
|
|||
|
||||
public static final String SERIALIZED_NAME_TOKEN_TYPE_HINT = "token_type_hint";
|
||||
@SerializedName(SERIALIZED_NAME_TOKEN_TYPE_HINT)
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
private TokenHintType tokenTypeHint;
|
||||
|
||||
public IntrospectRequest() {
|
||||
|
|
@ -84,7 +83,7 @@ public class IntrospectRequest {
|
|||
}
|
||||
|
||||
|
||||
public IntrospectRequest tokenTypeHint(@javax.annotation.Nullable TokenHintType tokenTypeHint) {
|
||||
public IntrospectRequest tokenTypeHint(@javax.annotation.Nonnull TokenHintType tokenTypeHint) {
|
||||
this.tokenTypeHint = tokenTypeHint;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -93,12 +92,12 @@ public class IntrospectRequest {
|
|||
* Get tokenTypeHint
|
||||
* @return tokenTypeHint
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
public TokenHintType getTokenTypeHint() {
|
||||
return tokenTypeHint;
|
||||
}
|
||||
|
||||
public void setTokenTypeHint(@javax.annotation.Nullable TokenHintType tokenTypeHint) {
|
||||
public void setTokenTypeHint(@javax.annotation.Nonnull TokenHintType tokenTypeHint) {
|
||||
this.tokenTypeHint = tokenTypeHint;
|
||||
}
|
||||
|
||||
|
|
@ -117,22 +116,11 @@ public class IntrospectRequest {
|
|||
Objects.equals(this.tokenTypeHint, introspectRequest.tokenTypeHint);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(token, tokenTypeHint);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
|
@ -166,6 +154,8 @@ public class IntrospectRequest {
|
|||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("token");
|
||||
openapiRequiredFields.add("token_type_hint");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -188,15 +178,20 @@ public class IntrospectRequest {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IntrospectRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : IntrospectRequest.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("token") != null && !jsonObj.get("token").isJsonNull()) && !jsonObj.get("token").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString()));
|
||||
}
|
||||
// validate the optional field `token_type_hint`
|
||||
if (jsonObj.get("token_type_hint") != null && !jsonObj.get("token_type_hint").isJsonNull()) {
|
||||
// validate the required field `token_type_hint`
|
||||
TokenHintType.validateJsonElement(jsonObj.get("token_type_hint"));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,536 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* 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).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package com.tribufu.generated.models;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* IntrospectResponse
|
||||
*/
|
||||
@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 IntrospectResponse {
|
||||
public static final String SERIALIZED_NAME_JTI = "jti";
|
||||
@SerializedName(SERIALIZED_NAME_JTI)
|
||||
@javax.annotation.Nullable
|
||||
private String jti;
|
||||
|
||||
public static final String SERIALIZED_NAME_ACTIVE = "active";
|
||||
@SerializedName(SERIALIZED_NAME_ACTIVE)
|
||||
@javax.annotation.Nullable
|
||||
private Boolean active;
|
||||
|
||||
public static final String SERIALIZED_NAME_TOKEN_TYPE = "token_type";
|
||||
@SerializedName(SERIALIZED_NAME_TOKEN_TYPE)
|
||||
@javax.annotation.Nullable
|
||||
private String tokenType;
|
||||
|
||||
public static final String SERIALIZED_NAME_CLIENT_ID = "client_id";
|
||||
@SerializedName(SERIALIZED_NAME_CLIENT_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String clientId;
|
||||
|
||||
public static final String SERIALIZED_NAME_SUB = "sub";
|
||||
@SerializedName(SERIALIZED_NAME_SUB)
|
||||
@javax.annotation.Nullable
|
||||
private String sub;
|
||||
|
||||
public static final String SERIALIZED_NAME_USERNAME = "username";
|
||||
@SerializedName(SERIALIZED_NAME_USERNAME)
|
||||
@javax.annotation.Nullable
|
||||
private String username;
|
||||
|
||||
public static final String SERIALIZED_NAME_SCOPE = "scope";
|
||||
@SerializedName(SERIALIZED_NAME_SCOPE)
|
||||
@javax.annotation.Nullable
|
||||
private String scope;
|
||||
|
||||
public static final String SERIALIZED_NAME_ISS = "iss";
|
||||
@SerializedName(SERIALIZED_NAME_ISS)
|
||||
@javax.annotation.Nullable
|
||||
private String iss;
|
||||
|
||||
public static final String SERIALIZED_NAME_AUD = "aud";
|
||||
@SerializedName(SERIALIZED_NAME_AUD)
|
||||
@javax.annotation.Nullable
|
||||
private String aud;
|
||||
|
||||
public static final String SERIALIZED_NAME_IAT = "iat";
|
||||
@SerializedName(SERIALIZED_NAME_IAT)
|
||||
@javax.annotation.Nullable
|
||||
private Long iat;
|
||||
|
||||
public static final String SERIALIZED_NAME_EXP = "exp";
|
||||
@SerializedName(SERIALIZED_NAME_EXP)
|
||||
@javax.annotation.Nullable
|
||||
private Long exp;
|
||||
|
||||
public static final String SERIALIZED_NAME_NBF = "nbf";
|
||||
@SerializedName(SERIALIZED_NAME_NBF)
|
||||
@javax.annotation.Nullable
|
||||
private Long nbf;
|
||||
|
||||
public IntrospectResponse() {
|
||||
}
|
||||
|
||||
public IntrospectResponse jti(@javax.annotation.Nullable String jti) {
|
||||
this.jti = jti;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get jti
|
||||
* @return jti
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getJti() {
|
||||
return jti;
|
||||
}
|
||||
|
||||
public void setJti(@javax.annotation.Nullable String jti) {
|
||||
this.jti = jti;
|
||||
}
|
||||
|
||||
|
||||
public IntrospectResponse active(@javax.annotation.Nullable Boolean active) {
|
||||
this.active = active;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get active
|
||||
* @return active
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Boolean getActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
public void setActive(@javax.annotation.Nullable Boolean active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
|
||||
public IntrospectResponse tokenType(@javax.annotation.Nullable String tokenType) {
|
||||
this.tokenType = tokenType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tokenType
|
||||
* @return tokenType
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getTokenType() {
|
||||
return tokenType;
|
||||
}
|
||||
|
||||
public void setTokenType(@javax.annotation.Nullable String tokenType) {
|
||||
this.tokenType = tokenType;
|
||||
}
|
||||
|
||||
|
||||
public IntrospectResponse clientId(@javax.annotation.Nullable String clientId) {
|
||||
this.clientId = clientId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get clientId
|
||||
* @return clientId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setClientId(@javax.annotation.Nullable String clientId) {
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
|
||||
public IntrospectResponse sub(@javax.annotation.Nullable String sub) {
|
||||
this.sub = sub;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sub
|
||||
* @return sub
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getSub() {
|
||||
return sub;
|
||||
}
|
||||
|
||||
public void setSub(@javax.annotation.Nullable String sub) {
|
||||
this.sub = sub;
|
||||
}
|
||||
|
||||
|
||||
public IntrospectResponse username(@javax.annotation.Nullable String username) {
|
||||
this.username = username;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get username
|
||||
* @return username
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(@javax.annotation.Nullable String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
|
||||
public IntrospectResponse scope(@javax.annotation.Nullable String scope) {
|
||||
this.scope = scope;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scope
|
||||
* @return scope
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getScope() {
|
||||
return scope;
|
||||
}
|
||||
|
||||
public void setScope(@javax.annotation.Nullable String scope) {
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
|
||||
public IntrospectResponse iss(@javax.annotation.Nullable String iss) {
|
||||
this.iss = iss;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get iss
|
||||
* @return iss
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getIss() {
|
||||
return iss;
|
||||
}
|
||||
|
||||
public void setIss(@javax.annotation.Nullable String iss) {
|
||||
this.iss = iss;
|
||||
}
|
||||
|
||||
|
||||
public IntrospectResponse aud(@javax.annotation.Nullable String aud) {
|
||||
this.aud = aud;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get aud
|
||||
* @return aud
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getAud() {
|
||||
return aud;
|
||||
}
|
||||
|
||||
public void setAud(@javax.annotation.Nullable String aud) {
|
||||
this.aud = aud;
|
||||
}
|
||||
|
||||
|
||||
public IntrospectResponse iat(@javax.annotation.Nullable Long iat) {
|
||||
this.iat = iat;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get iat
|
||||
* @return iat
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Long getIat() {
|
||||
return iat;
|
||||
}
|
||||
|
||||
public void setIat(@javax.annotation.Nullable Long iat) {
|
||||
this.iat = iat;
|
||||
}
|
||||
|
||||
|
||||
public IntrospectResponse exp(@javax.annotation.Nullable Long exp) {
|
||||
this.exp = exp;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get exp
|
||||
* @return exp
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Long getExp() {
|
||||
return exp;
|
||||
}
|
||||
|
||||
public void setExp(@javax.annotation.Nullable Long exp) {
|
||||
this.exp = exp;
|
||||
}
|
||||
|
||||
|
||||
public IntrospectResponse nbf(@javax.annotation.Nullable Long nbf) {
|
||||
this.nbf = nbf;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nbf
|
||||
* @return nbf
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Long getNbf() {
|
||||
return nbf;
|
||||
}
|
||||
|
||||
public void setNbf(@javax.annotation.Nullable Long nbf) {
|
||||
this.nbf = nbf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
IntrospectResponse introspectResponse = (IntrospectResponse) o;
|
||||
return Objects.equals(this.jti, introspectResponse.jti) &&
|
||||
Objects.equals(this.active, introspectResponse.active) &&
|
||||
Objects.equals(this.tokenType, introspectResponse.tokenType) &&
|
||||
Objects.equals(this.clientId, introspectResponse.clientId) &&
|
||||
Objects.equals(this.sub, introspectResponse.sub) &&
|
||||
Objects.equals(this.username, introspectResponse.username) &&
|
||||
Objects.equals(this.scope, introspectResponse.scope) &&
|
||||
Objects.equals(this.iss, introspectResponse.iss) &&
|
||||
Objects.equals(this.aud, introspectResponse.aud) &&
|
||||
Objects.equals(this.iat, introspectResponse.iat) &&
|
||||
Objects.equals(this.exp, introspectResponse.exp) &&
|
||||
Objects.equals(this.nbf, introspectResponse.nbf);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(jti, active, tokenType, clientId, sub, username, scope, iss, aud, iat, exp, nbf);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class IntrospectResponse {\n");
|
||||
sb.append(" jti: ").append(toIndentedString(jti)).append("\n");
|
||||
sb.append(" active: ").append(toIndentedString(active)).append("\n");
|
||||
sb.append(" tokenType: ").append(toIndentedString(tokenType)).append("\n");
|
||||
sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n");
|
||||
sb.append(" sub: ").append(toIndentedString(sub)).append("\n");
|
||||
sb.append(" username: ").append(toIndentedString(username)).append("\n");
|
||||
sb.append(" scope: ").append(toIndentedString(scope)).append("\n");
|
||||
sb.append(" iss: ").append(toIndentedString(iss)).append("\n");
|
||||
sb.append(" aud: ").append(toIndentedString(aud)).append("\n");
|
||||
sb.append(" iat: ").append(toIndentedString(iat)).append("\n");
|
||||
sb.append(" exp: ").append(toIndentedString(exp)).append("\n");
|
||||
sb.append(" nbf: ").append(toIndentedString(nbf)).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(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public static HashSet<String> openapiFields;
|
||||
public static HashSet<String> openapiRequiredFields;
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("jti");
|
||||
openapiFields.add("active");
|
||||
openapiFields.add("token_type");
|
||||
openapiFields.add("client_id");
|
||||
openapiFields.add("sub");
|
||||
openapiFields.add("username");
|
||||
openapiFields.add("scope");
|
||||
openapiFields.add("iss");
|
||||
openapiFields.add("aud");
|
||||
openapiFields.add("iat");
|
||||
openapiFields.add("exp");
|
||||
openapiFields.add("nbf");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to IntrospectResponse
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!IntrospectResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in IntrospectResponse is not found in the empty JSON string", IntrospectResponse.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!IntrospectResponse.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IntrospectResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
JsonObject jsonObj = jsonElement.getAsJsonObject();
|
||||
if ((jsonObj.get("jti") != null && !jsonObj.get("jti").isJsonNull()) && !jsonObj.get("jti").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `jti` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jti").toString()));
|
||||
}
|
||||
if ((jsonObj.get("token_type") != null && !jsonObj.get("token_type").isJsonNull()) && !jsonObj.get("token_type").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `token_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token_type").toString()));
|
||||
}
|
||||
if ((jsonObj.get("client_id") != null && !jsonObj.get("client_id").isJsonNull()) && !jsonObj.get("client_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `client_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("sub") != null && !jsonObj.get("sub").isJsonNull()) && !jsonObj.get("sub").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `sub` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sub").toString()));
|
||||
}
|
||||
if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString()));
|
||||
}
|
||||
if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString()));
|
||||
}
|
||||
if ((jsonObj.get("iss") != null && !jsonObj.get("iss").isJsonNull()) && !jsonObj.get("iss").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `iss` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iss").toString()));
|
||||
}
|
||||
if ((jsonObj.get("aud") != null && !jsonObj.get("aud").isJsonNull()) && !jsonObj.get("aud").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `aud` to be a primitive type in the JSON string but got `%s`", jsonObj.get("aud").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!IntrospectResponse.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'IntrospectResponse' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<IntrospectResponse> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(IntrospectResponse.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<IntrospectResponse>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, IntrospectResponse value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntrospectResponse read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
}
|
||||
|
||||
}.nullSafe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of IntrospectResponse given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of IntrospectResponse
|
||||
* @throws IOException if the JSON string is invalid with respect to IntrospectResponse
|
||||
*/
|
||||
public static IntrospectResponse fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, IntrospectResponse.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of IntrospectResponse to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
public String toJson() {
|
||||
return JSON.getGson().toJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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).
|
||||
|
|
@ -49,7 +49,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* IpAddress
|
||||
*/
|
||||
@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 IpAddress {
|
||||
public static final String SERIALIZED_NAME_ADDRESS = "address";
|
||||
@SerializedName(SERIALIZED_NAME_ADDRESS)
|
||||
|
|
@ -71,6 +71,11 @@ public class IpAddress {
|
|||
@javax.annotation.Nullable
|
||||
private Boolean reserved;
|
||||
|
||||
public static final String SERIALIZED_NAME_BANNED = "banned";
|
||||
@SerializedName(SERIALIZED_NAME_BANNED)
|
||||
@javax.annotation.Nullable
|
||||
private Boolean banned;
|
||||
|
||||
public static final String SERIALIZED_NAME_ASN = "asn";
|
||||
@SerializedName(SERIALIZED_NAME_ASN)
|
||||
@javax.annotation.Nullable
|
||||
|
|
@ -91,10 +96,10 @@ public class IpAddress {
|
|||
@javax.annotation.Nullable
|
||||
private String country;
|
||||
|
||||
public static final String SERIALIZED_NAME_REGION = "region";
|
||||
@SerializedName(SERIALIZED_NAME_REGION)
|
||||
public static final String SERIALIZED_NAME_PROVINCE = "province";
|
||||
@SerializedName(SERIALIZED_NAME_PROVINCE)
|
||||
@javax.annotation.Nullable
|
||||
private String region;
|
||||
private String province;
|
||||
|
||||
public static final String SERIALIZED_NAME_CITY = "city";
|
||||
@SerializedName(SERIALIZED_NAME_CITY)
|
||||
|
|
@ -220,6 +225,25 @@ public class IpAddress {
|
|||
}
|
||||
|
||||
|
||||
public IpAddress banned(@javax.annotation.Nullable Boolean banned) {
|
||||
this.banned = banned;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get banned
|
||||
* @return banned
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Boolean getBanned() {
|
||||
return banned;
|
||||
}
|
||||
|
||||
public void setBanned(@javax.annotation.Nullable Boolean banned) {
|
||||
this.banned = banned;
|
||||
}
|
||||
|
||||
|
||||
public IpAddress asn(@javax.annotation.Nullable String asn) {
|
||||
this.asn = asn;
|
||||
return this;
|
||||
|
|
@ -296,22 +320,22 @@ public class IpAddress {
|
|||
}
|
||||
|
||||
|
||||
public IpAddress region(@javax.annotation.Nullable String region) {
|
||||
this.region = region;
|
||||
public IpAddress province(@javax.annotation.Nullable String province) {
|
||||
this.province = province;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get region
|
||||
* @return region
|
||||
* Get province
|
||||
* @return province
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getRegion() {
|
||||
return region;
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setRegion(@javax.annotation.Nullable String region) {
|
||||
this.region = region;
|
||||
public void setProvince(@javax.annotation.Nullable String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -500,11 +524,12 @@ public class IpAddress {
|
|||
Objects.equals(this.version, ipAddress.version) &&
|
||||
Objects.equals(this.network, ipAddress.network) &&
|
||||
Objects.equals(this.reserved, ipAddress.reserved) &&
|
||||
Objects.equals(this.banned, ipAddress.banned) &&
|
||||
Objects.equals(this.asn, ipAddress.asn) &&
|
||||
Objects.equals(this.isp, ipAddress.isp) &&
|
||||
Objects.equals(this.continent, ipAddress.continent) &&
|
||||
Objects.equals(this.country, ipAddress.country) &&
|
||||
Objects.equals(this.region, ipAddress.region) &&
|
||||
Objects.equals(this.province, ipAddress.province) &&
|
||||
Objects.equals(this.city, ipAddress.city) &&
|
||||
Objects.equals(this.postalCode, ipAddress.postalCode) &&
|
||||
Objects.equals(this.callingCode, ipAddress.callingCode) &&
|
||||
|
|
@ -522,7 +547,7 @@ public class IpAddress {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(address, version, network, reserved, asn, isp, continent, country, region, city, postalCode, callingCode, tld, language, timezone, currency, latitude, longitude);
|
||||
return Objects.hash(address, version, network, reserved, banned, asn, isp, continent, country, province, city, postalCode, callingCode, tld, language, timezone, currency, latitude, longitude);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
|
|
@ -540,11 +565,12 @@ public class IpAddress {
|
|||
sb.append(" version: ").append(toIndentedString(version)).append("\n");
|
||||
sb.append(" network: ").append(toIndentedString(network)).append("\n");
|
||||
sb.append(" reserved: ").append(toIndentedString(reserved)).append("\n");
|
||||
sb.append(" banned: ").append(toIndentedString(banned)).append("\n");
|
||||
sb.append(" asn: ").append(toIndentedString(asn)).append("\n");
|
||||
sb.append(" isp: ").append(toIndentedString(isp)).append("\n");
|
||||
sb.append(" continent: ").append(toIndentedString(continent)).append("\n");
|
||||
sb.append(" country: ").append(toIndentedString(country)).append("\n");
|
||||
sb.append(" region: ").append(toIndentedString(region)).append("\n");
|
||||
sb.append(" province: ").append(toIndentedString(province)).append("\n");
|
||||
sb.append(" city: ").append(toIndentedString(city)).append("\n");
|
||||
sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n");
|
||||
sb.append(" callingCode: ").append(toIndentedString(callingCode)).append("\n");
|
||||
|
|
@ -580,11 +606,12 @@ public class IpAddress {
|
|||
openapiFields.add("version");
|
||||
openapiFields.add("network");
|
||||
openapiFields.add("reserved");
|
||||
openapiFields.add("banned");
|
||||
openapiFields.add("asn");
|
||||
openapiFields.add("isp");
|
||||
openapiFields.add("continent");
|
||||
openapiFields.add("country");
|
||||
openapiFields.add("region");
|
||||
openapiFields.add("province");
|
||||
openapiFields.add("city");
|
||||
openapiFields.add("postal_code");
|
||||
openapiFields.add("calling_code");
|
||||
|
|
@ -638,8 +665,8 @@ public class IpAddress {
|
|||
if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString()));
|
||||
}
|
||||
if ((jsonObj.get("region") != null && !jsonObj.get("region").isJsonNull()) && !jsonObj.get("region").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("region").toString()));
|
||||
if ((jsonObj.get("province") != null && !jsonObj.get("province").isJsonNull()) && !jsonObj.get("province").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `province` to be a primitive type in the JSON string but got `%s`", jsonObj.get("province").toString()));
|
||||
}
|
||||
if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString()));
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -49,7 +49,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* LeaderboardItem
|
||||
*/
|
||||
@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 LeaderboardItem {
|
||||
public static final String SERIALIZED_NAME_NAME = "name";
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -1,307 +0,0 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
* REST API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* Contact: contact@tribufu.com
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package com.tribufu.generated.models;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.tribufu.generated.models.UserInfo;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* LoginResponse
|
||||
*/
|
||||
@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")
|
||||
public class LoginResponse {
|
||||
public static final String SERIALIZED_NAME_USER = "user";
|
||||
@SerializedName(SERIALIZED_NAME_USER)
|
||||
@javax.annotation.Nullable
|
||||
private UserInfo user;
|
||||
|
||||
public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token";
|
||||
@SerializedName(SERIALIZED_NAME_ACCESS_TOKEN)
|
||||
@javax.annotation.Nullable
|
||||
private String accessToken;
|
||||
|
||||
public static final String SERIALIZED_NAME_REFRESH_TOKEN = "refresh_token";
|
||||
@SerializedName(SERIALIZED_NAME_REFRESH_TOKEN)
|
||||
@javax.annotation.Nullable
|
||||
private String refreshToken;
|
||||
|
||||
public static final String SERIALIZED_NAME_EXPIRES_IN = "expires_in";
|
||||
@SerializedName(SERIALIZED_NAME_EXPIRES_IN)
|
||||
@javax.annotation.Nullable
|
||||
private Long expiresIn;
|
||||
|
||||
public LoginResponse() {
|
||||
}
|
||||
|
||||
public LoginResponse user(@javax.annotation.Nullable UserInfo user) {
|
||||
this.user = user;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user
|
||||
* @return user
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public UserInfo getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUser(@javax.annotation.Nullable UserInfo user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
|
||||
public LoginResponse accessToken(@javax.annotation.Nullable String accessToken) {
|
||||
this.accessToken = accessToken;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get accessToken
|
||||
* @return accessToken
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getAccessToken() {
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
public void setAccessToken(@javax.annotation.Nullable String accessToken) {
|
||||
this.accessToken = accessToken;
|
||||
}
|
||||
|
||||
|
||||
public LoginResponse refreshToken(@javax.annotation.Nullable String refreshToken) {
|
||||
this.refreshToken = refreshToken;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get refreshToken
|
||||
* @return refreshToken
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getRefreshToken() {
|
||||
return refreshToken;
|
||||
}
|
||||
|
||||
public void setRefreshToken(@javax.annotation.Nullable String refreshToken) {
|
||||
this.refreshToken = refreshToken;
|
||||
}
|
||||
|
||||
|
||||
public LoginResponse expiresIn(@javax.annotation.Nullable Long expiresIn) {
|
||||
this.expiresIn = expiresIn;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get expiresIn
|
||||
* @return expiresIn
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Long getExpiresIn() {
|
||||
return expiresIn;
|
||||
}
|
||||
|
||||
public void setExpiresIn(@javax.annotation.Nullable Long expiresIn) {
|
||||
this.expiresIn = expiresIn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
LoginResponse loginResponse = (LoginResponse) o;
|
||||
return Objects.equals(this.user, loginResponse.user) &&
|
||||
Objects.equals(this.accessToken, loginResponse.accessToken) &&
|
||||
Objects.equals(this.refreshToken, loginResponse.refreshToken) &&
|
||||
Objects.equals(this.expiresIn, loginResponse.expiresIn);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(user, accessToken, refreshToken, expiresIn);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class LoginResponse {\n");
|
||||
sb.append(" user: ").append(toIndentedString(user)).append("\n");
|
||||
sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n");
|
||||
sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n");
|
||||
sb.append(" expiresIn: ").append(toIndentedString(expiresIn)).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(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public static HashSet<String> openapiFields;
|
||||
public static HashSet<String> openapiRequiredFields;
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("user");
|
||||
openapiFields.add("access_token");
|
||||
openapiFields.add("refresh_token");
|
||||
openapiFields.add("expires_in");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to LoginResponse
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!LoginResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in LoginResponse is not found in the empty JSON string", LoginResponse.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!LoginResponse.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LoginResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
JsonObject jsonObj = jsonElement.getAsJsonObject();
|
||||
// validate the optional field `user`
|
||||
if (jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) {
|
||||
UserInfo.validateJsonElement(jsonObj.get("user"));
|
||||
}
|
||||
if ((jsonObj.get("access_token") != null && !jsonObj.get("access_token").isJsonNull()) && !jsonObj.get("access_token").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `access_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_token").toString()));
|
||||
}
|
||||
if ((jsonObj.get("refresh_token") != null && !jsonObj.get("refresh_token").isJsonNull()) && !jsonObj.get("refresh_token").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `refresh_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("refresh_token").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!LoginResponse.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'LoginResponse' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<LoginResponse> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(LoginResponse.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<LoginResponse>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, LoginResponse value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoginResponse read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
}
|
||||
|
||||
}.nullSafe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of LoginResponse given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of LoginResponse
|
||||
* @throws IOException if the JSON string is invalid with respect to LoginResponse
|
||||
*/
|
||||
public static LoginResponse fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, LoginResponse.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of LoginResponse to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
public String toJson() {
|
||||
return JSON.getGson().toJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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("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));
|
||||
};
|
||||
}
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
414
src/main/java/com/tribufu/generated/models/PackageRelease.java
Normal file
414
src/main/java/com/tribufu/generated/models/PackageRelease.java
Normal file
|
|
@ -0,0 +1,414 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* 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).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package com.tribufu.generated.models;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.tribufu.generated.models.StorageFile;
|
||||
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;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* PackageRelease
|
||||
*/
|
||||
@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 PackageRelease {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String id;
|
||||
|
||||
public static final String SERIALIZED_NAME_VERSION = "version";
|
||||
@SerializedName(SERIALIZED_NAME_VERSION)
|
||||
@javax.annotation.Nullable
|
||||
private String version;
|
||||
|
||||
public static final String SERIALIZED_NAME_PACKAGE_ID = "package_id";
|
||||
@SerializedName(SERIALIZED_NAME_PACKAGE_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String packageId;
|
||||
|
||||
public static final String SERIALIZED_NAME_NOTES = "notes";
|
||||
@SerializedName(SERIALIZED_NAME_NOTES)
|
||||
@javax.annotation.Nullable
|
||||
private String notes;
|
||||
|
||||
public static final String SERIALIZED_NAME_FILES = "files";
|
||||
@SerializedName(SERIALIZED_NAME_FILES)
|
||||
@javax.annotation.Nullable
|
||||
private List<StorageFile> files;
|
||||
|
||||
public static final String SERIALIZED_NAME_CREATED = "created";
|
||||
@SerializedName(SERIALIZED_NAME_CREATED)
|
||||
@javax.annotation.Nullable
|
||||
private OffsetDateTime created;
|
||||
|
||||
public static final String SERIALIZED_NAME_UPDATED = "updated";
|
||||
@SerializedName(SERIALIZED_NAME_UPDATED)
|
||||
@javax.annotation.Nullable
|
||||
private OffsetDateTime updated;
|
||||
|
||||
public PackageRelease() {
|
||||
}
|
||||
|
||||
public PackageRelease(
|
||||
List<StorageFile> files
|
||||
) {
|
||||
this();
|
||||
this.files = files;
|
||||
}
|
||||
|
||||
public PackageRelease id(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public PackageRelease version(@javax.annotation.Nullable String version) {
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get version
|
||||
* @return version
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(@javax.annotation.Nullable String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
|
||||
public PackageRelease packageId(@javax.annotation.Nullable String packageId) {
|
||||
this.packageId = packageId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get packageId
|
||||
* @return packageId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getPackageId() {
|
||||
return packageId;
|
||||
}
|
||||
|
||||
public void setPackageId(@javax.annotation.Nullable String packageId) {
|
||||
this.packageId = packageId;
|
||||
}
|
||||
|
||||
|
||||
public PackageRelease notes(@javax.annotation.Nullable String notes) {
|
||||
this.notes = notes;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get notes
|
||||
* @return notes
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getNotes() {
|
||||
return notes;
|
||||
}
|
||||
|
||||
public void setNotes(@javax.annotation.Nullable String notes) {
|
||||
this.notes = notes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get files
|
||||
* @return files
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public List<StorageFile> getFiles() {
|
||||
return files;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public PackageRelease created(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
* @return created
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public OffsetDateTime getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
public void setCreated(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
|
||||
public PackageRelease updated(@javax.annotation.Nullable OffsetDateTime updated) {
|
||||
this.updated = updated;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
* @return updated
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public OffsetDateTime getUpdated() {
|
||||
return updated;
|
||||
}
|
||||
|
||||
public void setUpdated(@javax.annotation.Nullable OffsetDateTime updated) {
|
||||
this.updated = updated;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
PackageRelease packageRelease = (PackageRelease) o;
|
||||
return Objects.equals(this.id, packageRelease.id) &&
|
||||
Objects.equals(this.version, packageRelease.version) &&
|
||||
Objects.equals(this.packageId, packageRelease.packageId) &&
|
||||
Objects.equals(this.notes, packageRelease.notes) &&
|
||||
Objects.equals(this.files, packageRelease.files) &&
|
||||
Objects.equals(this.created, packageRelease.created) &&
|
||||
Objects.equals(this.updated, packageRelease.updated);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, version, packageId, notes, files, created, updated);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class PackageRelease {\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" version: ").append(toIndentedString(version)).append("\n");
|
||||
sb.append(" packageId: ").append(toIndentedString(packageId)).append("\n");
|
||||
sb.append(" notes: ").append(toIndentedString(notes)).append("\n");
|
||||
sb.append(" files: ").append(toIndentedString(files)).append("\n");
|
||||
sb.append(" created: ").append(toIndentedString(created)).append("\n");
|
||||
sb.append(" updated: ").append(toIndentedString(updated)).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(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public static HashSet<String> openapiFields;
|
||||
public static HashSet<String> openapiRequiredFields;
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("version");
|
||||
openapiFields.add("package_id");
|
||||
openapiFields.add("notes");
|
||||
openapiFields.add("files");
|
||||
openapiFields.add("created");
|
||||
openapiFields.add("updated");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("version");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to PackageRelease
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!PackageRelease.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in PackageRelease is not found in the empty JSON string", PackageRelease.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!PackageRelease.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PackageRelease` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : PackageRelease.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()));
|
||||
}
|
||||
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("package_id") != null && !jsonObj.get("package_id").isJsonNull()) && !jsonObj.get("package_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `package_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("package_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString()));
|
||||
}
|
||||
if (jsonObj.get("files") != null && !jsonObj.get("files").isJsonNull()) {
|
||||
JsonArray jsonArrayfiles = jsonObj.getAsJsonArray("files");
|
||||
if (jsonArrayfiles != null) {
|
||||
// ensure the json data is an array
|
||||
if (!jsonObj.get("files").isJsonArray()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `files` to be an array in the JSON string but got `%s`", jsonObj.get("files").toString()));
|
||||
}
|
||||
|
||||
// validate the optional field `files` (array)
|
||||
for (int i = 0; i < jsonArrayfiles.size(); i++) {
|
||||
StorageFile.validateJsonElement(jsonArrayfiles.get(i));
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!PackageRelease.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'PackageRelease' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<PackageRelease> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(PackageRelease.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<PackageRelease>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, PackageRelease value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageRelease read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
}
|
||||
|
||||
}.nullSafe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of PackageRelease given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of PackageRelease
|
||||
* @throws IOException if the JSON string is invalid with respect to PackageRelease
|
||||
*/
|
||||
public static PackageRelease fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, PackageRelease.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of PackageRelease to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
public String toJson() {
|
||||
return JSON.getGson().toJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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,11 +19,13 @@ 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.ProductPrice;
|
||||
import com.tribufu.generated.models.ProductType;
|
||||
import java.io.IOException;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
|
@ -50,10 +52,10 @@ import java.util.Set;
|
|||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* Subscription
|
||||
* Product
|
||||
*/
|
||||
@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")
|
||||
public class Subscription {
|
||||
@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 Product {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
@javax.annotation.Nullable
|
||||
|
|
@ -69,15 +71,30 @@ public class Subscription {
|
|||
@javax.annotation.Nullable
|
||||
private String description;
|
||||
|
||||
public static final String SERIALIZED_NAME_TYPE = "type";
|
||||
@SerializedName(SERIALIZED_NAME_TYPE)
|
||||
@javax.annotation.Nullable
|
||||
private ProductType type;
|
||||
|
||||
public static final String SERIALIZED_NAME_SLUG = "slug";
|
||||
@SerializedName(SERIALIZED_NAME_SLUG)
|
||||
@javax.annotation.Nullable
|
||||
private String slug;
|
||||
|
||||
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_IS_PHYSICAL = "is_physical";
|
||||
@SerializedName(SERIALIZED_NAME_IS_PHYSICAL)
|
||||
@javax.annotation.Nullable
|
||||
private Boolean isPhysical;
|
||||
|
||||
public static final String SERIALIZED_NAME_PRICES = "prices";
|
||||
@SerializedName(SERIALIZED_NAME_PRICES)
|
||||
@javax.annotation.Nullable
|
||||
private Map<String, Double> prices;
|
||||
private List<ProductPrice> prices;
|
||||
|
||||
public static final String SERIALIZED_NAME_CREATED = "created";
|
||||
@SerializedName(SERIALIZED_NAME_CREATED)
|
||||
|
|
@ -89,17 +106,10 @@ public class Subscription {
|
|||
@javax.annotation.Nullable
|
||||
private OffsetDateTime updated;
|
||||
|
||||
public Subscription() {
|
||||
public Product() {
|
||||
}
|
||||
|
||||
public Subscription(
|
||||
Map<String, Double> prices
|
||||
) {
|
||||
this();
|
||||
this.prices = prices;
|
||||
}
|
||||
|
||||
public Subscription id(@javax.annotation.Nullable String id) {
|
||||
public Product id(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -118,7 +128,7 @@ public class Subscription {
|
|||
}
|
||||
|
||||
|
||||
public Subscription name(@javax.annotation.Nullable String name) {
|
||||
public Product name(@javax.annotation.Nullable String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -137,7 +147,7 @@ public class Subscription {
|
|||
}
|
||||
|
||||
|
||||
public Subscription description(@javax.annotation.Nullable String description) {
|
||||
public Product description(@javax.annotation.Nullable String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -156,7 +166,45 @@ public class Subscription {
|
|||
}
|
||||
|
||||
|
||||
public Subscription imageUrl(@javax.annotation.Nullable String imageUrl) {
|
||||
public Product type(@javax.annotation.Nullable ProductType type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type
|
||||
* @return type
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public ProductType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(@javax.annotation.Nullable ProductType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
public Product slug(@javax.annotation.Nullable String slug) {
|
||||
this.slug = slug;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get slug
|
||||
* @return slug
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getSlug() {
|
||||
return slug;
|
||||
}
|
||||
|
||||
public void setSlug(@javax.annotation.Nullable String slug) {
|
||||
this.slug = slug;
|
||||
}
|
||||
|
||||
|
||||
public Product imageUrl(@javax.annotation.Nullable String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -175,18 +223,53 @@ public class Subscription {
|
|||
}
|
||||
|
||||
|
||||
public Product isPhysical(@javax.annotation.Nullable Boolean isPhysical) {
|
||||
this.isPhysical = isPhysical;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get isPhysical
|
||||
* @return isPhysical
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Boolean getIsPhysical() {
|
||||
return isPhysical;
|
||||
}
|
||||
|
||||
public void setIsPhysical(@javax.annotation.Nullable Boolean isPhysical) {
|
||||
this.isPhysical = isPhysical;
|
||||
}
|
||||
|
||||
|
||||
public Product prices(@javax.annotation.Nullable List<ProductPrice> prices) {
|
||||
this.prices = prices;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Product addPricesItem(ProductPrice pricesItem) {
|
||||
if (this.prices == null) {
|
||||
this.prices = new ArrayList<>();
|
||||
}
|
||||
this.prices.add(pricesItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prices
|
||||
* @return prices
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Map<String, Double> getPrices() {
|
||||
public List<ProductPrice> getPrices() {
|
||||
return prices;
|
||||
}
|
||||
|
||||
public void setPrices(@javax.annotation.Nullable List<ProductPrice> prices) {
|
||||
this.prices = prices;
|
||||
}
|
||||
|
||||
|
||||
public Subscription created(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
public Product created(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -205,7 +288,7 @@ public class Subscription {
|
|||
}
|
||||
|
||||
|
||||
public Subscription updated(@javax.annotation.Nullable OffsetDateTime updated) {
|
||||
public Product updated(@javax.annotation.Nullable OffsetDateTime updated) {
|
||||
this.updated = updated;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -233,14 +316,17 @@ public class Subscription {
|
|||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Subscription subscription = (Subscription) o;
|
||||
return Objects.equals(this.id, subscription.id) &&
|
||||
Objects.equals(this.name, subscription.name) &&
|
||||
Objects.equals(this.description, subscription.description) &&
|
||||
Objects.equals(this.imageUrl, subscription.imageUrl) &&
|
||||
Objects.equals(this.prices, subscription.prices) &&
|
||||
Objects.equals(this.created, subscription.created) &&
|
||||
Objects.equals(this.updated, subscription.updated);
|
||||
Product product = (Product) o;
|
||||
return Objects.equals(this.id, product.id) &&
|
||||
Objects.equals(this.name, product.name) &&
|
||||
Objects.equals(this.description, product.description) &&
|
||||
Objects.equals(this.type, product.type) &&
|
||||
Objects.equals(this.slug, product.slug) &&
|
||||
Objects.equals(this.imageUrl, product.imageUrl) &&
|
||||
Objects.equals(this.isPhysical, product.isPhysical) &&
|
||||
Objects.equals(this.prices, product.prices) &&
|
||||
Objects.equals(this.created, product.created) &&
|
||||
Objects.equals(this.updated, product.updated);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
|
|
@ -249,7 +335,7 @@ public class Subscription {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, description, imageUrl, prices, created, updated);
|
||||
return Objects.hash(id, name, description, type, slug, imageUrl, isPhysical, prices, created, updated);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
|
|
@ -262,11 +348,14 @@ public class Subscription {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Subscription {\n");
|
||||
sb.append("class Product {\n");
|
||||
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(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append(" slug: ").append(toIndentedString(slug)).append("\n");
|
||||
sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n");
|
||||
sb.append(" isPhysical: ").append(toIndentedString(isPhysical)).append("\n");
|
||||
sb.append(" prices: ").append(toIndentedString(prices)).append("\n");
|
||||
sb.append(" created: ").append(toIndentedString(created)).append("\n");
|
||||
sb.append(" updated: ").append(toIndentedString(updated)).append("\n");
|
||||
|
|
@ -295,33 +384,44 @@ public class Subscription {
|
|||
openapiFields.add("id");
|
||||
openapiFields.add("name");
|
||||
openapiFields.add("description");
|
||||
openapiFields.add("type");
|
||||
openapiFields.add("slug");
|
||||
openapiFields.add("image_url");
|
||||
openapiFields.add("is_physical");
|
||||
openapiFields.add("prices");
|
||||
openapiFields.add("created");
|
||||
openapiFields.add("updated");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to Subscription
|
||||
* @throws IOException if the JSON Element is invalid with respect to Product
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!Subscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in Subscription is not found in the empty JSON string", Subscription.openapiRequiredFields.toString()));
|
||||
if (!Product.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in Product is not found in the empty JSON string", Product.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!Subscription.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Subscription` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
if (!Product.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Product` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : Product.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();
|
||||
|
|
@ -334,31 +434,52 @@ public class Subscription {
|
|||
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()));
|
||||
}
|
||||
// validate the optional field `type`
|
||||
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
|
||||
ProductType.validateJsonElement(jsonObj.get("type"));
|
||||
}
|
||||
if ((jsonObj.get("slug") != null && !jsonObj.get("slug").isJsonNull()) && !jsonObj.get("slug").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `slug` to be a primitive type in the JSON string but got `%s`", jsonObj.get("slug").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("prices") != null && !jsonObj.get("prices").isJsonNull()) {
|
||||
JsonArray jsonArrayprices = jsonObj.getAsJsonArray("prices");
|
||||
if (jsonArrayprices != null) {
|
||||
// ensure the json data is an array
|
||||
if (!jsonObj.get("prices").isJsonArray()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `prices` to be an array in the JSON string but got `%s`", jsonObj.get("prices").toString()));
|
||||
}
|
||||
|
||||
// validate the optional field `prices` (array)
|
||||
for (int i = 0; i < jsonArrayprices.size(); i++) {
|
||||
ProductPrice.validateJsonElement(jsonArrayprices.get(i));
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!Subscription.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'Subscription' and its subtypes
|
||||
if (!Product.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'Product' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<Subscription> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(Subscription.class));
|
||||
final TypeAdapter<Product> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(Product.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<Subscription>() {
|
||||
return (TypeAdapter<T>) new TypeAdapter<Product>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, Subscription value) throws IOException {
|
||||
public void write(JsonWriter out, Product value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Subscription read(JsonReader in) throws IOException {
|
||||
public Product read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
|
|
@ -369,18 +490,18 @@ public class Subscription {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create an instance of Subscription given an JSON string
|
||||
* Create an instance of Product given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of Subscription
|
||||
* @throws IOException if the JSON string is invalid with respect to Subscription
|
||||
* @return An instance of Product
|
||||
* @throws IOException if the JSON string is invalid with respect to Product
|
||||
*/
|
||||
public static Subscription fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, Subscription.class);
|
||||
public static Product fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, Product.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of Subscription to an JSON string
|
||||
* Convert an instance of Product to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
|
|
@ -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).
|
||||
|
|
@ -47,34 +47,82 @@ import java.util.Set;
|
|||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* RefreshRequest
|
||||
* ProductPrice
|
||||
*/
|
||||
@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")
|
||||
public class RefreshRequest {
|
||||
public static final String SERIALIZED_NAME_REFRESH_TOKEN = "refresh_token";
|
||||
@SerializedName(SERIALIZED_NAME_REFRESH_TOKEN)
|
||||
@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 ProductPrice {
|
||||
public static final String SERIALIZED_NAME_CURRENCY = "currency";
|
||||
@SerializedName(SERIALIZED_NAME_CURRENCY)
|
||||
@javax.annotation.Nullable
|
||||
private String refreshToken;
|
||||
private String currency;
|
||||
|
||||
public RefreshRequest() {
|
||||
public static final String SERIALIZED_NAME_AMOUNT = "amount";
|
||||
@SerializedName(SERIALIZED_NAME_AMOUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Double amount;
|
||||
|
||||
public static final String SERIALIZED_NAME_RENEWAL = "renewal";
|
||||
@SerializedName(SERIALIZED_NAME_RENEWAL)
|
||||
@javax.annotation.Nullable
|
||||
private Double renewal;
|
||||
|
||||
public ProductPrice() {
|
||||
}
|
||||
|
||||
public RefreshRequest refreshToken(@javax.annotation.Nullable String refreshToken) {
|
||||
this.refreshToken = refreshToken;
|
||||
public ProductPrice currency(@javax.annotation.Nullable String currency) {
|
||||
this.currency = currency;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get refreshToken
|
||||
* @return refreshToken
|
||||
* Get currency
|
||||
* @return currency
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getRefreshToken() {
|
||||
return refreshToken;
|
||||
public String getCurrency() {
|
||||
return currency;
|
||||
}
|
||||
|
||||
public void setRefreshToken(@javax.annotation.Nullable String refreshToken) {
|
||||
this.refreshToken = refreshToken;
|
||||
public void setCurrency(@javax.annotation.Nullable String currency) {
|
||||
this.currency = currency;
|
||||
}
|
||||
|
||||
|
||||
public ProductPrice amount(@javax.annotation.Nullable Double amount) {
|
||||
this.amount = amount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get amount
|
||||
* @return amount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Double getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(@javax.annotation.Nullable Double amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
|
||||
public ProductPrice renewal(@javax.annotation.Nullable Double renewal) {
|
||||
this.renewal = renewal;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get renewal
|
||||
* @return renewal
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Double getRenewal() {
|
||||
return renewal;
|
||||
}
|
||||
|
||||
public void setRenewal(@javax.annotation.Nullable Double renewal) {
|
||||
this.renewal = renewal;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -87,8 +135,10 @@ public class RefreshRequest {
|
|||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
RefreshRequest refreshRequest = (RefreshRequest) o;
|
||||
return Objects.equals(this.refreshToken, refreshRequest.refreshToken);
|
||||
ProductPrice productPrice = (ProductPrice) o;
|
||||
return Objects.equals(this.currency, productPrice.currency) &&
|
||||
Objects.equals(this.amount, productPrice.amount) &&
|
||||
Objects.equals(this.renewal, productPrice.renewal);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
|
|
@ -97,7 +147,7 @@ public class RefreshRequest {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(refreshToken);
|
||||
return Objects.hash(currency, amount, renewal);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
|
|
@ -110,8 +160,10 @@ public class RefreshRequest {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class RefreshRequest {\n");
|
||||
sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n");
|
||||
sb.append("class ProductPrice {\n");
|
||||
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
|
||||
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
|
||||
sb.append(" renewal: ").append(toIndentedString(renewal)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
@ -134,35 +186,45 @@ public class RefreshRequest {
|
|||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("refresh_token");
|
||||
openapiFields.add("currency");
|
||||
openapiFields.add("amount");
|
||||
openapiFields.add("renewal");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("currency");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to RefreshRequest
|
||||
* @throws IOException if the JSON Element is invalid with respect to ProductPrice
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!RefreshRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in RefreshRequest is not found in the empty JSON string", RefreshRequest.openapiRequiredFields.toString()));
|
||||
if (!ProductPrice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in ProductPrice is not found in the empty JSON string", ProductPrice.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!RefreshRequest.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RefreshRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
if (!ProductPrice.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductPrice` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : ProductPrice.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("refresh_token") != null && !jsonObj.get("refresh_token").isJsonNull()) && !jsonObj.get("refresh_token").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `refresh_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("refresh_token").toString()));
|
||||
if ((jsonObj.get("currency") != null && !jsonObj.get("currency").isJsonNull()) && !jsonObj.get("currency").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -170,22 +232,22 @@ public class RefreshRequest {
|
|||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!RefreshRequest.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'RefreshRequest' and its subtypes
|
||||
if (!ProductPrice.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'ProductPrice' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<RefreshRequest> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(RefreshRequest.class));
|
||||
final TypeAdapter<ProductPrice> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(ProductPrice.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<RefreshRequest>() {
|
||||
return (TypeAdapter<T>) new TypeAdapter<ProductPrice>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, RefreshRequest value) throws IOException {
|
||||
public void write(JsonWriter out, ProductPrice value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RefreshRequest read(JsonReader in) throws IOException {
|
||||
public ProductPrice read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
|
|
@ -196,18 +258,18 @@ public class RefreshRequest {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create an instance of RefreshRequest given an JSON string
|
||||
* Create an instance of ProductPrice given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of RefreshRequest
|
||||
* @throws IOException if the JSON string is invalid with respect to RefreshRequest
|
||||
* @return An instance of ProductPrice
|
||||
* @throws IOException if the JSON string is invalid with respect to ProductPrice
|
||||
*/
|
||||
public static RefreshRequest fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, RefreshRequest.class);
|
||||
public static ProductPrice fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, ProductPrice.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of RefreshRequest to an JSON string
|
||||
* Convert an instance of ProductPrice to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
78
src/main/java/com/tribufu/generated/models/ProductType.java
Normal file
78
src/main/java/com/tribufu/generated/models/ProductType.java
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* 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).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package com.tribufu.generated.models;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.IOException;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
/**
|
||||
* Gets or Sets ProductType
|
||||
*/
|
||||
@JsonAdapter(ProductType.Adapter.class)
|
||||
public enum ProductType {
|
||||
|
||||
PRODUCT("product"),
|
||||
|
||||
SUBSCRIPTION("subscription");
|
||||
|
||||
private String value;
|
||||
|
||||
ProductType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static ProductType fromValue(String value) {
|
||||
for (ProductType b : ProductType.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<ProductType> {
|
||||
@Override
|
||||
public void write(final JsonWriter jsonWriter, final ProductType enumeration) throws IOException {
|
||||
jsonWriter.value(enumeration.getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductType read(final JsonReader jsonReader) throws IOException {
|
||||
String value = jsonReader.nextString();
|
||||
return ProductType.fromValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
String value = jsonElement.getAsString();
|
||||
ProductType.fromValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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).
|
||||
|
|
@ -52,7 +52,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* Profile
|
||||
*/
|
||||
@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 Profile {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -50,7 +50,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* ProfileGame
|
||||
*/
|
||||
@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 ProfileGame {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -52,7 +52,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* ProfileGroup
|
||||
*/
|
||||
@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 ProfileGroup {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -22,7 +22,6 @@ import com.google.gson.stream.JsonWriter;
|
|||
import com.tribufu.generated.models.TokenHintType;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
|
@ -50,7 +49,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* RevokeRequest
|
||||
*/
|
||||
@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 RevokeRequest {
|
||||
public static final String SERIALIZED_NAME_TOKEN = "token";
|
||||
@SerializedName(SERIALIZED_NAME_TOKEN)
|
||||
|
|
@ -59,7 +58,7 @@ public class RevokeRequest {
|
|||
|
||||
public static final String SERIALIZED_NAME_TOKEN_TYPE_HINT = "token_type_hint";
|
||||
@SerializedName(SERIALIZED_NAME_TOKEN_TYPE_HINT)
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
private TokenHintType tokenTypeHint;
|
||||
|
||||
public RevokeRequest() {
|
||||
|
|
@ -84,7 +83,7 @@ public class RevokeRequest {
|
|||
}
|
||||
|
||||
|
||||
public RevokeRequest tokenTypeHint(@javax.annotation.Nullable TokenHintType tokenTypeHint) {
|
||||
public RevokeRequest tokenTypeHint(@javax.annotation.Nonnull TokenHintType tokenTypeHint) {
|
||||
this.tokenTypeHint = tokenTypeHint;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -93,12 +92,12 @@ public class RevokeRequest {
|
|||
* Get tokenTypeHint
|
||||
* @return tokenTypeHint
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
public TokenHintType getTokenTypeHint() {
|
||||
return tokenTypeHint;
|
||||
}
|
||||
|
||||
public void setTokenTypeHint(@javax.annotation.Nullable TokenHintType tokenTypeHint) {
|
||||
public void setTokenTypeHint(@javax.annotation.Nonnull TokenHintType tokenTypeHint) {
|
||||
this.tokenTypeHint = tokenTypeHint;
|
||||
}
|
||||
|
||||
|
|
@ -117,22 +116,11 @@ public class RevokeRequest {
|
|||
Objects.equals(this.tokenTypeHint, revokeRequest.tokenTypeHint);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(token, tokenTypeHint);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
|
@ -166,6 +154,8 @@ public class RevokeRequest {
|
|||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("token");
|
||||
openapiRequiredFields.add("token_type_hint");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -188,15 +178,20 @@ public class RevokeRequest {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RevokeRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : RevokeRequest.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("token") != null && !jsonObj.get("token").isJsonNull()) && !jsonObj.get("token").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString()));
|
||||
}
|
||||
// validate the optional field `token_type_hint`
|
||||
if (jsonObj.get("token_type_hint") != null && !jsonObj.get("token_type_hint").isJsonNull()) {
|
||||
// validate the required field `token_type_hint`
|
||||
TokenHintType.validateJsonElement(jsonObj.get("token_type_hint"));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -48,13 +48,13 @@ import java.util.Set;
|
|||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* SearchRequest
|
||||
* Search
|
||||
*/
|
||||
@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")
|
||||
public class SearchRequest {
|
||||
@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 Search {
|
||||
public static final String SERIALIZED_NAME_TYPE = "type";
|
||||
@SerializedName(SERIALIZED_NAME_TYPE)
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
private SearchType type;
|
||||
|
||||
public static final String SERIALIZED_NAME_QUERY = "query";
|
||||
|
|
@ -72,10 +72,10 @@ public class SearchRequest {
|
|||
@javax.annotation.Nullable
|
||||
private String gameId;
|
||||
|
||||
public SearchRequest() {
|
||||
public Search() {
|
||||
}
|
||||
|
||||
public SearchRequest type(@javax.annotation.Nullable SearchType type) {
|
||||
public Search type(@javax.annotation.Nonnull SearchType type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -84,17 +84,17 @@ public class SearchRequest {
|
|||
* Get type
|
||||
* @return type
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
public SearchType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(@javax.annotation.Nullable SearchType type) {
|
||||
public void setType(@javax.annotation.Nonnull SearchType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
public SearchRequest query(@javax.annotation.Nullable String query) {
|
||||
public Search query(@javax.annotation.Nullable String query) {
|
||||
this.query = query;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -113,7 +113,7 @@ public class SearchRequest {
|
|||
}
|
||||
|
||||
|
||||
public SearchRequest page(@javax.annotation.Nullable Integer page) {
|
||||
public Search page(@javax.annotation.Nullable Integer page) {
|
||||
this.page = page;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ public class SearchRequest {
|
|||
}
|
||||
|
||||
|
||||
public SearchRequest gameId(@javax.annotation.Nullable String gameId) {
|
||||
public Search gameId(@javax.annotation.Nullable String gameId) {
|
||||
this.gameId = gameId;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -160,11 +160,11 @@ public class SearchRequest {
|
|||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SearchRequest searchRequest = (SearchRequest) o;
|
||||
return Objects.equals(this.type, searchRequest.type) &&
|
||||
Objects.equals(this.query, searchRequest.query) &&
|
||||
Objects.equals(this.page, searchRequest.page) &&
|
||||
Objects.equals(this.gameId, searchRequest.gameId);
|
||||
Search search = (Search) o;
|
||||
return Objects.equals(this.type, search.type) &&
|
||||
Objects.equals(this.query, search.query) &&
|
||||
Objects.equals(this.page, search.page) &&
|
||||
Objects.equals(this.gameId, search.gameId);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
|
|
@ -186,7 +186,7 @@ public class SearchRequest {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class SearchRequest {\n");
|
||||
sb.append("class Search {\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append(" query: ").append(toIndentedString(query)).append("\n");
|
||||
sb.append(" page: ").append(toIndentedString(page)).append("\n");
|
||||
|
|
@ -220,33 +220,40 @@ public class SearchRequest {
|
|||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("type");
|
||||
openapiRequiredFields.add("query");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to SearchRequest
|
||||
* @throws IOException if the JSON Element is invalid with respect to Search
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!SearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in SearchRequest is not found in the empty JSON string", SearchRequest.openapiRequiredFields.toString()));
|
||||
if (!Search.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in Search is not found in the empty JSON string", Search.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!SearchRequest.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
if (!Search.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Search` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : Search.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();
|
||||
// validate the optional field `type`
|
||||
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
|
||||
// validate the required field `type`
|
||||
SearchType.validateJsonElement(jsonObj.get("type"));
|
||||
}
|
||||
if ((jsonObj.get("query") != null && !jsonObj.get("query").isJsonNull()) && !jsonObj.get("query").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `query` to be a primitive type in the JSON string but got `%s`", jsonObj.get("query").toString()));
|
||||
}
|
||||
|
|
@ -259,22 +266,22 @@ public class SearchRequest {
|
|||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!SearchRequest.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'SearchRequest' and its subtypes
|
||||
if (!Search.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'Search' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<SearchRequest> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(SearchRequest.class));
|
||||
final TypeAdapter<Search> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(Search.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<SearchRequest>() {
|
||||
return (TypeAdapter<T>) new TypeAdapter<Search>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, SearchRequest value) throws IOException {
|
||||
public void write(JsonWriter out, Search value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchRequest read(JsonReader in) throws IOException {
|
||||
public Search read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
|
|
@ -285,18 +292,18 @@ public class SearchRequest {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create an instance of SearchRequest given an JSON string
|
||||
* Create an instance of Search given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of SearchRequest
|
||||
* @throws IOException if the JSON string is invalid with respect to SearchRequest
|
||||
* @return An instance of Search
|
||||
* @throws IOException if the JSON string is invalid with respect to Search
|
||||
*/
|
||||
public static SearchRequest fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, SearchRequest.class);
|
||||
public static Search fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, Search.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of SearchRequest to an JSON string
|
||||
* Convert an instance of Search to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
|
|
@ -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).
|
||||
|
|
@ -33,9 +33,9 @@ public enum SearchType {
|
|||
|
||||
GROUP("group"),
|
||||
|
||||
SERVER("server"),
|
||||
GAME_SERVER("game_server"),
|
||||
|
||||
CLUSTER("cluster");
|
||||
GAME_SERVER_CLUSTER("game_server_cluster");
|
||||
|
||||
private String value;
|
||||
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -48,7 +48,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* ServerMetrics
|
||||
*/
|
||||
@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 ServerMetrics {
|
||||
public static final String SERIALIZED_NAME_SERVER_COUNT = "server_count";
|
||||
@SerializedName(SERIALIZED_NAME_SERVER_COUNT)
|
||||
|
|
|
|||
461
src/main/java/com/tribufu/generated/models/StorageFile.java
Normal file
461
src/main/java/com/tribufu/generated/models/StorageFile.java
Normal file
|
|
@ -0,0 +1,461 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* 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).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package com.tribufu.generated.models;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Arrays;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.tribufu.generated.JSON;
|
||||
|
||||
/**
|
||||
* StorageFile
|
||||
*/
|
||||
@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 StorageFile {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String id;
|
||||
|
||||
public static final String SERIALIZED_NAME_NAME = "name";
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
@javax.annotation.Nullable
|
||||
private String name;
|
||||
|
||||
public static final String SERIALIZED_NAME_CONTENT_TYPE = "content_type";
|
||||
@SerializedName(SERIALIZED_NAME_CONTENT_TYPE)
|
||||
@javax.annotation.Nullable
|
||||
private String contentType;
|
||||
|
||||
public static final String SERIALIZED_NAME_URL = "url";
|
||||
@SerializedName(SERIALIZED_NAME_URL)
|
||||
@javax.annotation.Nullable
|
||||
private URI url;
|
||||
|
||||
public static final String SERIALIZED_NAME_SIZE = "size";
|
||||
@SerializedName(SERIALIZED_NAME_SIZE)
|
||||
@javax.annotation.Nullable
|
||||
private Long size;
|
||||
|
||||
public static final String SERIALIZED_NAME_HASH = "hash";
|
||||
@SerializedName(SERIALIZED_NAME_HASH)
|
||||
@javax.annotation.Nullable
|
||||
private String hash;
|
||||
|
||||
public static final String SERIALIZED_NAME_ETAG = "etag";
|
||||
@SerializedName(SERIALIZED_NAME_ETAG)
|
||||
@javax.annotation.Nullable
|
||||
private String etag;
|
||||
|
||||
public static final String SERIALIZED_NAME_CREATED = "created";
|
||||
@SerializedName(SERIALIZED_NAME_CREATED)
|
||||
@javax.annotation.Nullable
|
||||
private OffsetDateTime created;
|
||||
|
||||
public static final String SERIALIZED_NAME_UPDATED = "updated";
|
||||
@SerializedName(SERIALIZED_NAME_UPDATED)
|
||||
@javax.annotation.Nullable
|
||||
private OffsetDateTime updated;
|
||||
|
||||
public StorageFile() {
|
||||
}
|
||||
|
||||
public StorageFile id(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(@javax.annotation.Nullable String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public StorageFile name(@javax.annotation.Nullable String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(@javax.annotation.Nullable String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
public StorageFile contentType(@javax.annotation.Nullable String contentType) {
|
||||
this.contentType = contentType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get contentType
|
||||
* @return contentType
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
public void setContentType(@javax.annotation.Nullable String contentType) {
|
||||
this.contentType = contentType;
|
||||
}
|
||||
|
||||
|
||||
public StorageFile url(@javax.annotation.Nullable URI url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get url
|
||||
* @return url
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public URI getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(@javax.annotation.Nullable URI url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
|
||||
public StorageFile size(@javax.annotation.Nullable Long size) {
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get size
|
||||
* @return size
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Long getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(@javax.annotation.Nullable Long size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
|
||||
public StorageFile hash(@javax.annotation.Nullable String hash) {
|
||||
this.hash = hash;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get hash
|
||||
* @return hash
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getHash() {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public void setHash(@javax.annotation.Nullable String hash) {
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
|
||||
public StorageFile etag(@javax.annotation.Nullable String etag) {
|
||||
this.etag = etag;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get etag
|
||||
* @return etag
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getEtag() {
|
||||
return etag;
|
||||
}
|
||||
|
||||
public void setEtag(@javax.annotation.Nullable String etag) {
|
||||
this.etag = etag;
|
||||
}
|
||||
|
||||
|
||||
public StorageFile created(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created
|
||||
* @return created
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public OffsetDateTime getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
public void setCreated(@javax.annotation.Nullable OffsetDateTime created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
|
||||
public StorageFile updated(@javax.annotation.Nullable OffsetDateTime updated) {
|
||||
this.updated = updated;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated
|
||||
* @return updated
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public OffsetDateTime getUpdated() {
|
||||
return updated;
|
||||
}
|
||||
|
||||
public void setUpdated(@javax.annotation.Nullable OffsetDateTime updated) {
|
||||
this.updated = updated;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
StorageFile storageFile = (StorageFile) o;
|
||||
return Objects.equals(this.id, storageFile.id) &&
|
||||
Objects.equals(this.name, storageFile.name) &&
|
||||
Objects.equals(this.contentType, storageFile.contentType) &&
|
||||
Objects.equals(this.url, storageFile.url) &&
|
||||
Objects.equals(this.size, storageFile.size) &&
|
||||
Objects.equals(this.hash, storageFile.hash) &&
|
||||
Objects.equals(this.etag, storageFile.etag) &&
|
||||
Objects.equals(this.created, storageFile.created) &&
|
||||
Objects.equals(this.updated, storageFile.updated);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, contentType, url, size, hash, etag, created, updated);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class StorageFile {\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n");
|
||||
sb.append(" url: ").append(toIndentedString(url)).append("\n");
|
||||
sb.append(" size: ").append(toIndentedString(size)).append("\n");
|
||||
sb.append(" hash: ").append(toIndentedString(hash)).append("\n");
|
||||
sb.append(" etag: ").append(toIndentedString(etag)).append("\n");
|
||||
sb.append(" created: ").append(toIndentedString(created)).append("\n");
|
||||
sb.append(" updated: ").append(toIndentedString(updated)).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(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public static HashSet<String> openapiFields;
|
||||
public static HashSet<String> openapiRequiredFields;
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("name");
|
||||
openapiFields.add("content_type");
|
||||
openapiFields.add("url");
|
||||
openapiFields.add("size");
|
||||
openapiFields.add("hash");
|
||||
openapiFields.add("etag");
|
||||
openapiFields.add("created");
|
||||
openapiFields.add("updated");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
openapiRequiredFields.add("content_type");
|
||||
openapiRequiredFields.add("url");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Element and throws an exception if issues found
|
||||
*
|
||||
* @param jsonElement JSON Element
|
||||
* @throws IOException if the JSON Element is invalid with respect to StorageFile
|
||||
*/
|
||||
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||
if (jsonElement == null) {
|
||||
if (!StorageFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in StorageFile is not found in the empty JSON string", StorageFile.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Map.Entry<String, JsonElement> entry : entries) {
|
||||
if (!StorageFile.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StorageFile` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : StorageFile.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()));
|
||||
}
|
||||
if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
|
||||
}
|
||||
if ((jsonObj.get("content_type") != null && !jsonObj.get("content_type").isJsonNull()) && !jsonObj.get("content_type").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `content_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content_type").toString()));
|
||||
}
|
||||
if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("hash") != null && !jsonObj.get("hash").isJsonNull()) && !jsonObj.get("hash").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `hash` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hash").toString()));
|
||||
}
|
||||
if ((jsonObj.get("etag") != null && !jsonObj.get("etag").isJsonNull()) && !jsonObj.get("etag").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `etag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("etag").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!StorageFile.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'StorageFile' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<StorageFile> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(StorageFile.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<StorageFile>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, StorageFile value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageFile read(JsonReader in) throws IOException {
|
||||
JsonElement jsonElement = elementAdapter.read(in);
|
||||
validateJsonElement(jsonElement);
|
||||
return thisAdapter.fromJsonTree(jsonElement);
|
||||
}
|
||||
|
||||
}.nullSafe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of StorageFile given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of StorageFile
|
||||
* @throws IOException if the JSON string is invalid with respect to StorageFile
|
||||
*/
|
||||
public static StorageFile fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, StorageFile.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of StorageFile to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
public String toJson() {
|
||||
return JSON.getGson().toJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -50,7 +50,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* TokenRequest
|
||||
*/
|
||||
@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 TokenRequest {
|
||||
public static final String SERIALIZED_NAME_GRANT_TYPE = "grant_type";
|
||||
@SerializedName(SERIALIZED_NAME_GRANT_TYPE)
|
||||
|
|
@ -77,11 +77,6 @@ public class TokenRequest {
|
|||
@javax.annotation.Nullable
|
||||
private String refreshToken;
|
||||
|
||||
public static final String SERIALIZED_NAME_CLIENT_ID = "client_id";
|
||||
@SerializedName(SERIALIZED_NAME_CLIENT_ID)
|
||||
@javax.annotation.Nullable
|
||||
private String clientId;
|
||||
|
||||
public static final String SERIALIZED_NAME_REDIRECT_URI = "redirect_uri";
|
||||
@SerializedName(SERIALIZED_NAME_REDIRECT_URI)
|
||||
@javax.annotation.Nullable
|
||||
|
|
@ -190,25 +185,6 @@ public class TokenRequest {
|
|||
}
|
||||
|
||||
|
||||
public TokenRequest clientId(@javax.annotation.Nullable String clientId) {
|
||||
this.clientId = clientId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get clientId
|
||||
* @return clientId
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setClientId(@javax.annotation.Nullable String clientId) {
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
|
||||
public TokenRequest redirectUri(@javax.annotation.Nullable String redirectUri) {
|
||||
this.redirectUri = redirectUri;
|
||||
return this;
|
||||
|
|
@ -262,7 +238,6 @@ public class TokenRequest {
|
|||
Objects.equals(this.username, tokenRequest.username) &&
|
||||
Objects.equals(this.password, tokenRequest.password) &&
|
||||
Objects.equals(this.refreshToken, tokenRequest.refreshToken) &&
|
||||
Objects.equals(this.clientId, tokenRequest.clientId) &&
|
||||
Objects.equals(this.redirectUri, tokenRequest.redirectUri) &&
|
||||
Objects.equals(this.codeVerifier, tokenRequest.codeVerifier);
|
||||
}
|
||||
|
|
@ -273,7 +248,7 @@ public class TokenRequest {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(grantType, code, username, password, refreshToken, clientId, redirectUri, codeVerifier);
|
||||
return Objects.hash(grantType, code, username, password, refreshToken, redirectUri, codeVerifier);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
|
|
@ -292,7 +267,6 @@ public class TokenRequest {
|
|||
sb.append(" username: ").append(toIndentedString(username)).append("\n");
|
||||
sb.append(" password: ").append(toIndentedString(password)).append("\n");
|
||||
sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n");
|
||||
sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n");
|
||||
sb.append(" redirectUri: ").append(toIndentedString(redirectUri)).append("\n");
|
||||
sb.append(" codeVerifier: ").append(toIndentedString(codeVerifier)).append("\n");
|
||||
sb.append("}");
|
||||
|
|
@ -322,7 +296,6 @@ public class TokenRequest {
|
|||
openapiFields.add("username");
|
||||
openapiFields.add("password");
|
||||
openapiFields.add("refresh_token");
|
||||
openapiFields.add("client_id");
|
||||
openapiFields.add("redirect_uri");
|
||||
openapiFields.add("code_verifier");
|
||||
|
||||
|
|
@ -367,9 +340,6 @@ public class TokenRequest {
|
|||
if ((jsonObj.get("refresh_token") != null && !jsonObj.get("refresh_token").isJsonNull()) && !jsonObj.get("refresh_token").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `refresh_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("refresh_token").toString()));
|
||||
}
|
||||
if ((jsonObj.get("client_id") != null && !jsonObj.get("client_id").isJsonNull()) && !jsonObj.get("client_id").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `client_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_id").toString()));
|
||||
}
|
||||
if ((jsonObj.get("redirect_uri") != null && !jsonObj.get("redirect_uri").isJsonNull()) && !jsonObj.get("redirect_uri").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `redirect_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirect_uri").toString()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -50,11 +50,11 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* TokenResponse
|
||||
*/
|
||||
@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 TokenResponse {
|
||||
public static final String SERIALIZED_NAME_TOKEN_TYPE = "token_type";
|
||||
@SerializedName(SERIALIZED_NAME_TOKEN_TYPE)
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
private TokenType tokenType;
|
||||
|
||||
public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token";
|
||||
|
|
@ -85,7 +85,7 @@ public class TokenResponse {
|
|||
public TokenResponse() {
|
||||
}
|
||||
|
||||
public TokenResponse tokenType(@javax.annotation.Nullable TokenType tokenType) {
|
||||
public TokenResponse tokenType(@javax.annotation.Nonnull TokenType tokenType) {
|
||||
this.tokenType = tokenType;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -94,12 +94,12 @@ public class TokenResponse {
|
|||
* Get tokenType
|
||||
* @return tokenType
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
@javax.annotation.Nonnull
|
||||
public TokenType getTokenType() {
|
||||
return tokenType;
|
||||
}
|
||||
|
||||
public void setTokenType(@javax.annotation.Nullable TokenType tokenType) {
|
||||
public void setTokenType(@javax.annotation.Nonnull TokenType tokenType) {
|
||||
this.tokenType = tokenType;
|
||||
}
|
||||
|
||||
|
|
@ -274,6 +274,8 @@ public class TokenResponse {
|
|||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("token_type");
|
||||
openapiRequiredFields.add("access_token");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -296,11 +298,16 @@ public class TokenResponse {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TokenResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
JsonObject jsonObj = jsonElement.getAsJsonObject();
|
||||
// validate the optional field `token_type`
|
||||
if (jsonObj.get("token_type") != null && !jsonObj.get("token_type").isJsonNull()) {
|
||||
TokenType.validateJsonElement(jsonObj.get("token_type"));
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : TokenResponse.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();
|
||||
// validate the required field `token_type`
|
||||
TokenType.validateJsonElement(jsonObj.get("token_type"));
|
||||
if ((jsonObj.get("access_token") != null && !jsonObj.get("access_token").isJsonNull()) && !jsonObj.get("access_token").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `access_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_token").toString()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -49,7 +49,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* UpdateProfile
|
||||
*/
|
||||
@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 UpdateProfile {
|
||||
public static final String SERIALIZED_NAME_DISPLAY_NAME = "display_name";
|
||||
@SerializedName(SERIALIZED_NAME_DISPLAY_NAME)
|
||||
|
|
@ -165,6 +165,7 @@ public class UpdateProfile {
|
|||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("display_name");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -187,6 +188,13 @@ public class UpdateProfile {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateProfile` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : UpdateProfile.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("display_name") != null && !jsonObj.get("display_name").isJsonNull()) && !jsonObj.get("display_name").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `display_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display_name").toString()));
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
@ -21,9 +21,10 @@ import com.google.gson.stream.JsonReader;
|
|||
import com.google.gson.stream.JsonWriter;
|
||||
import com.tribufu.generated.models.UserType;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
|
||||
|
|
@ -53,7 +54,7 @@ import com.tribufu.generated.JSON;
|
|||
/**
|
||||
* UserInfo
|
||||
*/
|
||||
@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 UserInfo {
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
|
|
@ -80,56 +81,16 @@ public class UserInfo {
|
|||
@javax.annotation.Nullable
|
||||
private String email;
|
||||
|
||||
public static final String SERIALIZED_NAME_EMAIL_VERIFIED = "email_verified";
|
||||
@SerializedName(SERIALIZED_NAME_EMAIL_VERIFIED)
|
||||
@javax.annotation.Nullable
|
||||
private Boolean emailVerified;
|
||||
|
||||
public static final String SERIALIZED_NAME_TYPE = "type";
|
||||
@SerializedName(SERIALIZED_NAME_TYPE)
|
||||
@javax.annotation.Nullable
|
||||
private UserType type;
|
||||
|
||||
public static final String SERIALIZED_NAME_FLAGS = "flags";
|
||||
@SerializedName(SERIALIZED_NAME_FLAGS)
|
||||
@javax.annotation.Nullable
|
||||
private String flags;
|
||||
|
||||
public static final String SERIALIZED_NAME_PERMISSIONS = "permissions";
|
||||
@SerializedName(SERIALIZED_NAME_PERMISSIONS)
|
||||
@javax.annotation.Nullable
|
||||
private String permissions;
|
||||
|
||||
public static final String SERIALIZED_NAME_VERIFIED = "verified";
|
||||
@SerializedName(SERIALIZED_NAME_VERIFIED)
|
||||
@javax.annotation.Nullable
|
||||
private Boolean verified;
|
||||
|
||||
public static final String SERIALIZED_NAME_LEVEL = "level";
|
||||
@SerializedName(SERIALIZED_NAME_LEVEL)
|
||||
@javax.annotation.Nullable
|
||||
private Integer level;
|
||||
|
||||
public static final String SERIALIZED_NAME_EXPERIENCE = "experience";
|
||||
@SerializedName(SERIALIZED_NAME_EXPERIENCE)
|
||||
@javax.annotation.Nullable
|
||||
private Double experience;
|
||||
|
||||
public static final String SERIALIZED_NAME_PUBLIC_BIRTHDAY = "public_birthday";
|
||||
@SerializedName(SERIALIZED_NAME_PUBLIC_BIRTHDAY)
|
||||
@javax.annotation.Nullable
|
||||
private Boolean publicBirthday;
|
||||
|
||||
public static final String SERIALIZED_NAME_BIRTHDAY = "birthday";
|
||||
@SerializedName(SERIALIZED_NAME_BIRTHDAY)
|
||||
@javax.annotation.Nullable
|
||||
private LocalDate birthday;
|
||||
|
||||
public static final String SERIALIZED_NAME_POINTS = "points";
|
||||
@SerializedName(SERIALIZED_NAME_POINTS)
|
||||
@javax.annotation.Nullable
|
||||
private Double points;
|
||||
|
||||
public static final String SERIALIZED_NAME_LOCATION = "location";
|
||||
@SerializedName(SERIALIZED_NAME_LOCATION)
|
||||
@javax.annotation.Nullable
|
||||
private String location;
|
||||
|
||||
public static final String SERIALIZED_NAME_LANGUAGE = "language";
|
||||
@SerializedName(SERIALIZED_NAME_LANGUAGE)
|
||||
@javax.annotation.Nullable
|
||||
|
|
@ -150,25 +111,10 @@ public class UserInfo {
|
|||
@javax.annotation.Nullable
|
||||
private String photoUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_BANNER_URL = "banner_url";
|
||||
@SerializedName(SERIALIZED_NAME_BANNER_URL)
|
||||
public static final String SERIALIZED_NAME_PERMISSIONS = "permissions";
|
||||
@SerializedName(SERIALIZED_NAME_PERMISSIONS)
|
||||
@javax.annotation.Nullable
|
||||
private String bannerUrl;
|
||||
|
||||
public static final String SERIALIZED_NAME_LAST_ONLINE = "last_online";
|
||||
@SerializedName(SERIALIZED_NAME_LAST_ONLINE)
|
||||
@javax.annotation.Nullable
|
||||
private OffsetDateTime lastOnline;
|
||||
|
||||
public static final String SERIALIZED_NAME_BIOGRAPHY = "biography";
|
||||
@SerializedName(SERIALIZED_NAME_BIOGRAPHY)
|
||||
@javax.annotation.Nullable
|
||||
private String biography;
|
||||
|
||||
public static final String SERIALIZED_NAME_VIEW_COUNT = "view_count";
|
||||
@SerializedName(SERIALIZED_NAME_VIEW_COUNT)
|
||||
@javax.annotation.Nullable
|
||||
private Integer viewCount;
|
||||
private List<String> permissions;
|
||||
|
||||
public static final String SERIALIZED_NAME_CREATED = "created";
|
||||
@SerializedName(SERIALIZED_NAME_CREATED)
|
||||
|
|
@ -278,6 +224,25 @@ public class UserInfo {
|
|||
}
|
||||
|
||||
|
||||
public UserInfo emailVerified(@javax.annotation.Nullable Boolean emailVerified) {
|
||||
this.emailVerified = emailVerified;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get emailVerified
|
||||
* @return emailVerified
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Boolean getEmailVerified() {
|
||||
return emailVerified;
|
||||
}
|
||||
|
||||
public void setEmailVerified(@javax.annotation.Nullable Boolean emailVerified) {
|
||||
this.emailVerified = emailVerified;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo type(@javax.annotation.Nullable UserType type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
|
|
@ -297,177 +262,6 @@ public class UserInfo {
|
|||
}
|
||||
|
||||
|
||||
public UserInfo flags(@javax.annotation.Nullable String flags) {
|
||||
this.flags = flags;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get flags
|
||||
* @return flags
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getFlags() {
|
||||
return flags;
|
||||
}
|
||||
|
||||
public void setFlags(@javax.annotation.Nullable String flags) {
|
||||
this.flags = flags;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo permissions(@javax.annotation.Nullable String permissions) {
|
||||
this.permissions = permissions;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get permissions
|
||||
* @return permissions
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getPermissions() {
|
||||
return permissions;
|
||||
}
|
||||
|
||||
public void setPermissions(@javax.annotation.Nullable String permissions) {
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo verified(@javax.annotation.Nullable Boolean verified) {
|
||||
this.verified = verified;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get verified
|
||||
* @return verified
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Boolean getVerified() {
|
||||
return verified;
|
||||
}
|
||||
|
||||
public void setVerified(@javax.annotation.Nullable Boolean verified) {
|
||||
this.verified = verified;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo level(@javax.annotation.Nullable Integer level) {
|
||||
this.level = level;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get level
|
||||
* @return level
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(@javax.annotation.Nullable Integer level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo experience(@javax.annotation.Nullable Double experience) {
|
||||
this.experience = experience;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get experience
|
||||
* @return experience
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Double getExperience() {
|
||||
return experience;
|
||||
}
|
||||
|
||||
public void setExperience(@javax.annotation.Nullable Double experience) {
|
||||
this.experience = experience;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo publicBirthday(@javax.annotation.Nullable Boolean publicBirthday) {
|
||||
this.publicBirthday = publicBirthday;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get publicBirthday
|
||||
* @return publicBirthday
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Boolean getPublicBirthday() {
|
||||
return publicBirthday;
|
||||
}
|
||||
|
||||
public void setPublicBirthday(@javax.annotation.Nullable Boolean publicBirthday) {
|
||||
this.publicBirthday = publicBirthday;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo birthday(@javax.annotation.Nullable LocalDate birthday) {
|
||||
this.birthday = birthday;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get birthday
|
||||
* @return birthday
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public LocalDate getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthday(@javax.annotation.Nullable LocalDate birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo points(@javax.annotation.Nullable Double points) {
|
||||
this.points = points;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get points
|
||||
* @return points
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Double getPoints() {
|
||||
return points;
|
||||
}
|
||||
|
||||
public void setPoints(@javax.annotation.Nullable Double points) {
|
||||
this.points = points;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo location(@javax.annotation.Nullable String location) {
|
||||
this.location = location;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get location
|
||||
* @return location
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(@javax.annotation.Nullable String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo language(@javax.annotation.Nullable String language) {
|
||||
this.language = language;
|
||||
return this;
|
||||
|
|
@ -544,79 +338,30 @@ public class UserInfo {
|
|||
}
|
||||
|
||||
|
||||
public UserInfo bannerUrl(@javax.annotation.Nullable String bannerUrl) {
|
||||
this.bannerUrl = bannerUrl;
|
||||
public UserInfo permissions(@javax.annotation.Nullable List<String> permissions) {
|
||||
this.permissions = permissions;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UserInfo addPermissionsItem(String permissionsItem) {
|
||||
if (this.permissions == null) {
|
||||
this.permissions = new ArrayList<>();
|
||||
}
|
||||
this.permissions.add(permissionsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bannerUrl
|
||||
* @return bannerUrl
|
||||
* Get permissions
|
||||
* @return permissions
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getBannerUrl() {
|
||||
return bannerUrl;
|
||||
public List<String> getPermissions() {
|
||||
return permissions;
|
||||
}
|
||||
|
||||
public void setBannerUrl(@javax.annotation.Nullable String bannerUrl) {
|
||||
this.bannerUrl = bannerUrl;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo lastOnline(@javax.annotation.Nullable OffsetDateTime lastOnline) {
|
||||
this.lastOnline = lastOnline;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lastOnline
|
||||
* @return lastOnline
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public OffsetDateTime getLastOnline() {
|
||||
return lastOnline;
|
||||
}
|
||||
|
||||
public void setLastOnline(@javax.annotation.Nullable OffsetDateTime lastOnline) {
|
||||
this.lastOnline = lastOnline;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo biography(@javax.annotation.Nullable String biography) {
|
||||
this.biography = biography;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get biography
|
||||
* @return biography
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public String getBiography() {
|
||||
return biography;
|
||||
}
|
||||
|
||||
public void setBiography(@javax.annotation.Nullable String biography) {
|
||||
this.biography = biography;
|
||||
}
|
||||
|
||||
|
||||
public UserInfo viewCount(@javax.annotation.Nullable Integer viewCount) {
|
||||
this.viewCount = viewCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get viewCount
|
||||
* @return viewCount
|
||||
*/
|
||||
@javax.annotation.Nullable
|
||||
public Integer getViewCount() {
|
||||
return viewCount;
|
||||
}
|
||||
|
||||
public void setViewCount(@javax.annotation.Nullable Integer viewCount) {
|
||||
this.viewCount = viewCount;
|
||||
public void setPermissions(@javax.annotation.Nullable List<String> permissions) {
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -673,24 +418,13 @@ public class UserInfo {
|
|||
Objects.equals(this.name, userInfo.name) &&
|
||||
Objects.equals(this.displayName, userInfo.displayName) &&
|
||||
Objects.equals(this.email, userInfo.email) &&
|
||||
Objects.equals(this.emailVerified, userInfo.emailVerified) &&
|
||||
Objects.equals(this.type, userInfo.type) &&
|
||||
Objects.equals(this.flags, userInfo.flags) &&
|
||||
Objects.equals(this.permissions, userInfo.permissions) &&
|
||||
Objects.equals(this.verified, userInfo.verified) &&
|
||||
Objects.equals(this.level, userInfo.level) &&
|
||||
Objects.equals(this.experience, userInfo.experience) &&
|
||||
Objects.equals(this.publicBirthday, userInfo.publicBirthday) &&
|
||||
Objects.equals(this.birthday, userInfo.birthday) &&
|
||||
Objects.equals(this.points, userInfo.points) &&
|
||||
Objects.equals(this.location, userInfo.location) &&
|
||||
Objects.equals(this.language, userInfo.language) &&
|
||||
Objects.equals(this.timezone, userInfo.timezone) &&
|
||||
Objects.equals(this.currency, userInfo.currency) &&
|
||||
Objects.equals(this.photoUrl, userInfo.photoUrl) &&
|
||||
Objects.equals(this.bannerUrl, userInfo.bannerUrl) &&
|
||||
Objects.equals(this.lastOnline, userInfo.lastOnline) &&
|
||||
Objects.equals(this.biography, userInfo.biography) &&
|
||||
Objects.equals(this.viewCount, userInfo.viewCount) &&
|
||||
Objects.equals(this.permissions, userInfo.permissions) &&
|
||||
Objects.equals(this.created, userInfo.created) &&
|
||||
Objects.equals(this.updated, userInfo.updated);
|
||||
}
|
||||
|
|
@ -701,7 +435,7 @@ public class UserInfo {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, uuid, name, displayName, email, type, flags, permissions, verified, level, experience, publicBirthday, birthday, points, location, language, timezone, currency, photoUrl, bannerUrl, lastOnline, biography, viewCount, created, updated);
|
||||
return Objects.hash(id, uuid, name, displayName, email, emailVerified, type, language, timezone, currency, photoUrl, permissions, created, updated);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
|
|
@ -720,24 +454,13 @@ public class UserInfo {
|
|||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
|
||||
sb.append(" email: ").append(toIndentedString(email)).append("\n");
|
||||
sb.append(" emailVerified: ").append(toIndentedString(emailVerified)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append(" flags: ").append(toIndentedString(flags)).append("\n");
|
||||
sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n");
|
||||
sb.append(" verified: ").append(toIndentedString(verified)).append("\n");
|
||||
sb.append(" level: ").append(toIndentedString(level)).append("\n");
|
||||
sb.append(" experience: ").append(toIndentedString(experience)).append("\n");
|
||||
sb.append(" publicBirthday: ").append(toIndentedString(publicBirthday)).append("\n");
|
||||
sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n");
|
||||
sb.append(" points: ").append(toIndentedString(points)).append("\n");
|
||||
sb.append(" location: ").append(toIndentedString(location)).append("\n");
|
||||
sb.append(" language: ").append(toIndentedString(language)).append("\n");
|
||||
sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n");
|
||||
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
|
||||
sb.append(" photoUrl: ").append(toIndentedString(photoUrl)).append("\n");
|
||||
sb.append(" bannerUrl: ").append(toIndentedString(bannerUrl)).append("\n");
|
||||
sb.append(" lastOnline: ").append(toIndentedString(lastOnline)).append("\n");
|
||||
sb.append(" biography: ").append(toIndentedString(biography)).append("\n");
|
||||
sb.append(" viewCount: ").append(toIndentedString(viewCount)).append("\n");
|
||||
sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n");
|
||||
sb.append(" created: ").append(toIndentedString(created)).append("\n");
|
||||
sb.append(" updated: ").append(toIndentedString(updated)).append("\n");
|
||||
sb.append("}");
|
||||
|
|
@ -767,29 +490,19 @@ public class UserInfo {
|
|||
openapiFields.add("name");
|
||||
openapiFields.add("display_name");
|
||||
openapiFields.add("email");
|
||||
openapiFields.add("email_verified");
|
||||
openapiFields.add("type");
|
||||
openapiFields.add("flags");
|
||||
openapiFields.add("permissions");
|
||||
openapiFields.add("verified");
|
||||
openapiFields.add("level");
|
||||
openapiFields.add("experience");
|
||||
openapiFields.add("public_birthday");
|
||||
openapiFields.add("birthday");
|
||||
openapiFields.add("points");
|
||||
openapiFields.add("location");
|
||||
openapiFields.add("language");
|
||||
openapiFields.add("timezone");
|
||||
openapiFields.add("currency");
|
||||
openapiFields.add("photo_url");
|
||||
openapiFields.add("banner_url");
|
||||
openapiFields.add("last_online");
|
||||
openapiFields.add("biography");
|
||||
openapiFields.add("view_count");
|
||||
openapiFields.add("permissions");
|
||||
openapiFields.add("created");
|
||||
openapiFields.add("updated");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -812,6 +525,13 @@ public class UserInfo {
|
|||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// check to make sure all required properties/fields are present in the JSON string
|
||||
for (String requiredField : UserInfo.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()));
|
||||
|
|
@ -832,15 +552,6 @@ public class UserInfo {
|
|||
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
|
||||
UserType.validateJsonElement(jsonObj.get("type"));
|
||||
}
|
||||
if ((jsonObj.get("flags") != null && !jsonObj.get("flags").isJsonNull()) && !jsonObj.get("flags").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `flags` to be a primitive type in the JSON string but got `%s`", jsonObj.get("flags").toString()));
|
||||
}
|
||||
if ((jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull()) && !jsonObj.get("permissions").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `permissions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("permissions").toString()));
|
||||
}
|
||||
if ((jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) && !jsonObj.get("location").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString()));
|
||||
}
|
||||
if ((jsonObj.get("language") != null && !jsonObj.get("language").isJsonNull()) && !jsonObj.get("language").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `language` to be a primitive type in the JSON string but got `%s`", jsonObj.get("language").toString()));
|
||||
}
|
||||
|
|
@ -853,11 +564,9 @@ public class UserInfo {
|
|||
if ((jsonObj.get("photo_url") != null && !jsonObj.get("photo_url").isJsonNull()) && !jsonObj.get("photo_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `photo_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("photo_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("banner_url") != null && !jsonObj.get("banner_url").isJsonNull()) && !jsonObj.get("banner_url").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `banner_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("banner_url").toString()));
|
||||
}
|
||||
if ((jsonObj.get("biography") != null && !jsonObj.get("biography").isJsonNull()) && !jsonObj.get("biography").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `biography` to be a primitive type in the JSON string but got `%s`", jsonObj.get("biography").toString()));
|
||||
// ensure the optional json data is an array if present
|
||||
if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull() && !jsonObj.get("permissions").isJsonArray()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue