diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 9953bfc..6aef3a2 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -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 diff --git a/build.gradle b/build.gradle index fddd294..3eae81f 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37aef8d..509c4a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 9b1be85..e6d285a 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -1,3 +1,3 @@ - + diff --git a/src/main/java/com/tribufu/generated/ApiCallback.java b/src/main/java/com/tribufu/generated/ApiCallback.java index 19ab1a9..1701652 100644 --- a/src/main/java/com/tribufu/generated/ApiCallback.java +++ b/src/main/java/com/tribufu/generated/ApiCallback.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/ApiClient.java b/src/main/java/com/tribufu/generated/ApiClient.java index 508a614..7d944e1 100644 --- a/src/main/java/com/tribufu/generated/ApiClient.java +++ b/src/main/java/com/tribufu/generated/ApiClient.java @@ -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(); } diff --git a/src/main/java/com/tribufu/generated/ApiException.java b/src/main/java/com/tribufu/generated/ApiException.java index 831428c..1c8d40c 100644 --- a/src/main/java/com/tribufu/generated/ApiException.java +++ b/src/main/java/com/tribufu/generated/ApiException.java @@ -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; *

ApiException class.

*/ @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; diff --git a/src/main/java/com/tribufu/generated/ApiResponse.java b/src/main/java/com/tribufu/generated/ApiResponse.java index a8dca04..382408f 100644 --- a/src/main/java/com/tribufu/generated/ApiResponse.java +++ b/src/main/java/com/tribufu/generated/ApiResponse.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/Configuration.java b/src/main/java/com/tribufu/generated/Configuration.java index cc049f6..2ecebd2 100644 --- a/src/main/java/com/tribufu/generated/Configuration.java +++ b/src/main/java/com/tribufu/generated/Configuration.java @@ -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(); diff --git a/src/main/java/com/tribufu/generated/GzipRequestInterceptor.java b/src/main/java/com/tribufu/generated/GzipRequestInterceptor.java index 954aa08..f05c219 100644 --- a/src/main/java/com/tribufu/generated/GzipRequestInterceptor.java +++ b/src/main/java/com/tribufu/generated/GzipRequestInterceptor.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/JSON.java b/src/main/java/com/tribufu/generated/JSON.java index d0f8ef5..9dcee62 100644 --- a/src/main/java/com/tribufu/generated/JSON.java +++ b/src/main/java/com/tribufu/generated/JSON.java @@ -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()); diff --git a/src/main/java/com/tribufu/generated/Pair.java b/src/main/java/com/tribufu/generated/Pair.java index 198e3c8..30c17b9 100644 --- a/src/main/java/com/tribufu/generated/Pair.java +++ b/src/main/java/com/tribufu/generated/Pair.java @@ -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 = ""; diff --git a/src/main/java/com/tribufu/generated/ProgressRequestBody.java b/src/main/java/com/tribufu/generated/ProgressRequestBody.java index 86cbdd4..dbc82fc 100644 --- a/src/main/java/com/tribufu/generated/ProgressRequestBody.java +++ b/src/main/java/com/tribufu/generated/ProgressRequestBody.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/ProgressResponseBody.java b/src/main/java/com/tribufu/generated/ProgressResponseBody.java index d120fee..b79132a 100644 --- a/src/main/java/com/tribufu/generated/ProgressResponseBody.java +++ b/src/main/java/com/tribufu/generated/ProgressResponseBody.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/ServerConfiguration.java b/src/main/java/com/tribufu/generated/ServerConfiguration.java index e6b20f2..8d2529a 100644 --- a/src/main/java/com/tribufu/generated/ServerConfiguration.java +++ b/src/main/java/com/tribufu/generated/ServerConfiguration.java @@ -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; diff --git a/src/main/java/com/tribufu/generated/ServerVariable.java b/src/main/java/com/tribufu/generated/ServerVariable.java index 153a024..ae1cd41 100644 --- a/src/main/java/com/tribufu/generated/ServerVariable.java +++ b/src/main/java/com/tribufu/generated/ServerVariable.java @@ -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; diff --git a/src/main/java/com/tribufu/generated/StringUtil.java b/src/main/java/com/tribufu/generated/StringUtil.java index 757c8ee..4804686 100644 --- a/src/main/java/com/tribufu/generated/StringUtil.java +++ b/src/main/java/com/tribufu/generated/StringUtil.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/api/TribufuGeneratedApi.java b/src/main/java/com/tribufu/generated/api/TribufuGeneratedApi.java index e3067a2..5202033 100644 --- a/src/main/java/com/tribufu/generated/api/TribufuGeneratedApi.java +++ b/src/main/java/com/tribufu/generated/api/TribufuGeneratedApi.java @@ -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). @@ -29,30 +29,32 @@ import java.io.IOException; import com.tribufu.generated.models.Account; import com.tribufu.generated.models.AuthorizeRequest; +import com.tribufu.generated.models.Client; +import com.tribufu.generated.models.ClientInfo; +import com.tribufu.generated.models.CodeResponse; +import com.tribufu.generated.models.CreateUser; import com.tribufu.generated.models.CryptoViewModel; import com.tribufu.generated.models.Game; import com.tribufu.generated.models.GameServer; import com.tribufu.generated.models.GameServerCluster; +import com.tribufu.generated.models.GameServerQuery; import com.tribufu.generated.models.Group; -import com.tribufu.generated.models.GroupGame; +import com.tribufu.generated.models.GroupApplication; import com.tribufu.generated.models.GroupMember; import com.tribufu.generated.models.HashViewModel; import com.tribufu.generated.models.IntrospectRequest; +import com.tribufu.generated.models.IntrospectResponse; import com.tribufu.generated.models.IpAddress; import com.tribufu.generated.models.LeaderboardItem; import com.tribufu.generated.models.LeaderboardOrder; -import com.tribufu.generated.models.LoginRequest; -import com.tribufu.generated.models.LoginResponse; import com.tribufu.generated.models.ModelPackage; +import com.tribufu.generated.models.Product; import com.tribufu.generated.models.Profile; import com.tribufu.generated.models.ProfileGame; import com.tribufu.generated.models.ProfileGroup; -import com.tribufu.generated.models.RefreshRequest; -import com.tribufu.generated.models.RegisterRequest; import com.tribufu.generated.models.RevokeRequest; -import com.tribufu.generated.models.SearchRequest; +import com.tribufu.generated.models.Search; import com.tribufu.generated.models.ServerMetrics; -import com.tribufu.generated.models.Subscription; import com.tribufu.generated.models.TokenRequest; import com.tribufu.generated.models.TokenResponse; import java.util.UUID; @@ -141,6 +143,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -148,10 +151,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -172,6 +172,7 @@ public class TribufuGeneratedApi { * Authorize the client to access the user information. * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.authorize</code> * @param authorizeRequest (optional) + * @return CodeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -180,15 +181,16 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public void authorize(AuthorizeRequest authorizeRequest) throws ApiException { - authorizeWithHttpInfo(authorizeRequest); + public CodeResponse authorize(AuthorizeRequest authorizeRequest) throws ApiException { + ApiResponse localVarResp = authorizeWithHttpInfo(authorizeRequest); + return localVarResp.getData(); } /** * Authorize the client to access the user information. * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.authorize</code> * @param authorizeRequest (optional) - * @return ApiResponse<Void> + * @return ApiResponse<CodeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -197,9 +199,10 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public ApiResponse authorizeWithHttpInfo(AuthorizeRequest authorizeRequest) throws ApiException { + public ApiResponse authorizeWithHttpInfo(AuthorizeRequest authorizeRequest) throws ApiException { okhttp3.Call localVarCall = authorizeValidateBeforeCall(authorizeRequest, null); - return localVarApiClient.execute(localVarCall); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -216,10 +219,11 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call authorizeAsync(AuthorizeRequest authorizeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call authorizeAsync(AuthorizeRequest authorizeRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = authorizeValidateBeforeCall(authorizeRequest, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** @@ -513,7 +517,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = body; // create path and map variables - String localVarPath = "/v1/servers/{id}/claim" + String localVarPath = "/v1/games/servers/{id}/claim" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -530,10 +534,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -557,7 +558,7 @@ public class TribufuGeneratedApi { /** * Claim a game server. - * This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.community.game.server.claim</code> + * This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> * @param id (required) * @param body (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -574,7 +575,7 @@ public class TribufuGeneratedApi { /** * Claim a game server. - * This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.community.game.server.claim</code> + * This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> * @param id (required) * @param body (optional) * @return ApiResponse<Void> @@ -593,7 +594,7 @@ public class TribufuGeneratedApi { /** * Claim a game server. (asynchronously) - * This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.community.game.server.claim</code> + * This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> * @param id (required) * @param body (optional) * @param _callback The callback to be executed when the API call finishes @@ -612,6 +613,142 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for claimGameServerV1 + * @param id (required) + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call claimGameServerV1Call(String id, Object body, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/v1/servers/{id}/claim" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call claimGameServerV1ValidateBeforeCall(String id, Object body, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling claimGameServerV1(Async)"); + } + + return claimGameServerV1Call(id, body, _callback); + + } + + /** + * Claim a game server. + * This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> + * @param id (required) + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public void claimGameServerV1(String id, Object body) throws ApiException { + claimGameServerV1WithHttpInfo(id, body); + } + + /** + * Claim a game server. + * This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> + * @param id (required) + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse claimGameServerV1WithHttpInfo(String id, Object body) throws ApiException { + okhttp3.Call localVarCall = claimGameServerV1ValidateBeforeCall(id, body, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Claim a game server. (asynchronously) + * This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> + * @param id (required) + * @param body (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call claimGameServerV1Async(String id, Object body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = claimGameServerV1ValidateBeforeCall(id, body, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for convertBase64 * @param cryptoViewModel (optional) @@ -651,9 +788,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -661,10 +796,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -739,6 +871,123 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for createClient + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call createClientCall(Object body, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/v1/oauth2/clients"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createClientValidateBeforeCall(Object body, final ApiCallback _callback) throws ApiException { + return createClientCall(body, _callback); + + } + + /** + * Create an oauth2 client. + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.create</code> + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public void createClient(Object body) throws ApiException { + createClientWithHttpInfo(body); + } + + /** + * Create an oauth2 client. + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.create</code> + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse createClientWithHttpInfo(Object body) throws ApiException { + okhttp3.Call localVarCall = createClientValidateBeforeCall(body, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Create an oauth2 client. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.create</code> + * @param body (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call createClientAsync(Object body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createClientValidateBeforeCall(body, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for createGameServer * @param body (optional) @@ -769,7 +1018,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = body; // create path and map variables - String localVarPath = "/v1/servers"; + String localVarPath = "/v1/games/servers"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -785,10 +1034,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -807,7 +1053,7 @@ public class TribufuGeneratedApi { /** * Create a new game server. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.create</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> * @param body (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -823,7 +1069,7 @@ public class TribufuGeneratedApi { /** * Create a new game server. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.create</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> * @param body (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -841,7 +1087,7 @@ public class TribufuGeneratedApi { /** * Create a new game server. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.create</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> * @param body (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -889,7 +1135,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = body; // create path and map variables - String localVarPath = "/v1/clusters"; + String localVarPath = "/v1/games/servers/clusters"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -905,10 +1151,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -927,7 +1170,7 @@ public class TribufuGeneratedApi { /** * Create a new game server cluster. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.create</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> * @param body (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -943,7 +1186,7 @@ public class TribufuGeneratedApi { /** * Create a new game server cluster. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.create</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> * @param body (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -961,7 +1204,7 @@ public class TribufuGeneratedApi { /** * Create a new game server cluster. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.create</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> * @param body (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -979,6 +1222,258 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for createGameServerClusterV1 + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call createGameServerClusterV1Call(Object body, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/v1/clusters"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call createGameServerClusterV1ValidateBeforeCall(Object body, final ApiCallback _callback) throws ApiException { + return createGameServerClusterV1Call(body, _callback); + + } + + /** + * Create a new game server cluster. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public void createGameServerClusterV1(Object body) throws ApiException { + createGameServerClusterV1WithHttpInfo(body); + } + + /** + * Create a new game server cluster. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse createGameServerClusterV1WithHttpInfo(Object body) throws ApiException { + okhttp3.Call localVarCall = createGameServerClusterV1ValidateBeforeCall(body, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Create a new game server cluster. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> + * @param body (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call createGameServerClusterV1Async(Object body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createGameServerClusterV1ValidateBeforeCall(body, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for createGameServerV1 + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call createGameServerV1Call(Object body, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/v1/servers"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call createGameServerV1ValidateBeforeCall(Object body, final ApiCallback _callback) throws ApiException { + return createGameServerV1Call(body, _callback); + + } + + /** + * Create a new game server. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public void createGameServerV1(Object body) throws ApiException { + createGameServerV1WithHttpInfo(body); + } + + /** + * Create a new game server. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse createGameServerV1WithHttpInfo(Object body) throws ApiException { + okhttp3.Call localVarCall = createGameServerV1ValidateBeforeCall(body, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Create a new game server. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> + * @param body (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call createGameServerV1Async(Object body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createGameServerV1ValidateBeforeCall(body, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for createGroup * @param body (optional) @@ -1025,10 +1520,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1138,9 +1630,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1224,6 +1714,245 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for createUser + * @param createUser (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call createUserCall(CreateUser createUser, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createUser; + + // create path and map variables + String localVarPath = "/v1/users"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createUserValidateBeforeCall(CreateUser createUser, final ApiCallback _callback) throws ApiException { + return createUserCall(createUser, _callback); + + } + + /** + * Create an user. + * This endpoint is only available with client credentials. + * @param createUser (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public void createUser(CreateUser createUser) throws ApiException { + createUserWithHttpInfo(createUser); + } + + /** + * Create an user. + * This endpoint is only available with client credentials. + * @param createUser (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse createUserWithHttpInfo(CreateUser createUser) throws ApiException { + okhttp3.Call localVarCall = createUserValidateBeforeCall(createUser, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Create an user. (asynchronously) + * This endpoint is only available with client credentials. + * @param createUser (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call createUserAsync(CreateUser createUser, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createUserValidateBeforeCall(createUser, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteClient + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call deleteClientCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/oauth2/clients/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteClientValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteClient(Async)"); + } + + return deleteClientCall(id, _callback); + + } + + /** + * Delete an oauth2 client. + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.delete</code> + * @param id (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public void deleteClient(String id) throws ApiException { + deleteClientWithHttpInfo(id); + } + + /** + * Delete an oauth2 client. + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.delete</code> + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse deleteClientWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = deleteClientValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete an oauth2 client. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.delete</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call deleteClientAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteClientValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for deleteGameServer * @param id (required) @@ -1254,7 +1983,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/servers/{id}" + String localVarPath = "/v1/games/servers/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -1294,7 +2023,7 @@ public class TribufuGeneratedApi { /** * Delete a game server. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.delete</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> * @param id (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1310,7 +2039,7 @@ public class TribufuGeneratedApi { /** * Delete a game server. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.delete</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> * @param id (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1328,7 +2057,7 @@ public class TribufuGeneratedApi { /** * Delete a game server. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.delete</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> * @param id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1376,7 +2105,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/clusters/{id}" + String localVarPath = "/v1/games/servers/clusters/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -1416,7 +2145,7 @@ public class TribufuGeneratedApi { /** * Delete a game server cluster. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.delete</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> * @param id (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1432,7 +2161,7 @@ public class TribufuGeneratedApi { /** * Delete a game server cluster. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.delete</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> * @param id (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1450,7 +2179,7 @@ public class TribufuGeneratedApi { /** * Delete a game server cluster. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.delete</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> * @param id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1468,6 +2197,268 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for deleteGameServerClusterV1 + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call deleteGameServerClusterV1Call(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/clusters/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteGameServerClusterV1ValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteGameServerClusterV1(Async)"); + } + + return deleteGameServerClusterV1Call(id, _callback); + + } + + /** + * Delete a game server cluster. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> + * @param id (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public void deleteGameServerClusterV1(String id) throws ApiException { + deleteGameServerClusterV1WithHttpInfo(id); + } + + /** + * Delete a game server cluster. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse deleteGameServerClusterV1WithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = deleteGameServerClusterV1ValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a game server cluster. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call deleteGameServerClusterV1Async(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteGameServerClusterV1ValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteGameServerV1 + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call deleteGameServerV1Call(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/servers/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteGameServerV1ValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteGameServerV1(Async)"); + } + + return deleteGameServerV1Call(id, _callback); + + } + + /** + * Delete a game server. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> + * @param id (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public void deleteGameServerV1(String id) throws ApiException { + deleteGameServerV1WithHttpInfo(id); + } + + /** + * Delete a game server. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse deleteGameServerV1WithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = deleteGameServerV1ValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a game server. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call deleteGameServerV1Async(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteGameServerV1ValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for deleteGroup * @param id (required) @@ -1590,6 +2581,128 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for deletePackage + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call deletePackageCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/packages/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deletePackageValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deletePackage(Async)"); + } + + return deletePackageCall(id, _callback); + + } + + /** + * Delete an package. + * <b>🔒 Required permissions:</b> <code>tribufu.community.package.delete</code> + * @param id (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public void deletePackage(String id) throws ApiException { + deletePackageWithHttpInfo(id); + } + + /** + * Delete an package. + * <b>🔒 Required permissions:</b> <code>tribufu.community.package.delete</code> + * @param id (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse deletePackageWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = deletePackageValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete an package. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.package.delete</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call deletePackageAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deletePackageValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for generateFlakeId * @param amount (optional) @@ -1633,9 +2746,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1762,9 +2873,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1902,9 +3011,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2037,9 +3144,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2124,6 +3229,133 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getClientById + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getClientByIdCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/oauth2/clients/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getClientByIdValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getClientById(Async)"); + } + + return getClientByIdCall(id, _callback); + + } + + /** + * Get a oauth2 client by id. + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.get</code> + * @param id (required) + * @return Client + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public Client getClientById(String id) throws ApiException { + ApiResponse localVarResp = getClientByIdWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Get a oauth2 client by id. + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.get</code> + * @param id (required) + * @return ApiResponse<Client> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse getClientByIdWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getClientByIdValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a oauth2 client by id. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.get</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getClientByIdAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getClientByIdValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getClientInfo * @param _callback Callback for upload/download progress @@ -2162,6 +3394,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2188,6 +3421,7 @@ public class TribufuGeneratedApi { /** * Get current client information. * + * @return ClientInfo * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -2196,14 +3430,15 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public void getClientInfo() throws ApiException { - getClientInfoWithHttpInfo(); + public ClientInfo getClientInfo() throws ApiException { + ApiResponse localVarResp = getClientInfoWithHttpInfo(); + return localVarResp.getData(); } /** * Get current client information. * - * @return ApiResponse<Void> + * @return ApiResponse<ClientInfo> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -2212,9 +3447,10 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public ApiResponse getClientInfoWithHttpInfo() throws ApiException { + public ApiResponse getClientInfoWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getClientInfoValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -2230,10 +3466,152 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call getClientInfoAsync(final ApiCallback _callback) throws ApiException { + public okhttp3.Call getClientInfoAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getClientInfoValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getClients + * @param organizationId Filters results by organization, defaults to all organizations the user belongs to. (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getClientsCall(String organizationId, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/oauth2/clients"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (organizationId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("organization_id", organizationId)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getClientsValidateBeforeCall(String organizationId, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + return getClientsCall(organizationId, page, limit, _callback); + + } + + /** + * Get a list of oauth2 clients. + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.list</code> + * @param organizationId Filters results by organization, defaults to all organizations the user belongs to. (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<Client> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public List getClients(String organizationId, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getClientsWithHttpInfo(organizationId, page, limit); + return localVarResp.getData(); + } + + /** + * Get a list of oauth2 clients. + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.list</code> + * @param organizationId Filters results by organization, defaults to all organizations the user belongs to. (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<Client>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse> getClientsWithHttpInfo(String organizationId, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getClientsValidateBeforeCall(organizationId, page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of oauth2 clients. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.list</code> + * @param organizationId Filters results by organization, defaults to all organizations the user belongs to. (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getClientsAsync(String organizationId, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getClientsValidateBeforeCall(organizationId, page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** @@ -2274,9 +3652,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2302,7 +3678,7 @@ public class TribufuGeneratedApi { /** * Get current ip address location. - * <b>🔒 Required permissions:</b> <code>tribufu.geoip.current</code> + * * @return List<IpAddress> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -2319,7 +3695,7 @@ public class TribufuGeneratedApi { /** * Get current ip address location. - * <b>🔒 Required permissions:</b> <code>tribufu.geoip.current</code> + * * @return ApiResponse<List<IpAddress>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -2337,7 +3713,7 @@ public class TribufuGeneratedApi { /** * Get current ip address location. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.geoip.current</code> + * * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -2395,9 +3771,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2428,7 +3802,7 @@ public class TribufuGeneratedApi { /** * Get a game by id. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.get</code> * @param id (required) * @return Game * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -2446,7 +3820,7 @@ public class TribufuGeneratedApi { /** * Get a game by id. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.get</code> * @param id (required) * @return ApiResponse<Game> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -2465,7 +3839,7 @@ public class TribufuGeneratedApi { /** * Get a game by id. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.get</code> * @param id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -2484,296 +3858,6 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getGameClustersByGameId - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getGameClustersByGameIdCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v1/games/{id}/clusters" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getGameClustersByGameIdValidateBeforeCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getGameClustersByGameId(Async)"); - } - - return getGameClustersByGameIdCall(id, page, limit, _callback); - - } - - /** - * Get a list of game server clusters of a game. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.list</code> - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @return List<GameServerCluster> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public List getGameClustersByGameId(String id, Integer page, Integer limit) throws ApiException { - ApiResponse> localVarResp = getGameClustersByGameIdWithHttpInfo(id, page, limit); - return localVarResp.getData(); - } - - /** - * Get a list of game server clusters of a game. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.list</code> - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @return ApiResponse<List<GameServerCluster>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public ApiResponse> getGameClustersByGameIdWithHttpInfo(String id, Integer page, Integer limit) throws ApiException { - okhttp3.Call localVarCall = getGameClustersByGameIdValidateBeforeCall(id, page, limit, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a list of game server clusters of a game. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.list</code> - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getGameClustersByGameIdAsync(String id, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getGameClustersByGameIdValidateBeforeCall(id, page, limit, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getGameItems - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getGameItemsCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v1/games/{id}/items" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getGameItemsValidateBeforeCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getGameItems(Async)"); - } - - return getGameItemsCall(id, page, limit, _callback); - - } - - /** - * Get a list of game items. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.item.list</code> - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @return List<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public List getGameItems(String id, Integer page, Integer limit) throws ApiException { - ApiResponse> localVarResp = getGameItemsWithHttpInfo(id, page, limit); - return localVarResp.getData(); - } - - /** - * Get a list of game items. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.item.list</code> - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @return ApiResponse<List<Object>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public ApiResponse> getGameItemsWithHttpInfo(String id, Integer page, Integer limit) throws ApiException { - okhttp3.Call localVarCall = getGameItemsValidateBeforeCall(id, page, limit, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a list of game items. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.item.list</code> - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getGameItemsAsync(String id, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getGameItemsValidateBeforeCall(id, page, limit, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getGameServerByAddressAndQueryPort * @param address (required) @@ -2805,7 +3889,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/servers/address/{address}:{port}" + String localVarPath = "/v1/games/servers/address/{address}:{port}" .replace("{" + "address" + "}", localVarApiClient.escapeString(address.toString())) .replace("{" + "port" + "}", localVarApiClient.escapeString(port.toString())); @@ -2816,9 +3900,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2854,7 +3936,7 @@ public class TribufuGeneratedApi { /** * Get a game server by address and query port. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.get.address</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> * @param address (required) * @param port (required) * @return GameServer @@ -2873,7 +3955,7 @@ public class TribufuGeneratedApi { /** * Get a game server by address and query port. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.get.address</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> * @param address (required) * @param port (required) * @return ApiResponse<GameServer> @@ -2893,7 +3975,7 @@ public class TribufuGeneratedApi { /** * Get a game server by address and query port. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.get.address</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> * @param address (required) * @param port (required) * @param _callback The callback to be executed when the API call finishes @@ -2913,6 +3995,152 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getGameServerByAddressAndQueryPortV1 + * @param address (required) + * @param port (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServerByAddressAndQueryPortV1Call(String address, Integer port, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/servers/address/{address}:{port}" + .replace("{" + "address" + "}", localVarApiClient.escapeString(address.toString())) + .replace("{" + "port" + "}", localVarApiClient.escapeString(port.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServerByAddressAndQueryPortV1ValidateBeforeCall(String address, Integer port, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'address' is set + if (address == null) { + throw new ApiException("Missing the required parameter 'address' when calling getGameServerByAddressAndQueryPortV1(Async)"); + } + + // verify the required parameter 'port' is set + if (port == null) { + throw new ApiException("Missing the required parameter 'port' when calling getGameServerByAddressAndQueryPortV1(Async)"); + } + + return getGameServerByAddressAndQueryPortV1Call(address, port, _callback); + + } + + /** + * Get a game server by address and query port. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> + * @param address (required) + * @param port (required) + * @return GameServer + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public GameServer getGameServerByAddressAndQueryPortV1(String address, Integer port) throws ApiException { + ApiResponse localVarResp = getGameServerByAddressAndQueryPortV1WithHttpInfo(address, port); + return localVarResp.getData(); + } + + /** + * Get a game server by address and query port. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> + * @param address (required) + * @param port (required) + * @return ApiResponse<GameServer> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse getGameServerByAddressAndQueryPortV1WithHttpInfo(String address, Integer port) throws ApiException { + okhttp3.Call localVarCall = getGameServerByAddressAndQueryPortV1ValidateBeforeCall(address, port, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a game server by address and query port. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> + * @param address (required) + * @param port (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServerByAddressAndQueryPortV1Async(String address, Integer port, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServerByAddressAndQueryPortV1ValidateBeforeCall(address, port, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getGameServerById * @param id (required) @@ -2943,7 +4171,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/servers/{id}" + String localVarPath = "/v1/games/servers/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -2953,9 +4181,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -2986,7 +4212,7 @@ public class TribufuGeneratedApi { /** * Get a game server by id. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> * @param id (required) * @return GameServer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -3004,7 +4230,7 @@ public class TribufuGeneratedApi { /** * Get a game server by id. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> * @param id (required) * @return ApiResponse<GameServer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -3023,7 +4249,7 @@ public class TribufuGeneratedApi { /** * Get a game server by id. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> * @param id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -3042,6 +4268,142 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getGameServerByIdV1 + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServerByIdV1Call(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/servers/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServerByIdV1ValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getGameServerByIdV1(Async)"); + } + + return getGameServerByIdV1Call(id, _callback); + + } + + /** + * Get a game server by id. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> + * @param id (required) + * @return GameServer + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public GameServer getGameServerByIdV1(String id) throws ApiException { + ApiResponse localVarResp = getGameServerByIdV1WithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Get a game server by id. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> + * @param id (required) + * @return ApiResponse<GameServer> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse getGameServerByIdV1WithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getGameServerByIdV1ValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a game server by id. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServerByIdV1Async(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServerByIdV1ValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getGameServerClusterById * @param id (required) @@ -3072,7 +4434,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/clusters/{id}" + String localVarPath = "/v1/games/servers/clusters/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -3082,9 +4444,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3115,7 +4475,7 @@ public class TribufuGeneratedApi { /** * Get a game server cluster by id. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> * @param id (required) * @return GameServerCluster * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -3133,7 +4493,7 @@ public class TribufuGeneratedApi { /** * Get a game server cluster by id. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> * @param id (required) * @return ApiResponse<GameServerCluster> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -3152,7 +4512,7 @@ public class TribufuGeneratedApi { /** * Get a game server cluster by id. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> * @param id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -3171,10 +4531,441 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getGameServerClusterByIdV1 + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServerClusterByIdV1Call(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/clusters/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServerClusterByIdV1ValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getGameServerClusterByIdV1(Async)"); + } + + return getGameServerClusterByIdV1Call(id, _callback); + + } + + /** + * Get a game server cluster by id. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> + * @param id (required) + * @return GameServerCluster + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public GameServerCluster getGameServerClusterByIdV1(String id) throws ApiException { + ApiResponse localVarResp = getGameServerClusterByIdV1WithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Get a game server cluster by id. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> + * @param id (required) + * @return ApiResponse<GameServerCluster> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse getGameServerClusterByIdV1WithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getGameServerClusterByIdV1ValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a game server cluster by id. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServerClusterByIdV1Async(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServerClusterByIdV1ValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGameServerClusterServers + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getGameServerClusterServersCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/games/servers/clusters/{id}/servers" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServerClusterServersValidateBeforeCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getGameServerClusterServers(Async)"); + } + + return getGameServerClusterServersCall(id, page, limit, _callback); + + } + + /** + * Get a list of game server cluster servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public List getGameServerClusterServers(String id, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getGameServerClusterServersWithHttpInfo(id, page, limit); + return localVarResp.getData(); + } + + /** + * Get a list of game server cluster servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse> getGameServerClusterServersWithHttpInfo(String id, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getGameServerClusterServersValidateBeforeCall(id, page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of game server cluster servers. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getGameServerClusterServersAsync(String id, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServerClusterServersValidateBeforeCall(id, page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGameServerClusterServersV1 + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServerClusterServersV1Call(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/clusters/{id}/servers" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServerClusterServersV1ValidateBeforeCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getGameServerClusterServersV1(Async)"); + } + + return getGameServerClusterServersV1Call(id, page, limit, _callback); + + } + + /** + * Get a list of game server cluster servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public List getGameServerClusterServersV1(String id, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getGameServerClusterServersV1WithHttpInfo(id, page, limit); + return localVarResp.getData(); + } + + /** + * Get a list of game server cluster servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse> getGameServerClusterServersV1WithHttpInfo(String id, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getGameServerClusterServersV1ValidateBeforeCall(id, page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of game server cluster servers. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServerClusterServersV1Async(String id, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServerClusterServersV1ValidateBeforeCall(id, page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getGameServerClusters - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3201,6 +4992,141 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/v1/games/servers/clusters"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServerClustersValidateBeforeCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + return getGameServerClustersCall(page, limit, _callback); + + } + + /** + * Get a list of game server clusters. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<GameServerCluster> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public List getGameServerClusters(Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getGameServerClustersWithHttpInfo(page, limit); + return localVarResp.getData(); + } + + /** + * Get a list of game server clusters. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<GameServerCluster>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse> getGameServerClustersWithHttpInfo(Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getGameServerClustersValidateBeforeCall(page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of game server clusters. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getGameServerClustersAsync(Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServerClustersValidateBeforeCall(page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGameServerClustersV1 + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServerClustersV1Call(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + // create path and map variables String localVarPath = "/v1/clusters"; @@ -3219,9 +5145,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3239,17 +5163,18 @@ public class TribufuGeneratedApi { return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getGameServerClustersValidateBeforeCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - return getGameServerClustersCall(page, limit, _callback); + private okhttp3.Call getGameServerClustersV1ValidateBeforeCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + return getGameServerClustersV1Call(page, limit, _callback); } /** * Get a list of game server clusters. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.list</code> - * @param page (optional) - * @param limit (optional) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return List<GameServerCluster> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3258,17 +5183,19 @@ public class TribufuGeneratedApi { Status Code Description Response Headers 200 OK - + * @deprecated */ - public List getGameServerClusters(Integer page, Integer limit) throws ApiException { - ApiResponse> localVarResp = getGameServerClustersWithHttpInfo(page, limit); + @Deprecated + public List getGameServerClustersV1(Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getGameServerClustersV1WithHttpInfo(page, limit); return localVarResp.getData(); } /** * Get a list of game server clusters. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.list</code> - * @param page (optional) - * @param limit (optional) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return ApiResponse<List<GameServerCluster>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3277,18 +5204,20 @@ public class TribufuGeneratedApi { Status Code Description Response Headers 200 OK - + * @deprecated */ - public ApiResponse> getGameServerClustersWithHttpInfo(Integer page, Integer limit) throws ApiException { - okhttp3.Call localVarCall = getGameServerClustersValidateBeforeCall(page, limit, null); + @Deprecated + public ApiResponse> getGameServerClustersV1WithHttpInfo(Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getGameServerClustersV1ValidateBeforeCall(page, limit, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get a list of game server clusters. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.list</code> - * @param page (optional) - * @param limit (optional) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3298,18 +5227,21 @@ public class TribufuGeneratedApi { Status Code Description Response Headers 200 OK - + * @deprecated */ - public okhttp3.Call getGameServerClustersAsync(Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + @Deprecated + public okhttp3.Call getGameServerClustersV1Async(Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getGameServerClustersValidateBeforeCall(page, limit, _callback); + okhttp3.Call localVarCall = getGameServerClustersV1ValidateBeforeCall(page, limit, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getGameServers - * @param page (optional) - * @param limit (optional) + * Build call for getGameServerQueries + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3320,7 +5252,7 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call getGameServersCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGameServerQueriesCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3337,7 +5269,8 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/servers"; + String localVarPath = "/v1/games/servers/{id}/queries" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3354,9 +5287,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3375,17 +5306,23 @@ public class TribufuGeneratedApi { } @SuppressWarnings("rawtypes") - private okhttp3.Call getGameServersValidateBeforeCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - return getGameServersCall(page, limit, _callback); + private okhttp3.Call getGameServerQueriesValidateBeforeCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getGameServerQueries(Async)"); + } + + return getGameServerQueriesCall(id, page, limit, _callback); } /** - * Get a list of game servers. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.list</code> - * @param page (optional) - * @param limit (optional) - * @return List<GameServer> + * Get a game server query history. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<GameServerQuery> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3394,17 +5331,18 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public List getGameServers(Integer page, Integer limit) throws ApiException { - ApiResponse> localVarResp = getGameServersWithHttpInfo(page, limit); + public List getGameServerQueries(String id, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getGameServerQueriesWithHttpInfo(id, page, limit); return localVarResp.getData(); } /** - * Get a list of game servers. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.list</code> - * @param page (optional) - * @param limit (optional) - * @return ApiResponse<List<GameServer>> + * Get a game server query history. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<GameServerQuery>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3413,17 +5351,18 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public ApiResponse> getGameServersWithHttpInfo(Integer page, Integer limit) throws ApiException { - okhttp3.Call localVarCall = getGameServersValidateBeforeCall(page, limit, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse> getGameServerQueriesWithHttpInfo(String id, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getGameServerQueriesValidateBeforeCall(id, page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get a list of game servers. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.list</code> - * @param page (optional) - * @param limit (optional) + * Get a game server query history. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3434,9 +5373,326 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call getGameServersAsync(Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGameServerQueriesAsync(String id, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getGameServersValidateBeforeCall(page, limit, _callback); + okhttp3.Call localVarCall = getGameServerQueriesValidateBeforeCall(id, page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGameServerQueriesV1 + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServerQueriesV1Call(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/servers/{id}/queries" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServerQueriesV1ValidateBeforeCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getGameServerQueriesV1(Async)"); + } + + return getGameServerQueriesV1Call(id, page, limit, _callback); + + } + + /** + * Get a game server query history. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<GameServerQuery> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public List getGameServerQueriesV1(String id, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getGameServerQueriesV1WithHttpInfo(id, page, limit); + return localVarResp.getData(); + } + + /** + * Get a game server query history. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<GameServerQuery>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse> getGameServerQueriesV1WithHttpInfo(String id, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getGameServerQueriesV1ValidateBeforeCall(id, page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a game server query history. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServerQueriesV1Async(String id, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServerQueriesV1ValidateBeforeCall(id, page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGameServers + * @param address (optional) + * @param queryPort (optional) + * @param country (optional) + * @param gameId (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getGameServersCall(String address, Integer queryPort, String country, String gameId, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/games/servers"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (address != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("address", address)); + } + + if (queryPort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("query_port", queryPort)); + } + + if (country != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country)); + } + + if (gameId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("game_id", gameId)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServersValidateBeforeCall(String address, Integer queryPort, String country, String gameId, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + return getGameServersCall(address, queryPort, country, gameId, page, limit, _callback); + + } + + /** + * Get a list of game servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> + * @param address (optional) + * @param queryPort (optional) + * @param country (optional) + * @param gameId (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<GameServer> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public List getGameServers(String address, Integer queryPort, String country, String gameId, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getGameServersWithHttpInfo(address, queryPort, country, gameId, page, limit); + return localVarResp.getData(); + } + + /** + * Get a list of game servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> + * @param address (optional) + * @param queryPort (optional) + * @param country (optional) + * @param gameId (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<GameServer>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse> getGameServersWithHttpInfo(String address, Integer queryPort, String country, String gameId, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getGameServersValidateBeforeCall(address, queryPort, country, gameId, page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of game servers. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> + * @param address (optional) + * @param queryPort (optional) + * @param country (optional) + * @param gameId (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getGameServersAsync(String address, Integer queryPort, String country, String gameId, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServersValidateBeforeCall(address, queryPort, country, gameId, page, limit, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -3444,8 +5700,8 @@ public class TribufuGeneratedApi { /** * Build call for getGameServersByCountry * @param country (required) - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3472,6 +5728,151 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/v1/games/servers/country/{country}" + .replace("{" + "country" + "}", localVarApiClient.escapeString(country.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServersByCountryValidateBeforeCall(String country, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'country' is set + if (country == null) { + throw new ApiException("Missing the required parameter 'country' when calling getGameServersByCountry(Async)"); + } + + return getGameServersByCountryCall(country, page, limit, _callback); + + } + + /** + * Get a list of game servers from a country. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> + * @param country (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<GameServer> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public List getGameServersByCountry(String country, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getGameServersByCountryWithHttpInfo(country, page, limit); + return localVarResp.getData(); + } + + /** + * Get a list of game servers from a country. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> + * @param country (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<GameServer>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse> getGameServersByCountryWithHttpInfo(String country, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getGameServersByCountryValidateBeforeCall(country, page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of game servers from a country. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> + * @param country (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getGameServersByCountryAsync(String country, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServersByCountryValidateBeforeCall(country, page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGameServersByCountryV1 + * @param country (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServersByCountryV1Call(String country, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + // create path and map variables String localVarPath = "/v1/servers/country/{country}" .replace("{" + "country" + "}", localVarApiClient.escapeString(country.toString())); @@ -3491,9 +5892,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3511,23 +5910,24 @@ public class TribufuGeneratedApi { return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getGameServersByCountryValidateBeforeCall(String country, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGameServersByCountryV1ValidateBeforeCall(String country, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { // verify the required parameter 'country' is set if (country == null) { - throw new ApiException("Missing the required parameter 'country' when calling getGameServersByCountry(Async)"); + throw new ApiException("Missing the required parameter 'country' when calling getGameServersByCountryV1(Async)"); } - return getGameServersByCountryCall(country, page, limit, _callback); + return getGameServersByCountryV1Call(country, page, limit, _callback); } /** * Get a list of game servers from a country. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.list.country</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> * @param country (required) - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return List<GameServer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3536,18 +5936,20 @@ public class TribufuGeneratedApi { Status Code Description Response Headers 200 OK - + * @deprecated */ - public List getGameServersByCountry(String country, Integer page, Integer limit) throws ApiException { - ApiResponse> localVarResp = getGameServersByCountryWithHttpInfo(country, page, limit); + @Deprecated + public List getGameServersByCountryV1(String country, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getGameServersByCountryV1WithHttpInfo(country, page, limit); return localVarResp.getData(); } /** * Get a list of game servers from a country. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.list.country</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> * @param country (required) - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return ApiResponse<List<GameServer>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3556,19 +5958,21 @@ public class TribufuGeneratedApi { Status Code Description Response Headers 200 OK - + * @deprecated */ - public ApiResponse> getGameServersByCountryWithHttpInfo(String country, Integer page, Integer limit) throws ApiException { - okhttp3.Call localVarCall = getGameServersByCountryValidateBeforeCall(country, page, limit, null); + @Deprecated + public ApiResponse> getGameServersByCountryV1WithHttpInfo(String country, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getGameServersByCountryV1ValidateBeforeCall(country, page, limit, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get a list of game servers from a country. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.list.country</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> * @param country (required) - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3578,155 +5982,12 @@ public class TribufuGeneratedApi { Status Code Description Response Headers 200 OK - + * @deprecated */ - public okhttp3.Call getGameServersByCountryAsync(String country, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + @Deprecated + public okhttp3.Call getGameServersByCountryV1Async(String country, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getGameServersByCountryValidateBeforeCall(country, page, limit, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getGameServersByGameId - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getGameServersByGameIdCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v1/games/{id}/servers" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getGameServersByGameIdValidateBeforeCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getGameServersByGameId(Async)"); - } - - return getGameServersByGameIdCall(id, page, limit, _callback); - - } - - /** - * Get a list of game servers of a game. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.list</code> - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @return List<GameServer> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public List getGameServersByGameId(String id, Integer page, Integer limit) throws ApiException { - ApiResponse> localVarResp = getGameServersByGameIdWithHttpInfo(id, page, limit); - return localVarResp.getData(); - } - - /** - * Get a list of game servers of a game. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.list</code> - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @return ApiResponse<List<GameServer>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public ApiResponse> getGameServersByGameIdWithHttpInfo(String id, Integer page, Integer limit) throws ApiException { - okhttp3.Call localVarCall = getGameServersByGameIdValidateBeforeCall(id, page, limit, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a list of game servers of a game. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.list</code> - * @param id (required) - * @param page (optional) - * @param limit (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getGameServersByGameIdAsync(String id, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getGameServersByGameIdValidateBeforeCall(id, page, limit, _callback); + okhttp3.Call localVarCall = getGameServersByCountryV1ValidateBeforeCall(country, page, limit, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -3760,7 +6021,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/servers/countries"; + String localVarPath = "/v1/games/servers/countries"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3769,9 +6030,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3797,7 +6056,7 @@ public class TribufuGeneratedApi { /** * Get a list of countries with the number of game servers. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.country.list</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> * @return Map<String, Integer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3814,7 +6073,7 @@ public class TribufuGeneratedApi { /** * Get a list of countries with the number of game servers. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.country.list</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> * @return ApiResponse<Map<String, Integer>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3832,7 +6091,7 @@ public class TribufuGeneratedApi { /** * Get a list of countries with the number of game servers. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.country.list</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3850,6 +6109,132 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getGameServersCountriesV1 + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServersCountriesV1Call(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/servers/countries"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServersCountriesV1ValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getGameServersCountriesV1Call(_callback); + + } + + /** + * Get a list of countries with the number of game servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> + * @return Map<String, Integer> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public Map getGameServersCountriesV1() throws ApiException { + ApiResponse> localVarResp = getGameServersCountriesV1WithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get a list of countries with the number of game servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> + * @return ApiResponse<Map<String, Integer>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse> getGameServersCountriesV1WithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getGameServersCountriesV1ValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of countries with the number of game servers. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServersCountriesV1Async(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServersCountriesV1ValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getGameServersMetrics * @param _callback Callback for upload/download progress @@ -3879,7 +6264,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/servers/metrics"; + String localVarPath = "/v1/games/servers/metrics"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3888,9 +6273,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3916,7 +6299,7 @@ public class TribufuGeneratedApi { /** * Get metrics about the tracked game servers. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.metric.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> * @return ServerMetrics * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3933,7 +6316,7 @@ public class TribufuGeneratedApi { /** * Get metrics about the tracked game servers. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.metric.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> * @return ApiResponse<ServerMetrics> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3951,7 +6334,7 @@ public class TribufuGeneratedApi { /** * Get metrics about the tracked game servers. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.metric.get</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3969,8 +6352,310 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getGameServersMetricsV1 + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServersMetricsV1Call(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/servers/metrics"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServersMetricsV1ValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getGameServersMetricsV1Call(_callback); + + } + + /** + * Get metrics about the tracked game servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> + * @return ServerMetrics + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ServerMetrics getGameServersMetricsV1() throws ApiException { + ApiResponse localVarResp = getGameServersMetricsV1WithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get metrics about the tracked game servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> + * @return ApiResponse<ServerMetrics> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse getGameServersMetricsV1WithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getGameServersMetricsV1ValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get metrics about the tracked game servers. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServersMetricsV1Async(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServersMetricsV1ValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGameServersV1 + * @param address (optional) + * @param queryPort (optional) + * @param country (optional) + * @param gameId (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServersV1Call(String address, Integer queryPort, String country, String gameId, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/servers"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (address != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("address", address)); + } + + if (queryPort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("query_port", queryPort)); + } + + if (country != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country)); + } + + if (gameId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("game_id", gameId)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getGameServersV1ValidateBeforeCall(String address, Integer queryPort, String country, String gameId, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + return getGameServersV1Call(address, queryPort, country, gameId, page, limit, _callback); + + } + + /** + * Get a list of game servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> + * @param address (optional) + * @param queryPort (optional) + * @param country (optional) + * @param gameId (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<GameServer> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public List getGameServersV1(String address, Integer queryPort, String country, String gameId, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getGameServersV1WithHttpInfo(address, queryPort, country, gameId, page, limit); + return localVarResp.getData(); + } + + /** + * Get a list of game servers. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> + * @param address (optional) + * @param queryPort (optional) + * @param country (optional) + * @param gameId (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<GameServer>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse> getGameServersV1WithHttpInfo(String address, Integer queryPort, String country, String gameId, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getGameServersV1ValidateBeforeCall(address, queryPort, country, gameId, page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of game servers. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> + * @param address (optional) + * @param queryPort (optional) + * @param country (optional) + * @param gameId (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getGameServersV1Async(String address, Integer queryPort, String country, String gameId, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGameServersV1ValidateBeforeCall(address, queryPort, country, gameId, page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getGames + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3981,7 +6666,7 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call getGamesCall(final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGamesCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4006,10 +6691,16 @@ public class TribufuGeneratedApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -4028,14 +6719,16 @@ public class TribufuGeneratedApi { } @SuppressWarnings("rawtypes") - private okhttp3.Call getGamesValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getGamesCall(_callback); + private okhttp3.Call getGamesValidateBeforeCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + return getGamesCall(page, limit, _callback); } /** * Get a list of games. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.list</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return List<Game> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4045,14 +6738,16 @@ public class TribufuGeneratedApi { 200 OK - */ - public List getGames() throws ApiException { - ApiResponse> localVarResp = getGamesWithHttpInfo(); + public List getGames(Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getGamesWithHttpInfo(page, limit); return localVarResp.getData(); } /** * Get a list of games. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.list</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return ApiResponse<List<Game>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4062,15 +6757,17 @@ public class TribufuGeneratedApi { 200 OK - */ - public ApiResponse> getGamesWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getGamesValidateBeforeCall(null); + public ApiResponse> getGamesWithHttpInfo(Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getGamesValidateBeforeCall(page, limit, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get a list of games. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.list</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -4081,9 +6778,9 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call getGamesAsync(final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGamesAsync(Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getGamesValidateBeforeCall(_callback); + okhttp3.Call localVarCall = getGamesValidateBeforeCall(page, limit, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -4128,9 +6825,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -4257,9 +6952,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -4386,9 +7079,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -4515,9 +7206,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -4550,7 +7239,7 @@ public class TribufuGeneratedApi { * Get a list of games of a group. * <b>🔒 Required permissions:</b> <code>tribufu.community.group.game.list</code> * @param id (required) - * @return List<GroupGame> + * @return List<GroupApplication> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4559,8 +7248,8 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public List getGroupGames(String id) throws ApiException { - ApiResponse> localVarResp = getGroupGamesWithHttpInfo(id); + public List getGroupGames(String id) throws ApiException { + ApiResponse> localVarResp = getGroupGamesWithHttpInfo(id); return localVarResp.getData(); } @@ -4568,7 +7257,7 @@ public class TribufuGeneratedApi { * Get a list of games of a group. * <b>🔒 Required permissions:</b> <code>tribufu.community.group.game.list</code> * @param id (required) - * @return ApiResponse<List<GroupGame>> + * @return ApiResponse<List<GroupApplication>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4577,9 +7266,9 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public ApiResponse> getGroupGamesWithHttpInfo(String id) throws ApiException { + public ApiResponse> getGroupGamesWithHttpInfo(String id) throws ApiException { okhttp3.Call localVarCall = getGroupGamesValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -4597,10 +7286,10 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call getGroupGamesAsync(String id, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGroupGamesAsync(String id, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getGroupGamesValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -4735,8 +7424,8 @@ public class TribufuGeneratedApi { } /** * Build call for getGroups - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4781,9 +7470,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -4810,8 +7497,8 @@ public class TribufuGeneratedApi { /** * Get a list of groups. * <b>🔒 Required permissions:</b> <code>tribufu.community.group.list</code> - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return List<Group> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4829,8 +7516,8 @@ public class TribufuGeneratedApi { /** * Get a list of groups. * <b>🔒 Required permissions:</b> <code>tribufu.community.group.list</code> - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return ApiResponse<List<Group>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4849,8 +7536,8 @@ public class TribufuGeneratedApi { /** * Get a list of groups. (asynchronously) * <b>🔒 Required permissions:</b> <code>tribufu.community.group.list</code> - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -4908,9 +7595,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -4941,7 +7626,7 @@ public class TribufuGeneratedApi { /** * Get a ip address location. - * <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.get</code> + * * @param address (required) * @return IpAddress * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -4959,7 +7644,7 @@ public class TribufuGeneratedApi { /** * Get a ip address location. - * <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.get</code> + * * @param address (required) * @return ApiResponse<IpAddress> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -4978,7 +7663,7 @@ public class TribufuGeneratedApi { /** * Get a ip address location. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.get</code> + * * @param address (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -4999,8 +7684,9 @@ public class TribufuGeneratedApi { } /** * Build call for getIpAddresses - * @param page (optional) - * @param limit (optional) + * @param organizationId Filters results by organization, defaults to all organizations the user belongs to. (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5011,7 +7697,7 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call getIpAddressesCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getIpAddressesCall(String organizationId, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5036,6 +7722,10 @@ public class TribufuGeneratedApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (organizationId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("organization_id", organizationId)); + } + if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } @@ -5045,9 +7735,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -5066,16 +7754,17 @@ public class TribufuGeneratedApi { } @SuppressWarnings("rawtypes") - private okhttp3.Call getIpAddressesValidateBeforeCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - return getIpAddressesCall(page, limit, _callback); + private okhttp3.Call getIpAddressesValidateBeforeCall(String organizationId, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + return getIpAddressesCall(organizationId, page, limit, _callback); } /** * Get a list of ip addresses. * <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.list</code> - * @param page (optional) - * @param limit (optional) + * @param organizationId Filters results by organization, defaults to all organizations the user belongs to. (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return List<IpAddress> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5085,16 +7774,17 @@ public class TribufuGeneratedApi { 200 OK - */ - public List getIpAddresses(Integer page, Integer limit) throws ApiException { - ApiResponse> localVarResp = getIpAddressesWithHttpInfo(page, limit); + public List getIpAddresses(String organizationId, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getIpAddressesWithHttpInfo(organizationId, page, limit); return localVarResp.getData(); } /** * Get a list of ip addresses. * <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.list</code> - * @param page (optional) - * @param limit (optional) + * @param organizationId Filters results by organization, defaults to all organizations the user belongs to. (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return ApiResponse<List<IpAddress>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5104,8 +7794,8 @@ public class TribufuGeneratedApi { 200 OK - */ - public ApiResponse> getIpAddressesWithHttpInfo(Integer page, Integer limit) throws ApiException { - okhttp3.Call localVarCall = getIpAddressesValidateBeforeCall(page, limit, null); + public ApiResponse> getIpAddressesWithHttpInfo(String organizationId, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getIpAddressesValidateBeforeCall(organizationId, page, limit, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -5113,8 +7803,9 @@ public class TribufuGeneratedApi { /** * Get a list of ip addresses. (asynchronously) * <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.list</code> - * @param page (optional) - * @param limit (optional) + * @param organizationId Filters results by organization, defaults to all organizations the user belongs to. (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5125,9 +7816,9 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call getIpAddressesAsync(Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getIpAddressesAsync(String organizationId, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getIpAddressesValidateBeforeCall(page, limit, _callback); + okhttp3.Call localVarCall = getIpAddressesValidateBeforeCall(organizationId, page, limit, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -5175,9 +7866,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -5259,134 +7948,6 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getMe - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public okhttp3.Call getMeCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v1/me"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call getMeValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getMeCall(_callback); - - } - - /** - * Get current user information. - * - * @return UserInfo - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public UserInfo getMe() throws ApiException { - ApiResponse localVarResp = getMeWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get current user information. - * - * @return ApiResponse<UserInfo> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public ApiResponse getMeWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getMeValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get current user information. (asynchronously) - * - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public okhttp3.Call getMeAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getMeValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getPackageById * @param id (required) @@ -5427,9 +7988,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -5518,8 +8077,8 @@ public class TribufuGeneratedApi { } /** * Build call for getPackages - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5564,9 +8123,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -5593,8 +8150,8 @@ public class TribufuGeneratedApi { /** * Get a list of packages. * <b>🔒 Required permissions:</b> <code>tribufu.community.package.list</code> - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return List<ModelPackage> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5612,8 +8169,8 @@ public class TribufuGeneratedApi { /** * Get a list of packages. * <b>🔒 Required permissions:</b> <code>tribufu.community.package.list</code> - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return ApiResponse<List<ModelPackage>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5632,8 +8189,8 @@ public class TribufuGeneratedApi { /** * Get a list of packages. (asynchronously) * <b>🔒 Required permissions:</b> <code>tribufu.community.package.list</code> - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5651,6 +8208,266 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getProductById + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getProductByIdCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/products/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getProductByIdValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getProductById(Async)"); + } + + return getProductByIdCall(id, _callback); + + } + + /** + * Get a product by id. + * <b>🔒 Required permissions:</b> <code>tribufu.store.product.get</code> + * @param id (required) + * @return Product + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public Product getProductById(String id) throws ApiException { + ApiResponse localVarResp = getProductByIdWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Get a product by id. + * <b>🔒 Required permissions:</b> <code>tribufu.store.product.get</code> + * @param id (required) + * @return ApiResponse<Product> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse getProductByIdWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getProductByIdValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a product by id. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.store.product.get</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getProductByIdAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getProductByIdValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProducts + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getProductsCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/products"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getProductsValidateBeforeCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + return getProductsCall(page, limit, _callback); + + } + + /** + * Get a list of products. + * <b>🔒 Required permissions:</b> <code>tribufu.store.product.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<Product> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public List getProducts(Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getProductsWithHttpInfo(page, limit); + return localVarResp.getData(); + } + + /** + * Get a list of products. + * <b>🔒 Required permissions:</b> <code>tribufu.store.product.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<Product>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse> getProductsWithHttpInfo(Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getProductsValidateBeforeCall(page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of products. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.store.product.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getProductsAsync(Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getProductsValidateBeforeCall(page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getPublicKeys * @param _callback Callback for upload/download progress @@ -5714,7 +8531,7 @@ public class TribufuGeneratedApi { /** * Get the public keys for the client. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.keys</code> + * * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5729,7 +8546,7 @@ public class TribufuGeneratedApi { /** * Get the public keys for the client. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.keys</code> + * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5746,7 +8563,7 @@ public class TribufuGeneratedApi { /** * Get the public keys for the client. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.keys</code> + * * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5763,270 +8580,6 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } - /** - * Build call for getSubscriptionById - * @param id (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details -
- - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getSubscriptionByIdCall(String id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v1/subscriptions/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getSubscriptionByIdValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getSubscriptionById(Async)"); - } - - return getSubscriptionByIdCall(id, _callback); - - } - - /** - * Get a subscription by id. - * <b>🔒 Required permissions:</b> <code>tribufu.store.subscription.get</code> - * @param id (required) - * @return Subscription - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public Subscription getSubscriptionById(String id) throws ApiException { - ApiResponse localVarResp = getSubscriptionByIdWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Get a subscription by id. - * <b>🔒 Required permissions:</b> <code>tribufu.store.subscription.get</code> - * @param id (required) - * @return ApiResponse<Subscription> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public ApiResponse getSubscriptionByIdWithHttpInfo(String id) throws ApiException { - okhttp3.Call localVarCall = getSubscriptionByIdValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a subscription by id. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.store.subscription.get</code> - * @param id (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getSubscriptionByIdAsync(String id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getSubscriptionByIdValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getSubscriptions - * @param page (optional) - * @param limit (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getSubscriptionsCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v1/subscriptions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getSubscriptionsValidateBeforeCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - return getSubscriptionsCall(page, limit, _callback); - - } - - /** - * Get a list of subscriptions. - * <b>🔒 Required permissions:</b> <code>tribufu.store.subscription.list</code> - * @param page (optional) - * @param limit (optional) - * @return List<Subscription> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public List getSubscriptions(Integer page, Integer limit) throws ApiException { - ApiResponse> localVarResp = getSubscriptionsWithHttpInfo(page, limit); - return localVarResp.getData(); - } - - /** - * Get a list of subscriptions. - * <b>🔒 Required permissions:</b> <code>tribufu.store.subscription.list</code> - * @param page (optional) - * @param limit (optional) - * @return ApiResponse<List<Subscription>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public ApiResponse> getSubscriptionsWithHttpInfo(Integer page, Integer limit) throws ApiException { - okhttp3.Call localVarCall = getSubscriptionsValidateBeforeCall(page, limit, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a list of subscriptions. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.store.subscription.list</code> - * @param page (optional) - * @param limit (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getSubscriptionsAsync(Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getSubscriptionsValidateBeforeCall(page, limit, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getUserAccounts * @param id (required) @@ -6067,9 +8620,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6156,393 +8707,6 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getUserById - * @param id (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getUserByIdCall(String id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v1/users/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getUserByIdValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getUserById(Async)"); - } - - return getUserByIdCall(id, _callback); - - } - - /** - * Get a user profile by id. - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - * @param id (required) - * @return Profile - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public Profile getUserById(String id) throws ApiException { - ApiResponse localVarResp = getUserByIdWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Get a user profile by id. - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - * @param id (required) - * @return ApiResponse<Profile> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public ApiResponse getUserByIdWithHttpInfo(String id) throws ApiException { - okhttp3.Call localVarCall = getUserByIdValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a user profile by id. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - * @param id (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getUserByIdAsync(String id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getUserByIdValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getUserByName - * @param name (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getUserByNameCall(String name, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v1/users/name/{name}" - .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getUserByNameValidateBeforeCall(String name, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'name' is set - if (name == null) { - throw new ApiException("Missing the required parameter 'name' when calling getUserByName(Async)"); - } - - return getUserByNameCall(name, _callback); - - } - - /** - * Get a user profile by name. - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - * @param name (required) - * @return Profile - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public Profile getUserByName(String name) throws ApiException { - ApiResponse localVarResp = getUserByNameWithHttpInfo(name); - return localVarResp.getData(); - } - - /** - * Get a user profile by name. - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - * @param name (required) - * @return ApiResponse<Profile> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public ApiResponse getUserByNameWithHttpInfo(String name) throws ApiException { - okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(name, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a user profile by name. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - * @param name (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getUserByNameAsync(String name, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(name, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getUserByUuid - * @param uuid (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getUserByUuidCall(UUID uuid, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v1/users/uuid/{uuid}" - .replace("{" + "uuid" + "}", localVarApiClient.escapeString(uuid.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getUserByUuidValidateBeforeCall(UUID uuid, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'uuid' is set - if (uuid == null) { - throw new ApiException("Missing the required parameter 'uuid' when calling getUserByUuid(Async)"); - } - - return getUserByUuidCall(uuid, _callback); - - } - - /** - * Get a user profile by uuid. - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - * @param uuid (required) - * @return Profile - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public Profile getUserByUuid(UUID uuid) throws ApiException { - ApiResponse localVarResp = getUserByUuidWithHttpInfo(uuid); - return localVarResp.getData(); - } - - /** - * Get a user profile by uuid. - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - * @param uuid (required) - * @return ApiResponse<Profile> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public ApiResponse getUserByUuidWithHttpInfo(UUID uuid) throws ApiException { - okhttp3.Call localVarCall = getUserByUuidValidateBeforeCall(uuid, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a user profile by uuid. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - * @param uuid (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getUserByUuidAsync(UUID uuid, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getUserByUuidValidateBeforeCall(uuid, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getUserFriends * @param id (required) @@ -6573,7 +8737,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/users/{id}/friends" + String localVarPath = "/v1/profiles/{id}/friends" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -6583,9 +8747,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6672,6 +8834,142 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getUserFriendsV1 + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserFriendsV1Call(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/users/{id}/friends" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserFriendsV1ValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getUserFriendsV1(Async)"); + } + + return getUserFriendsV1Call(id, _callback); + + } + + /** + * Get a list of friends of the user. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> + * @param id (required) + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public List getUserFriendsV1(String id) throws ApiException { + ApiResponse> localVarResp = getUserFriendsV1WithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Get a list of friends of the user. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> + * @param id (required) + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse> getUserFriendsV1WithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getUserFriendsV1ValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of friends of the user. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserFriendsV1Async(String id, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserFriendsV1ValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getUserGames * @param id (required) @@ -6702,7 +9000,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/users/{id}/games" + String localVarPath = "/v1/profiles/{id}/games" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -6712,9 +9010,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6801,6 +9097,142 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getUserGamesV1 + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserGamesV1Call(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/users/{id}/games" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserGamesV1ValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getUserGamesV1(Async)"); + } + + return getUserGamesV1Call(id, _callback); + + } + + /** + * Get a list of games the user has played. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> + * @param id (required) + * @return List<ProfileGame> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public List getUserGamesV1(String id) throws ApiException { + ApiResponse> localVarResp = getUserGamesV1WithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Get a list of games the user has played. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> + * @param id (required) + * @return ApiResponse<List<ProfileGame>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse> getUserGamesV1WithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getUserGamesV1ValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of games the user has played. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserGamesV1Async(String id, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserGamesV1ValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getUserGroups * @param id (required) @@ -6831,7 +9263,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/users/{id}/groups" + String localVarPath = "/v1/profiles/{id}/groups" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -6841,9 +9273,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6930,6 +9360,142 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getUserGroupsV1 + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserGroupsV1Call(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/users/{id}/groups" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserGroupsV1ValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getUserGroupsV1(Async)"); + } + + return getUserGroupsV1Call(id, _callback); + + } + + /** + * Get a list of groups the user is a member of. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> + * @param id (required) + * @return List<ProfileGroup> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public List getUserGroupsV1(String id) throws ApiException { + ApiResponse> localVarResp = getUserGroupsV1WithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Get a list of groups the user is a member of. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> + * @param id (required) + * @return ApiResponse<List<ProfileGroup>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse> getUserGroupsV1WithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getUserGroupsV1ValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of groups the user is a member of. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserGroupsV1Async(String id, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserGroupsV1ValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getUserInfo * @param _callback Callback for upload/download progress @@ -6968,9 +9534,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -7050,7 +9614,7 @@ public class TribufuGeneratedApi { return localVarCall; } /** - * Build call for getUserPunishments + * Build call for getUserProfileById * @param id (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -7062,7 +9626,7 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call getUserPunishmentsCall(String id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserProfileByIdCall(String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7079,7 +9643,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v1/users/{id}/punishments" + String localVarPath = "/v1/profiles/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -7089,9 +9653,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -7110,21 +9672,21 @@ public class TribufuGeneratedApi { } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserPunishmentsValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserProfileByIdValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getUserPunishments(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling getUserProfileById(Async)"); } - return getUserPunishmentsCall(id, _callback); + return getUserProfileByIdCall(id, _callback); } /** - * Get a list of punishments the user has received. - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.punishment.list</code> + * Get a user profile by id. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> * @param id (required) - * @return List<Object> + * @return Profile * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7133,16 +9695,16 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public List getUserPunishments(String id) throws ApiException { - ApiResponse> localVarResp = getUserPunishmentsWithHttpInfo(id); + public Profile getUserProfileById(String id) throws ApiException { + ApiResponse localVarResp = getUserProfileByIdWithHttpInfo(id); return localVarResp.getData(); } /** - * Get a list of punishments the user has received. - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.punishment.list</code> + * Get a user profile by id. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> * @param id (required) - * @return ApiResponse<List<Object>> + * @return ApiResponse<Profile> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7151,15 +9713,15 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public ApiResponse> getUserPunishmentsWithHttpInfo(String id) throws ApiException { - okhttp3.Call localVarCall = getUserPunishmentsValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse getUserProfileByIdWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getUserProfileByIdValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get a list of punishments the user has received. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.punishment.list</code> + * Get a user profile by id. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> * @param id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -7171,9 +9733,1209 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call getUserPunishmentsAsync(String id, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getUserProfileByIdAsync(String id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getUserPunishmentsValidateBeforeCall(id, _callback); + okhttp3.Call localVarCall = getUserProfileByIdValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserProfileByIdV1 + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserProfileByIdV1Call(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/users/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserProfileByIdV1ValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getUserProfileByIdV1(Async)"); + } + + return getUserProfileByIdV1Call(id, _callback); + + } + + /** + * Get a user profile by id. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> + * @param id (required) + * @return Profile + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public Profile getUserProfileByIdV1(String id) throws ApiException { + ApiResponse localVarResp = getUserProfileByIdV1WithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Get a user profile by id. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> + * @param id (required) + * @return ApiResponse<Profile> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse getUserProfileByIdV1WithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getUserProfileByIdV1ValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a user profile by id. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserProfileByIdV1Async(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserProfileByIdV1ValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserProfileByName + * @param name (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getUserProfileByNameCall(String name, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/profiles/name/{name}" + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserProfileByNameValidateBeforeCall(String name, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling getUserProfileByName(Async)"); + } + + return getUserProfileByNameCall(name, _callback); + + } + + /** + * Get a user profile by name. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> + * @param name (required) + * @return Profile + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public Profile getUserProfileByName(String name) throws ApiException { + ApiResponse localVarResp = getUserProfileByNameWithHttpInfo(name); + return localVarResp.getData(); + } + + /** + * Get a user profile by name. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> + * @param name (required) + * @return ApiResponse<Profile> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse getUserProfileByNameWithHttpInfo(String name) throws ApiException { + okhttp3.Call localVarCall = getUserProfileByNameValidateBeforeCall(name, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a user profile by name. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> + * @param name (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getUserProfileByNameAsync(String name, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserProfileByNameValidateBeforeCall(name, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserProfileByNameV1 + * @param name (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserProfileByNameV1Call(String name, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/users/name/{name}" + .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserProfileByNameV1ValidateBeforeCall(String name, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling getUserProfileByNameV1(Async)"); + } + + return getUserProfileByNameV1Call(name, _callback); + + } + + /** + * Get a user profile by name. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> + * @param name (required) + * @return Profile + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public Profile getUserProfileByNameV1(String name) throws ApiException { + ApiResponse localVarResp = getUserProfileByNameV1WithHttpInfo(name); + return localVarResp.getData(); + } + + /** + * Get a user profile by name. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> + * @param name (required) + * @return ApiResponse<Profile> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse getUserProfileByNameV1WithHttpInfo(String name) throws ApiException { + okhttp3.Call localVarCall = getUserProfileByNameV1ValidateBeforeCall(name, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a user profile by name. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> + * @param name (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserProfileByNameV1Async(String name, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserProfileByNameV1ValidateBeforeCall(name, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserProfileByUuid + * @param uuid (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getUserProfileByUuidCall(UUID uuid, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/profiles/uuid/{uuid}" + .replace("{" + "uuid" + "}", localVarApiClient.escapeString(uuid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserProfileByUuidValidateBeforeCall(UUID uuid, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'uuid' is set + if (uuid == null) { + throw new ApiException("Missing the required parameter 'uuid' when calling getUserProfileByUuid(Async)"); + } + + return getUserProfileByUuidCall(uuid, _callback); + + } + + /** + * Get a user profile by uuid. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> + * @param uuid (required) + * @return Profile + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public Profile getUserProfileByUuid(UUID uuid) throws ApiException { + ApiResponse localVarResp = getUserProfileByUuidWithHttpInfo(uuid); + return localVarResp.getData(); + } + + /** + * Get a user profile by uuid. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> + * @param uuid (required) + * @return ApiResponse<Profile> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse getUserProfileByUuidWithHttpInfo(UUID uuid) throws ApiException { + okhttp3.Call localVarCall = getUserProfileByUuidValidateBeforeCall(uuid, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a user profile by uuid. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> + * @param uuid (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getUserProfileByUuidAsync(UUID uuid, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserProfileByUuidValidateBeforeCall(uuid, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserProfileByUuidV1 + * @param uuid (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserProfileByUuidV1Call(UUID uuid, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/users/uuid/{uuid}" + .replace("{" + "uuid" + "}", localVarApiClient.escapeString(uuid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserProfileByUuidV1ValidateBeforeCall(UUID uuid, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'uuid' is set + if (uuid == null) { + throw new ApiException("Missing the required parameter 'uuid' when calling getUserProfileByUuidV1(Async)"); + } + + return getUserProfileByUuidV1Call(uuid, _callback); + + } + + /** + * Get a user profile by uuid. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> + * @param uuid (required) + * @return Profile + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public Profile getUserProfileByUuidV1(UUID uuid) throws ApiException { + ApiResponse localVarResp = getUserProfileByUuidV1WithHttpInfo(uuid); + return localVarResp.getData(); + } + + /** + * Get a user profile by uuid. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> + * @param uuid (required) + * @return ApiResponse<Profile> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse getUserProfileByUuidV1WithHttpInfo(UUID uuid) throws ApiException { + okhttp3.Call localVarCall = getUserProfileByUuidV1ValidateBeforeCall(uuid, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a user profile by uuid. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> + * @param uuid (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserProfileByUuidV1Async(UUID uuid, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserProfileByUuidV1ValidateBeforeCall(uuid, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserProfiles + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getUserProfilesCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/profiles"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserProfilesValidateBeforeCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + return getUserProfilesCall(page, limit, _callback); + + } + + /** + * Get a list of user profiles. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<Profile> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public List getUserProfiles(Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getUserProfilesWithHttpInfo(page, limit); + return localVarResp.getData(); + } + + /** + * Get a list of user profiles. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<Profile>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse> getUserProfilesWithHttpInfo(Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getUserProfilesValidateBeforeCall(page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of user profiles. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getUserProfilesAsync(Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserProfilesValidateBeforeCall(page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserProfilesV1 + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserProfilesV1Call(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/users"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserProfilesV1ValidateBeforeCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + return getUserProfilesV1Call(page, limit, _callback); + + } + + /** + * Get a list of user profiles. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<Profile> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public List getUserProfilesV1(Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getUserProfilesV1WithHttpInfo(page, limit); + return localVarResp.getData(); + } + + /** + * Get a list of user profiles. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<Profile>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse> getUserProfilesV1WithHttpInfo(Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getUserProfilesV1ValidateBeforeCall(page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of user profiles. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserProfilesV1Async(Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserProfilesV1ValidateBeforeCall(page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserSanctions + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getUserSanctionsCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/profiles/{id}/sanctions" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserSanctionsValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getUserSanctions(Async)"); + } + + return getUserSanctionsCall(id, _callback); + + } + + /** + * Get a list of sanctions the user has received. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> + * @param id (required) + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public List getUserSanctions(String id) throws ApiException { + ApiResponse> localVarResp = getUserSanctionsWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Get a list of sanctions the user has received. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> + * @param id (required) + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse> getUserSanctionsWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getUserSanctionsValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of sanctions the user has received. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getUserSanctionsAsync(String id, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserSanctionsValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserSanctionsV1 + * @param id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserSanctionsV1Call(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/users/{id}/sanctions" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserSanctionsV1ValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getUserSanctionsV1(Async)"); + } + + return getUserSanctionsV1Call(id, _callback); + + } + + /** + * Get a list of sanctions the user has received. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> + * @param id (required) + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public List getUserSanctionsV1(String id) throws ApiException { + ApiResponse> localVarResp = getUserSanctionsV1WithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Get a list of sanctions the user has received. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> + * @param id (required) + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse> getUserSanctionsV1WithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getUserSanctionsV1ValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of sanctions the user has received. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> + * @param id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserSanctionsV1Async(String id, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserSanctionsV1ValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -7181,8 +10943,8 @@ public class TribufuGeneratedApi { /** * Build call for getUserServers * @param id (required) - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7209,6 +10971,151 @@ public class TribufuGeneratedApi { Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/v1/profiles/{id}/servers" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserServersValidateBeforeCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getUserServers(Async)"); + } + + return getUserServersCall(id, page, limit, _callback); + + } + + /** + * Get a list of servers the user is owner of. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return List<GameServer> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public List getUserServers(String id, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getUserServersWithHttpInfo(id, page, limit); + return localVarResp.getData(); + } + + /** + * Get a list of servers the user is owner of. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @return ApiResponse<List<GameServer>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse> getUserServersWithHttpInfo(String id, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getUserServersValidateBeforeCall(id, page, limit, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a list of servers the user is owner of. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call getUserServersAsync(String id, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserServersValidateBeforeCall(id, page, limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserServersV1 + * @param id (required) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserServersV1Call(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + // create path and map variables String localVarPath = "/v1/users/{id}/servers" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); @@ -7228,9 +11135,7 @@ public class TribufuGeneratedApi { } final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -7248,14 +11153,15 @@ public class TribufuGeneratedApi { return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getUserServersValidateBeforeCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserServersV1ValidateBeforeCall(String id, Integer page, Integer limit, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getUserServers(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling getUserServersV1(Async)"); } - return getUserServersCall(id, page, limit, _callback); + return getUserServersV1Call(id, page, limit, _callback); } @@ -7263,8 +11169,8 @@ public class TribufuGeneratedApi { * Get a list of servers the user is owner of. * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> * @param id (required) - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return List<GameServer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7273,9 +11179,11 @@ public class TribufuGeneratedApi { Status Code Description Response Headers 200 OK - + * @deprecated */ - public List getUserServers(String id, Integer page, Integer limit) throws ApiException { - ApiResponse> localVarResp = getUserServersWithHttpInfo(id, page, limit); + @Deprecated + public List getUserServersV1(String id, Integer page, Integer limit) throws ApiException { + ApiResponse> localVarResp = getUserServersV1WithHttpInfo(id, page, limit); return localVarResp.getData(); } @@ -7283,8 +11191,8 @@ public class TribufuGeneratedApi { * Get a list of servers the user is owner of. * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> * @param id (required) - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @return ApiResponse<List<GameServer>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7293,9 +11201,11 @@ public class TribufuGeneratedApi { Status Code Description Response Headers 200 OK - + * @deprecated */ - public ApiResponse> getUserServersWithHttpInfo(String id, Integer page, Integer limit) throws ApiException { - okhttp3.Call localVarCall = getUserServersValidateBeforeCall(id, page, limit, null); + @Deprecated + public ApiResponse> getUserServersV1WithHttpInfo(String id, Integer page, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getUserServersV1ValidateBeforeCall(id, page, limit, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -7304,8 +11214,8 @@ public class TribufuGeneratedApi { * Get a list of servers the user is owner of. (asynchronously) * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> * @param id (required) - * @param page (optional) - * @param limit (optional) + * @param page The page number of the results to retrieve. Defaults to 1. (optional) + * @param limit The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -7315,149 +11225,16 @@ public class TribufuGeneratedApi { Status Code Description Response Headers 200 OK - + * @deprecated */ - public okhttp3.Call getUserServersAsync(String id, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { + @Deprecated + public okhttp3.Call getUserServersV1Async(String id, Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getUserServersValidateBeforeCall(id, page, limit, _callback); + okhttp3.Call localVarCall = getUserServersV1ValidateBeforeCall(id, page, limit, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getUsers - * @param page (optional) - * @param limit (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getUsersCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v1/users"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getUsersValidateBeforeCall(Integer page, Integer limit, final ApiCallback _callback) throws ApiException { - return getUsersCall(page, limit, _callback); - - } - - /** - * Get a list of user profiles. - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - * @param page (optional) - * @param limit (optional) - * @return List<Profile> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public List getUsers(Integer page, Integer limit) throws ApiException { - ApiResponse> localVarResp = getUsersWithHttpInfo(page, limit); - return localVarResp.getData(); - } - - /** - * Get a list of user profiles. - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - * @param page (optional) - * @param limit (optional) - * @return ApiResponse<List<Profile>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public ApiResponse> getUsersWithHttpInfo(Integer page, Integer limit) throws ApiException { - okhttp3.Call localVarCall = getUsersValidateBeforeCall(page, limit, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a list of user profiles. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - * @param page (optional) - * @param limit (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call getUsersAsync(Integer page, Integer limit, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getUsersValidateBeforeCall(page, limit, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for hashArgon2 * @param hashViewModel (optional) @@ -7497,9 +11274,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -7507,10 +11282,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -7624,9 +11396,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -7634,10 +11404,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -7751,9 +11518,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -7761,10 +11526,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -7878,9 +11640,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -7888,10 +11648,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -8005,6 +11762,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -8032,8 +11790,9 @@ public class TribufuGeneratedApi { /** * Introspect a token. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.token.introspect</code> + * * @param introspectRequest (optional) + * @return IntrospectResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8042,15 +11801,16 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public void introspectToken(IntrospectRequest introspectRequest) throws ApiException { - introspectTokenWithHttpInfo(introspectRequest); + public IntrospectResponse introspectToken(IntrospectRequest introspectRequest) throws ApiException { + ApiResponse localVarResp = introspectTokenWithHttpInfo(introspectRequest); + return localVarResp.getData(); } /** * Introspect a token. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.token.introspect</code> + * * @param introspectRequest (optional) - * @return ApiResponse<Void> + * @return ApiResponse<IntrospectResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8059,14 +11819,15 @@ public class TribufuGeneratedApi {
200 OK -
*/ - public ApiResponse introspectTokenWithHttpInfo(IntrospectRequest introspectRequest) throws ApiException { + public ApiResponse introspectTokenWithHttpInfo(IntrospectRequest introspectRequest) throws ApiException { okhttp3.Call localVarCall = introspectTokenValidateBeforeCall(introspectRequest, null); - return localVarApiClient.execute(localVarCall); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Introspect a token. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.token.introspect</code> + * * @param introspectRequest (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -8078,529 +11839,10 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call introspectTokenAsync(IntrospectRequest introspectRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call introspectTokenAsync(IntrospectRequest introspectRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = introspectTokenValidateBeforeCall(introspectRequest, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for login - * @param loginRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public okhttp3.Call loginCall(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = loginRequest; - - // create path and map variables - String localVarPath = "/v1/login"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call loginValidateBeforeCall(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { - return loginCall(loginRequest, _callback); - - } - - /** - * Login with name or email and password. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.token.create</code> - * @param loginRequest (optional) - * @return LoginResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public LoginResponse login(LoginRequest loginRequest) throws ApiException { - ApiResponse localVarResp = loginWithHttpInfo(loginRequest); - return localVarResp.getData(); - } - - /** - * Login with name or email and password. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.token.create</code> - * @param loginRequest (optional) - * @return ApiResponse<LoginResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public ApiResponse loginWithHttpInfo(LoginRequest loginRequest) throws ApiException { - okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Login with name or email and password. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.identity.token.create</code> - * @param loginRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public okhttp3.Call loginAsync(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for logout - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/v1/logout"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call logoutValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return logoutCall(_callback); - - } - - /** - * Invalidate credentials. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.token.revoke</code> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public void logout() throws ApiException { - logoutWithHttpInfo(); - } - - /** - * Invalidate credentials. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.token.revoke</code> - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public ApiResponse logoutWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = logoutValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Invalidate credentials. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.identity.token.revoke</code> - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public okhttp3.Call logoutAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = logoutValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for refresh - * @param refreshRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public okhttp3.Call refreshCall(RefreshRequest refreshRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = refreshRequest; - - // create path and map variables - String localVarPath = "/v1/refresh"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call refreshValidateBeforeCall(RefreshRequest refreshRequest, final ApiCallback _callback) throws ApiException { - return refreshCall(refreshRequest, _callback); - - } - - /** - * Refresh credentials. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.token.refresh</code> - * @param refreshRequest (optional) - * @return LoginResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public LoginResponse refresh(RefreshRequest refreshRequest) throws ApiException { - ApiResponse localVarResp = refreshWithHttpInfo(refreshRequest); - return localVarResp.getData(); - } - - /** - * Refresh credentials. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.token.refresh</code> - * @param refreshRequest (optional) - * @return ApiResponse<LoginResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public ApiResponse refreshWithHttpInfo(RefreshRequest refreshRequest) throws ApiException { - okhttp3.Call localVarCall = refreshValidateBeforeCall(refreshRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Refresh credentials. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.identity.token.refresh</code> - * @param refreshRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- * @deprecated - */ - @Deprecated - public okhttp3.Call refreshAsync(RefreshRequest refreshRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = refreshValidateBeforeCall(refreshRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for register - * @param registerRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call registerCall(RegisterRequest registerRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = registerRequest; - - // create path and map variables - String localVarPath = "/v1/register"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call registerValidateBeforeCall(RegisterRequest registerRequest, final ApiCallback _callback) throws ApiException { - return registerCall(registerRequest, _callback); - - } - - /** - * Create a new user. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.user.create</code> - * @param registerRequest (optional) - * @return LoginResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public LoginResponse register(RegisterRequest registerRequest) throws ApiException { - ApiResponse localVarResp = registerWithHttpInfo(registerRequest); - return localVarResp.getData(); - } - - /** - * Create a new user. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.user.create</code> - * @param registerRequest (optional) - * @return ApiResponse<LoginResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public ApiResponse registerWithHttpInfo(RegisterRequest registerRequest) throws ApiException { - okhttp3.Call localVarCall = registerValidateBeforeCall(registerRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a new user. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.identity.user.create</code> - * @param registerRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 OK -
- */ - public okhttp3.Call registerAsync(RegisterRequest registerRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = registerValidateBeforeCall(registerRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -8670,7 +11912,7 @@ public class TribufuGeneratedApi { /** * Revoke a token. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.token.revoke</code> + * * @param revokeRequest (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8686,7 +11928,7 @@ public class TribufuGeneratedApi { /** * Revoke a token. - * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.token.revoke</code> + * * @param revokeRequest (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -8704,7 +11946,7 @@ public class TribufuGeneratedApi { /** * Revoke a token. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.token.revoke</code> + * * @param revokeRequest (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -8724,7 +11966,7 @@ public class TribufuGeneratedApi { } /** * Build call for search - * @param searchRequest (optional) + * @param search (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -8735,7 +11977,7 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call searchCall(SearchRequest searchRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchCall(Search search, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -8749,7 +11991,7 @@ public class TribufuGeneratedApi { basePath = null; } - Object localVarPostBody = searchRequest; + Object localVarPostBody = search; // create path and map variables String localVarPath = "/v1/search"; @@ -8761,9 +12003,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -8771,10 +12011,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -8786,15 +12023,15 @@ public class TribufuGeneratedApi { } @SuppressWarnings("rawtypes") - private okhttp3.Call searchValidateBeforeCall(SearchRequest searchRequest, final ApiCallback _callback) throws ApiException { - return searchCall(searchRequest, _callback); + private okhttp3.Call searchValidateBeforeCall(Search search, final ApiCallback _callback) throws ApiException { + return searchCall(search, _callback); } /** - * Advanced search for servers or players. + * Advanced search. * <b>🔒 Required permissions:</b> <code>tribufu.community.search</code> - * @param searchRequest (optional) + * @param search (optional) * @return List<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8804,15 +12041,15 @@ public class TribufuGeneratedApi { 200 OK - */ - public List search(SearchRequest searchRequest) throws ApiException { - ApiResponse> localVarResp = searchWithHttpInfo(searchRequest); + public List search(Search search) throws ApiException { + ApiResponse> localVarResp = searchWithHttpInfo(search); return localVarResp.getData(); } /** - * Advanced search for servers or players. + * Advanced search. * <b>🔒 Required permissions:</b> <code>tribufu.community.search</code> - * @param searchRequest (optional) + * @param search (optional) * @return ApiResponse<List<Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -8822,16 +12059,16 @@ public class TribufuGeneratedApi { 200 OK - */ - public ApiResponse> searchWithHttpInfo(SearchRequest searchRequest) throws ApiException { - okhttp3.Call localVarCall = searchValidateBeforeCall(searchRequest, null); + public ApiResponse> searchWithHttpInfo(Search search) throws ApiException { + okhttp3.Call localVarCall = searchValidateBeforeCall(search, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Advanced search for servers or players. (asynchronously) + * Advanced search. (asynchronously) * <b>🔒 Required permissions:</b> <code>tribufu.community.search</code> - * @param searchRequest (optional) + * @param search (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -8842,13 +12079,140 @@ public class TribufuGeneratedApi { 200 OK - */ - public okhttp3.Call searchAsync(SearchRequest searchRequest, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call searchAsync(Search search, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = searchValidateBeforeCall(searchRequest, _callback); + okhttp3.Call localVarCall = searchValidateBeforeCall(search, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for updateClient + * @param id (required) + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call updateClientCall(String id, Object body, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/v1/oauth2/clients/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateClientValidateBeforeCall(String id, Object body, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling updateClient(Async)"); + } + + return updateClientCall(id, body, _callback); + + } + + /** + * Update an oauth2 client. + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.update</code> + * @param id (required) + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public void updateClient(String id, Object body) throws ApiException { + updateClientWithHttpInfo(id, body); + } + + /** + * Update an oauth2 client. + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.update</code> + * @param id (required) + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse updateClientWithHttpInfo(String id, Object body) throws ApiException { + okhttp3.Call localVarCall = updateClientValidateBeforeCall(id, body, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Update an oauth2 client. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.update</code> + * @param id (required) + * @param body (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call updateClientAsync(String id, Object body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateClientValidateBeforeCall(id, body, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for updateGameServer * @param id (required) @@ -8880,7 +12244,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = body; // create path and map variables - String localVarPath = "/v1/servers/{id}" + String localVarPath = "/v1/games/servers/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -8897,10 +12261,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -8924,7 +12285,7 @@ public class TribufuGeneratedApi { /** * Update a game server. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.update</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> * @param id (required) * @param body (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -8941,7 +12302,7 @@ public class TribufuGeneratedApi { /** * Update a game server. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.update</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> * @param id (required) * @param body (optional) * @return ApiResponse<Void> @@ -8960,7 +12321,7 @@ public class TribufuGeneratedApi { /** * Update a game server. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.update</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> * @param id (required) * @param body (optional) * @param _callback The callback to be executed when the API call finishes @@ -9010,7 +12371,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = body; // create path and map variables - String localVarPath = "/v1/clusters/{id}" + String localVarPath = "/v1/games/servers/clusters/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -9027,10 +12388,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -9054,7 +12412,7 @@ public class TribufuGeneratedApi { /** * Update a game server cluster. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.update</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> * @param id (required) * @param body (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -9071,7 +12429,7 @@ public class TribufuGeneratedApi { /** * Update a game server cluster. - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.update</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> * @param id (required) * @param body (optional) * @return ApiResponse<Void> @@ -9090,7 +12448,7 @@ public class TribufuGeneratedApi { /** * Update a game server cluster. (asynchronously) - * <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.update</code> + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> * @param id (required) * @param body (optional) * @param _callback The callback to be executed when the API call finishes @@ -9109,6 +12467,278 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for updateGameServerClusterV1 + * @param id (required) + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call updateGameServerClusterV1Call(String id, Object body, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/v1/clusters/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call updateGameServerClusterV1ValidateBeforeCall(String id, Object body, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling updateGameServerClusterV1(Async)"); + } + + return updateGameServerClusterV1Call(id, body, _callback); + + } + + /** + * Update a game server cluster. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> + * @param id (required) + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public void updateGameServerClusterV1(String id, Object body) throws ApiException { + updateGameServerClusterV1WithHttpInfo(id, body); + } + + /** + * Update a game server cluster. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> + * @param id (required) + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse updateGameServerClusterV1WithHttpInfo(String id, Object body) throws ApiException { + okhttp3.Call localVarCall = updateGameServerClusterV1ValidateBeforeCall(id, body, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Update a game server cluster. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> + * @param id (required) + * @param body (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call updateGameServerClusterV1Async(String id, Object body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateGameServerClusterV1ValidateBeforeCall(id, body, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateGameServerV1 + * @param id (required) + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call updateGameServerV1Call(String id, Object body, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/v1/servers/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call updateGameServerV1ValidateBeforeCall(String id, Object body, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling updateGameServerV1(Async)"); + } + + return updateGameServerV1Call(id, body, _callback); + + } + + /** + * Update a game server. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> + * @param id (required) + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public void updateGameServerV1(String id, Object body) throws ApiException { + updateGameServerV1WithHttpInfo(id, body); + } + + /** + * Update a game server. + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> + * @param id (required) + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse updateGameServerV1WithHttpInfo(String id, Object body) throws ApiException { + okhttp3.Call localVarCall = updateGameServerV1ValidateBeforeCall(id, body, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Update a game server. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> + * @param id (required) + * @param body (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call updateGameServerV1Async(String id, Object body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateGameServerV1ValidateBeforeCall(id, body, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for updateGroup * @param id (required) @@ -9157,10 +12787,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -9239,6 +12866,133 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for updatePackage + * @param id (required) + * @param modelPackage (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call updatePackageCall(String id, ModelPackage modelPackage, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = modelPackage; + + // create path and map variables + String localVarPath = "/v1/packages/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updatePackageValidateBeforeCall(String id, ModelPackage modelPackage, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling updatePackage(Async)"); + } + + return updatePackageCall(id, modelPackage, _callback); + + } + + /** + * Update an package. + * <b>🔒 Required permissions:</b> <code>tribufu.community.package.update</code> + * @param id (required) + * @param modelPackage (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public void updatePackage(String id, ModelPackage modelPackage) throws ApiException { + updatePackageWithHttpInfo(id, modelPackage); + } + + /** + * Update an package. + * <b>🔒 Required permissions:</b> <code>tribufu.community.package.update</code> + * @param id (required) + * @param modelPackage (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public ApiResponse updatePackageWithHttpInfo(String id, ModelPackage modelPackage) throws ApiException { + okhttp3.Call localVarCall = updatePackageValidateBeforeCall(id, modelPackage, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Update an package. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.package.update</code> + * @param id (required) + * @param modelPackage (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call updatePackageAsync(String id, ModelPackage modelPackage, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updatePackageValidateBeforeCall(id, modelPackage, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for updateUserProfile * @param id (required) @@ -9270,7 +13024,7 @@ public class TribufuGeneratedApi { Object localVarPostBody = updateProfile; // create path and map variables - String localVarPath = "/v1/users/{id}/profile" + String localVarPath = "/v1/profiles/{id}/profile" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -9280,9 +13034,7 @@ public class TribufuGeneratedApi { Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", - "application/json", - "text/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -9290,10 +13042,7 @@ public class TribufuGeneratedApi { } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -9376,4 +13125,145 @@ public class TribufuGeneratedApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for updateUserProfileV1 + * @param id (required) + * @param updateProfile (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call updateUserProfileV1Call(String id, UpdateProfile updateProfile, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateProfile; + + // create path and map variables + String localVarPath = "/v1/users/{id}/profile" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call updateUserProfileV1ValidateBeforeCall(String id, UpdateProfile updateProfile, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling updateUserProfileV1(Async)"); + } + + return updateUserProfileV1Call(id, updateProfile, _callback); + + } + + /** + * Update a user profile. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> + * @param id (required) + * @param updateProfile (optional) + * @return Profile + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public Profile updateUserProfileV1(String id, UpdateProfile updateProfile) throws ApiException { + ApiResponse localVarResp = updateUserProfileV1WithHttpInfo(id, updateProfile); + return localVarResp.getData(); + } + + /** + * Update a user profile. + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> + * @param id (required) + * @param updateProfile (optional) + * @return ApiResponse<Profile> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public ApiResponse updateUserProfileV1WithHttpInfo(String id, UpdateProfile updateProfile) throws ApiException { + okhttp3.Call localVarCall = updateUserProfileV1ValidateBeforeCall(id, updateProfile, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update a user profile. (asynchronously) + * <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> + * @param id (required) + * @param updateProfile (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call updateUserProfileV1Async(String id, UpdateProfile updateProfile, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateUserProfileV1ValidateBeforeCall(id, updateProfile, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } } diff --git a/src/main/java/com/tribufu/generated/auth/ApiKeyAuth.java b/src/main/java/com/tribufu/generated/auth/ApiKeyAuth.java index c18cadf..9acb1bd 100644 --- a/src/main/java/com/tribufu/generated/auth/ApiKeyAuth.java +++ b/src/main/java/com/tribufu/generated/auth/ApiKeyAuth.java @@ -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; diff --git a/src/main/java/com/tribufu/generated/auth/Authentication.java b/src/main/java/com/tribufu/generated/auth/Authentication.java index 8b489d5..b18c342 100644 --- a/src/main/java/com/tribufu/generated/auth/Authentication.java +++ b/src/main/java/com/tribufu/generated/auth/Authentication.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/auth/HttpBasicAuth.java b/src/main/java/com/tribufu/generated/auth/HttpBasicAuth.java index 443de7b..78a4af0 100644 --- a/src/main/java/com/tribufu/generated/auth/HttpBasicAuth.java +++ b/src/main/java/com/tribufu/generated/auth/HttpBasicAuth.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/auth/HttpBearerAuth.java b/src/main/java/com/tribufu/generated/auth/HttpBearerAuth.java index 1574433..0e09c39 100644 --- a/src/main/java/com/tribufu/generated/auth/HttpBearerAuth.java +++ b/src/main/java/com/tribufu/generated/auth/HttpBearerAuth.java @@ -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 tokenSupplier; diff --git a/src/main/java/com/tribufu/generated/models/AbstractOpenApiSchema.java b/src/main/java/com/tribufu/generated/models/AbstractOpenApiSchema.java index 3b797a8..64e1860 100644 --- a/src/main/java/com/tribufu/generated/models/AbstractOpenApiSchema.java +++ b/src/main/java/com/tribufu/generated/models/AbstractOpenApiSchema.java @@ -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 diff --git a/src/main/java/com/tribufu/generated/models/Account.java b/src/main/java/com/tribufu/generated/models/Account.java index 80e47f3..05fecd5 100644 --- a/src/main/java/com/tribufu/generated/models/Account.java +++ b/src/main/java/com/tribufu/generated/models/Account.java @@ -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(); + 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()) { - LoginProvider.validateJsonElement(jsonObj.get("provider")); - } + // 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())); } diff --git a/src/main/java/com/tribufu/generated/models/Application.java b/src/main/java/com/tribufu/generated/models/Application.java index e347710..74a4ab7 100644 --- a/src/main/java/com/tribufu/generated/models/Application.java +++ b/src/main/java/com/tribufu/generated/models/Application.java @@ -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 int hashCodeNullable(JsonNullable 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(); + 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 { diff --git a/src/main/java/com/tribufu/generated/models/ApplicationType.java b/src/main/java/com/tribufu/generated/models/ApplicationType.java index 4f40ea1..9859fab 100644 --- a/src/main/java/com/tribufu/generated/models/ApplicationType.java +++ b/src/main/java/com/tribufu/generated/models/ApplicationType.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/models/AuthorizeRequest.java b/src/main/java/com/tribufu/generated/models/AuthorizeRequest.java index f9dbb0e..acbdf3d 100644 --- a/src/main/java/com/tribufu/generated/models/AuthorizeRequest.java +++ b/src/main/java/com/tribufu/generated/models/AuthorizeRequest.java @@ -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(); + 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()) { diff --git a/src/main/java/com/tribufu/generated/models/Client.java b/src/main/java/com/tribufu/generated/models/Client.java new file mode 100644 index 0000000..6a4cfb9 --- /dev/null +++ b/src/main/java/com/tribufu/generated/models/Client.java @@ -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 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 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 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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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 openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + 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(); + 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> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken type) { + if (!Client.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Client' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Client.class)); + + return (TypeAdapter) new TypeAdapter() { + @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); + } +} + diff --git a/src/main/java/com/tribufu/generated/models/RegisterRequest.java b/src/main/java/com/tribufu/generated/models/ClientInfo.java similarity index 50% rename from src/main/java/com/tribufu/generated/models/RegisterRequest.java rename to src/main/java/com/tribufu/generated/models/ClientInfo.java index 2fc6791..3637e47 100644 --- a/src/main/java/com/tribufu/generated/models/RegisterRequest.java +++ b/src/main/java/com/tribufu/generated/models/ClientInfo.java @@ -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 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 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 getPermissions() { + return permissions; + } + + public void setPermissions(@javax.annotation.Nullable List 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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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(); - 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(); 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> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken 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 elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RegisterRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ClientInfo.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @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 */ diff --git a/src/main/java/com/tribufu/generated/models/ClientType.java b/src/main/java/com/tribufu/generated/models/ClientType.java new file mode 100644 index 0000000..708f0be --- /dev/null +++ b/src/main/java/com/tribufu/generated/models/ClientType.java @@ -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 { + @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); + } +} + diff --git a/src/main/java/com/tribufu/generated/models/CodeChallengeMethod.java b/src/main/java/com/tribufu/generated/models/CodeChallengeMethod.java index 04fcbd9..3b4bb43 100644 --- a/src/main/java/com/tribufu/generated/models/CodeChallengeMethod.java +++ b/src/main/java/com/tribufu/generated/models/CodeChallengeMethod.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/models/LoginRequest.java b/src/main/java/com/tribufu/generated/models/CodeResponse.java similarity index 59% rename from src/main/java/com/tribufu/generated/models/LoginRequest.java rename to src/main/java/com/tribufu/generated/models/CodeResponse.java index e7b457c..58d44eb 100644 --- a/src/main/java/com/tribufu/generated/models/LoginRequest.java +++ b/src/main/java/com/tribufu/generated/models/CodeResponse.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -122,7 +122,7 @@ public class LoginRequest { @Override public int hashCode() { - return Objects.hash(login, password); + return Objects.hash(code, state); } private static int hashCodeNullable(JsonNullable 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(); - openapiFields.add("login"); - openapiFields.add("password"); + openapiFields.add("code"); + openapiFields.add("state"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + 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> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken 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 elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LoginRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CodeResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @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 */ diff --git a/src/main/java/com/tribufu/generated/models/CreateUser.java b/src/main/java/com/tribufu/generated/models/CreateUser.java new file mode 100644 index 0000000..236460e --- /dev/null +++ b/src/main/java/com/tribufu/generated/models/CreateUser.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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 openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + 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(); + 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> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateUser.class)); + + return (TypeAdapter) new TypeAdapter() { + @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); + } +} + diff --git a/src/main/java/com/tribufu/generated/models/CryptoViewModel.java b/src/main/java/com/tribufu/generated/models/CryptoViewModel.java index f0e43c1..70f6ee2 100644 --- a/src/main/java/com/tribufu/generated/models/CryptoViewModel.java +++ b/src/main/java/com/tribufu/generated/models/CryptoViewModel.java @@ -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) diff --git a/src/main/java/com/tribufu/generated/models/Game.java b/src/main/java/com/tribufu/generated/models/Game.java index 0fb985b..0e23dab 100644 --- a/src/main/java/com/tribufu/generated/models/Game.java +++ b/src/main/java/com/tribufu/generated/models/Game.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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(); - 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(); + 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())); } } diff --git a/src/main/java/com/tribufu/generated/models/GameServer.java b/src/main/java/com/tribufu/generated/models/GameServer.java index 58b59ec..248e6cf 100644 --- a/src/main/java/com/tribufu/generated/models/GameServer.java +++ b/src/main/java/com/tribufu/generated/models/GameServer.java @@ -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 int hashCodeNullable(JsonNullable 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(); + 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 { diff --git a/src/main/java/com/tribufu/generated/models/GameServerCluster.java b/src/main/java/com/tribufu/generated/models/GameServerCluster.java index c42e1ba..a3b8ebc 100644 --- a/src/main/java/com/tribufu/generated/models/GameServerCluster.java +++ b/src/main/java/com/tribufu/generated/models/GameServerCluster.java @@ -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(); + 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())); diff --git a/src/main/java/com/tribufu/generated/models/GameServerQuery.java b/src/main/java/com/tribufu/generated/models/GameServerQuery.java new file mode 100644 index 0000000..b45b11f --- /dev/null +++ b/src/main/java/com/tribufu/generated/models/GameServerQuery.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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 openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + 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(); + } + + /** + * 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> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken type) { + if (!GameServerQuery.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GameServerQuery' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GameServerQuery.class)); + + return (TypeAdapter) new TypeAdapter() { + @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); + } +} + diff --git a/src/main/java/com/tribufu/generated/models/ServerStatus.java b/src/main/java/com/tribufu/generated/models/GameServerStatus.java similarity index 64% rename from src/main/java/com/tribufu/generated/models/ServerStatus.java rename to src/main/java/com/tribufu/generated/models/GameServerStatus.java index abd31c1..d2c1ad5 100644 --- a/src/main/java/com/tribufu/generated/models/ServerStatus.java +++ b/src/main/java/com/tribufu/generated/models/GameServerStatus.java @@ -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 { + public static class Adapter extends TypeAdapter { @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); } } diff --git a/src/main/java/com/tribufu/generated/models/GrantType.java b/src/main/java/com/tribufu/generated/models/GrantType.java index d566a4a..20aaa5b 100644 --- a/src/main/java/com/tribufu/generated/models/GrantType.java +++ b/src/main/java/com/tribufu/generated/models/GrantType.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/models/Group.java b/src/main/java/com/tribufu/generated/models/Group.java index 4fa9d51..cac3299 100644 --- a/src/main/java/com/tribufu/generated/models/Group.java +++ b/src/main/java/com/tribufu/generated/models/Group.java @@ -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(); + 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())); diff --git a/src/main/java/com/tribufu/generated/models/GroupGame.java b/src/main/java/com/tribufu/generated/models/GroupApplication.java similarity index 74% rename from src/main/java/com/tribufu/generated/models/GroupGame.java rename to src/main/java/com/tribufu/generated/models/GroupApplication.java index aba4fe4..baa48be 100644 --- a/src/main/java/com/tribufu/generated/models/GroupGame.java +++ b/src/main/java/com/tribufu/generated/models/GroupApplication.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable 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(); + 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> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken 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 elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GroupGame.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupApplication.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @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 */ diff --git a/src/main/java/com/tribufu/generated/models/GroupMember.java b/src/main/java/com/tribufu/generated/models/GroupMember.java index adc376c..d84087c 100644 --- a/src/main/java/com/tribufu/generated/models/GroupMember.java +++ b/src/main/java/com/tribufu/generated/models/GroupMember.java @@ -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) diff --git a/src/main/java/com/tribufu/generated/models/GroupRank.java b/src/main/java/com/tribufu/generated/models/GroupRank.java index 2b26ee5..cd6e78a 100644 --- a/src/main/java/com/tribufu/generated/models/GroupRank.java +++ b/src/main/java/com/tribufu/generated/models/GroupRank.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/models/HashViewModel.java b/src/main/java/com/tribufu/generated/models/HashViewModel.java index ca82197..87f91c4 100644 --- a/src/main/java/com/tribufu/generated/models/HashViewModel.java +++ b/src/main/java/com/tribufu/generated/models/HashViewModel.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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(); + 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())); diff --git a/src/main/java/com/tribufu/generated/models/IntrospectRequest.java b/src/main/java/com/tribufu/generated/models/IntrospectRequest.java index 5b998d9..9618dfb 100644 --- a/src/main/java/com/tribufu/generated/models/IntrospectRequest.java +++ b/src/main/java/com/tribufu/generated/models/IntrospectRequest.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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(); + openapiRequiredFields.add("token"); + openapiRequiredFields.add("token_type_hint"); } /** @@ -188,14 +178,19 @@ 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()) { - TokenHintType.validateJsonElement(jsonObj.get("token_type_hint")); - } + // validate the required field `token_type_hint` + TokenHintType.validateJsonElement(jsonObj.get("token_type_hint")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/tribufu/generated/models/IntrospectResponse.java b/src/main/java/com/tribufu/generated/models/IntrospectResponse.java new file mode 100644 index 0000000..e4778e5 --- /dev/null +++ b/src/main/java/com/tribufu/generated/models/IntrospectResponse.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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 openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + 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(); + } + + /** + * 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> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken type) { + if (!IntrospectResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntrospectResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntrospectResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @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); + } +} + diff --git a/src/main/java/com/tribufu/generated/models/IpAddress.java b/src/main/java/com/tribufu/generated/models/IpAddress.java index 5f4a874..6195e4a 100644 --- a/src/main/java/com/tribufu/generated/models/IpAddress.java +++ b/src/main/java/com/tribufu/generated/models/IpAddress.java @@ -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 int hashCodeNullable(JsonNullable 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())); diff --git a/src/main/java/com/tribufu/generated/models/LeaderboardItem.java b/src/main/java/com/tribufu/generated/models/LeaderboardItem.java index 538a9c5..a34aa5e 100644 --- a/src/main/java/com/tribufu/generated/models/LeaderboardItem.java +++ b/src/main/java/com/tribufu/generated/models/LeaderboardItem.java @@ -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) diff --git a/src/main/java/com/tribufu/generated/models/LeaderboardOrder.java b/src/main/java/com/tribufu/generated/models/LeaderboardOrder.java index 77ed0ef..2d8e7fd 100644 --- a/src/main/java/com/tribufu/generated/models/LeaderboardOrder.java +++ b/src/main/java/com/tribufu/generated/models/LeaderboardOrder.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/models/LoginProvider.java b/src/main/java/com/tribufu/generated/models/LoginProvider.java index ff7dd09..58ec65e 100644 --- a/src/main/java/com/tribufu/generated/models/LoginProvider.java +++ b/src/main/java/com/tribufu/generated/models/LoginProvider.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/models/LoginResponse.java b/src/main/java/com/tribufu/generated/models/LoginResponse.java deleted file mode 100644 index f45bbb9..0000000 --- a/src/main/java/com/tribufu/generated/models/LoginResponse.java +++ /dev/null @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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 openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - 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(); - } - - /** - * 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> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken type) { - if (!LoginResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LoginResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LoginResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @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); - } -} - diff --git a/src/main/java/com/tribufu/generated/models/ModelPackage.java b/src/main/java/com/tribufu/generated/models/ModelPackage.java index 085cbc7..88bb36d 100644 --- a/src/main/java/com/tribufu/generated/models/ModelPackage.java +++ b/src/main/java/com/tribufu/generated/models/ModelPackage.java @@ -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 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 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 getReleases() { + return releases; + } + + public void setReleases(@javax.annotation.Nullable List 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 int hashCodeNullable(JsonNullable 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(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("image_url"); } /** @@ -458,6 +471,13 @@ public class ModelPackage { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelPackage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ModelPackage.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -468,17 +488,31 @@ public class ModelPackage { if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); - } if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) && !jsonObj.get("author_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `author_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author_id").toString())); } - if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); + if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if ((jsonObj.get("file_url") != null && !jsonObj.get("file_url").isJsonNull()) && !jsonObj.get("file_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `file_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("file_url").toString())); + if ((jsonObj.get("application_id") != null && !jsonObj.get("application_id").isJsonNull()) && !jsonObj.get("application_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `application_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("application_id").toString())); + } + if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString())); + } + if (jsonObj.get("releases") != null && !jsonObj.get("releases").isJsonNull()) { + JsonArray jsonArrayreleases = jsonObj.getAsJsonArray("releases"); + if (jsonArrayreleases != null) { + // ensure the json data is an array + if (!jsonObj.get("releases").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `releases` to be an array in the JSON string but got `%s`", jsonObj.get("releases").toString())); + } + + // validate the optional field `releases` (array) + for (int i = 0; i < jsonArrayreleases.size(); i++) { + PackageRelease.validateJsonElement(jsonArrayreleases.get(i)); + }; + } } } diff --git a/src/main/java/com/tribufu/generated/models/PackageRelease.java b/src/main/java/com/tribufu/generated/models/PackageRelease.java new file mode 100644 index 0000000..636a37e --- /dev/null +++ b/src/main/java/com/tribufu/generated/models/PackageRelease.java @@ -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 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 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 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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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 openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + 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(); + 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> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken type) { + if (!PackageRelease.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PackageRelease' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PackageRelease.class)); + + return (TypeAdapter) new TypeAdapter() { + @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); + } +} + diff --git a/src/main/java/com/tribufu/generated/models/Subscription.java b/src/main/java/com/tribufu/generated/models/Product.java similarity index 59% rename from src/main/java/com/tribufu/generated/models/Subscription.java rename to src/main/java/com/tribufu/generated/models/Product.java index b3ba301..b849a54 100644 --- a/src/main/java/com/tribufu/generated/models/Subscription.java +++ b/src/main/java/com/tribufu/generated/models/Product.java @@ -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 prices; + private List 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 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 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 getPrices() { + public List getPrices() { return prices; } + public void setPrices(@javax.annotation.Nullable List 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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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(); + 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> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken 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 elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Subscription.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Product.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @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 */ diff --git a/src/main/java/com/tribufu/generated/models/RefreshRequest.java b/src/main/java/com/tribufu/generated/models/ProductPrice.java similarity index 52% rename from src/main/java/com/tribufu/generated/models/RefreshRequest.java rename to src/main/java/com/tribufu/generated/models/ProductPrice.java index 3435d52..72ebcdb 100644 --- a/src/main/java/com/tribufu/generated/models/RefreshRequest.java +++ b/src/main/java/com/tribufu/generated/models/ProductPrice.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -97,7 +147,7 @@ public class RefreshRequest { @Override public int hashCode() { - return Objects.hash(refreshToken); + return Objects.hash(currency, amount, renewal); } private static int hashCodeNullable(JsonNullable 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(); - 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(); + 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> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken 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 elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RefreshRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductPrice.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @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 */ diff --git a/src/main/java/com/tribufu/generated/models/ProductType.java b/src/main/java/com/tribufu/generated/models/ProductType.java new file mode 100644 index 0000000..ac712bd --- /dev/null +++ b/src/main/java/com/tribufu/generated/models/ProductType.java @@ -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 { + @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); + } +} + diff --git a/src/main/java/com/tribufu/generated/models/Profile.java b/src/main/java/com/tribufu/generated/models/Profile.java index 9b20740..fb987dc 100644 --- a/src/main/java/com/tribufu/generated/models/Profile.java +++ b/src/main/java/com/tribufu/generated/models/Profile.java @@ -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) diff --git a/src/main/java/com/tribufu/generated/models/ProfileGame.java b/src/main/java/com/tribufu/generated/models/ProfileGame.java index 03431d4..256c537 100644 --- a/src/main/java/com/tribufu/generated/models/ProfileGame.java +++ b/src/main/java/com/tribufu/generated/models/ProfileGame.java @@ -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) diff --git a/src/main/java/com/tribufu/generated/models/ProfileGroup.java b/src/main/java/com/tribufu/generated/models/ProfileGroup.java index 8a74840..2008d51 100644 --- a/src/main/java/com/tribufu/generated/models/ProfileGroup.java +++ b/src/main/java/com/tribufu/generated/models/ProfileGroup.java @@ -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) diff --git a/src/main/java/com/tribufu/generated/models/ResponseType.java b/src/main/java/com/tribufu/generated/models/ResponseType.java index 0950fa2..2f74065 100644 --- a/src/main/java/com/tribufu/generated/models/ResponseType.java +++ b/src/main/java/com/tribufu/generated/models/ResponseType.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/models/RevokeRequest.java b/src/main/java/com/tribufu/generated/models/RevokeRequest.java index 4f63d4e..e1e96e6 100644 --- a/src/main/java/com/tribufu/generated/models/RevokeRequest.java +++ b/src/main/java/com/tribufu/generated/models/RevokeRequest.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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(); + openapiRequiredFields.add("token"); + openapiRequiredFields.add("token_type_hint"); } /** @@ -188,14 +178,19 @@ 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()) { - TokenHintType.validateJsonElement(jsonObj.get("token_type_hint")); - } + // validate the required field `token_type_hint` + TokenHintType.validateJsonElement(jsonObj.get("token_type_hint")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/tribufu/generated/models/SearchRequest.java b/src/main/java/com/tribufu/generated/models/Search.java similarity index 74% rename from src/main/java/com/tribufu/generated/models/SearchRequest.java rename to src/main/java/com/tribufu/generated/models/Search.java index 7522ced..1ada2f7 100644 --- a/src/main/java/com/tribufu/generated/models/SearchRequest.java +++ b/src/main/java/com/tribufu/generated/models/Search.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable 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(); + 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> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry 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()) { - SearchType.validateJsonElement(jsonObj.get("type")); - } + // 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 TypeAdapter create(Gson gson, TypeToken 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 elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SearchRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Search.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @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 */ diff --git a/src/main/java/com/tribufu/generated/models/SearchType.java b/src/main/java/com/tribufu/generated/models/SearchType.java index 9bb547c..bfc80d6 100644 --- a/src/main/java/com/tribufu/generated/models/SearchType.java +++ b/src/main/java/com/tribufu/generated/models/SearchType.java @@ -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; diff --git a/src/main/java/com/tribufu/generated/models/ServerMetrics.java b/src/main/java/com/tribufu/generated/models/ServerMetrics.java index eba917e..0792bb4 100644 --- a/src/main/java/com/tribufu/generated/models/ServerMetrics.java +++ b/src/main/java/com/tribufu/generated/models/ServerMetrics.java @@ -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) diff --git a/src/main/java/com/tribufu/generated/models/StorageFile.java b/src/main/java/com/tribufu/generated/models/StorageFile.java new file mode 100644 index 0000000..5ba0e4a --- /dev/null +++ b/src/main/java/com/tribufu/generated/models/StorageFile.java @@ -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 boolean equalsNullable(JsonNullable a, JsonNullable 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 int hashCodeNullable(JsonNullable 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 openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + 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(); + 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> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry 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 TypeAdapter create(Gson gson, TypeToken type) { + if (!StorageFile.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StorageFile' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StorageFile.class)); + + return (TypeAdapter) new TypeAdapter() { + @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); + } +} + diff --git a/src/main/java/com/tribufu/generated/models/TokenHintType.java b/src/main/java/com/tribufu/generated/models/TokenHintType.java index 229e834..d815458 100644 --- a/src/main/java/com/tribufu/generated/models/TokenHintType.java +++ b/src/main/java/com/tribufu/generated/models/TokenHintType.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/models/TokenRequest.java b/src/main/java/com/tribufu/generated/models/TokenRequest.java index 57d9a26..ad4126a 100644 --- a/src/main/java/com/tribufu/generated/models/TokenRequest.java +++ b/src/main/java/com/tribufu/generated/models/TokenRequest.java @@ -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 int hashCodeNullable(JsonNullable 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())); } diff --git a/src/main/java/com/tribufu/generated/models/TokenResponse.java b/src/main/java/com/tribufu/generated/models/TokenResponse.java index c0ad675..9f57447 100644 --- a/src/main/java/com/tribufu/generated/models/TokenResponse.java +++ b/src/main/java/com/tribufu/generated/models/TokenResponse.java @@ -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(); + 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())); } diff --git a/src/main/java/com/tribufu/generated/models/TokenType.java b/src/main/java/com/tribufu/generated/models/TokenType.java index ddc6bb5..80ebdb0 100644 --- a/src/main/java/com/tribufu/generated/models/TokenType.java +++ b/src/main/java/com/tribufu/generated/models/TokenType.java @@ -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). diff --git a/src/main/java/com/tribufu/generated/models/UpdateProfile.java b/src/main/java/com/tribufu/generated/models/UpdateProfile.java index 849e4c8..2187217 100644 --- a/src/main/java/com/tribufu/generated/models/UpdateProfile.java +++ b/src/main/java/com/tribufu/generated/models/UpdateProfile.java @@ -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(); + 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())); diff --git a/src/main/java/com/tribufu/generated/models/UserInfo.java b/src/main/java/com/tribufu/generated/models/UserInfo.java index 9c1dbf9..f6871ff 100644 --- a/src/main/java/com/tribufu/generated/models/UserInfo.java +++ b/src/main/java/com/tribufu/generated/models/UserInfo.java @@ -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 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 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 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 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 int hashCodeNullable(JsonNullable 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(); + 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())); } } diff --git a/src/main/java/com/tribufu/generated/models/UserType.java b/src/main/java/com/tribufu/generated/models/UserType.java index bac6068..faa7aef 100644 --- a/src/main/java/com/tribufu/generated/models/UserType.java +++ b/src/main/java/com/tribufu/generated/models/UserType.java @@ -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).