queryParams, List queryParams, List
queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException {
- updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
-
- final String url = buildUrl(path, queryParams, collectionQueryParams);
- final Request.Builder reqBuilder = new Request.Builder().url(url);
- processHeaderParams(headerParams, reqBuilder);
- processCookieParams(cookieParams, reqBuilder);
-
- String contentType = (String) headerParams.get("Content-Type");
- // ensuring a default content type
- if (contentType == null) {
- contentType = "application/json";
- }
+ public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException {
+ final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
+ // prepare HTTP request body
RequestBody reqBody;
+ String contentType = headerParams.get("Content-Type");
+ String contentTypePure = contentType;
+ if (contentTypePure != null && contentTypePure.contains(";")) {
+ contentTypePure = contentType.substring(0, contentType.indexOf(";"));
+ }
if (!HttpMethod.permitsRequestBody(method)) {
reqBody = null;
- } else if ("application/x-www-form-urlencoded".equals(contentType)) {
+ } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) {
reqBody = buildRequestBodyFormEncoding(formParams);
- } else if ("multipart/form-data".equals(contentType)) {
+ } else if ("multipart/form-data".equals(contentTypePure)) {
reqBody = buildRequestBodyMultipart(formParams);
} else if (body == null) {
if ("DELETE".equals(method)) {
@@ -1086,12 +1256,21 @@ public Request buildRequest(String path, String method, List queryParams,
reqBody = null;
} else {
// use an empty request body (for POST, PUT and PATCH)
- reqBody = RequestBody.create("", MediaType.parse(contentType));
+ reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType));
}
} else {
reqBody = serialize(body, contentType);
}
+ List updatedQueryParams = new ArrayList<>(queryParams);
+
+ // update parameters with authentication settings
+ updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
+
+ final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
+ processHeaderParams(headerParams, reqBuilder);
+ processCookieParams(cookieParams, reqBuilder);
+
// Associate callback with request (if not null) so interceptor can
// access it when creating ProgressResponseBody
reqBuilder.tag(callback);
@@ -1111,14 +1290,31 @@ public Request buildRequest(String path, String method, List queryParams,
/**
* Build full URL by concatenating base path, the given sub path and query parameters.
*
+ * @param baseUrl The base URL
* @param path The sub path
* @param queryParams The query parameters
* @param collectionQueryParams The collection query parameters
* @return The full URL
*/
- public String buildUrl(String path, List queryParams, List collectionQueryParams) {
+ public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) {
final StringBuilder url = new StringBuilder();
- url.append(basePath).append(path);
+ if (baseUrl != null) {
+ url.append(baseUrl).append(path);
+ } else {
+ String baseURL;
+ if (serverIndex != null) {
+ if (serverIndex < 0 || serverIndex >= servers.size()) {
+ throw new ArrayIndexOutOfBoundsException(String.format(
+ java.util.Locale.ROOT,
+ "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size()
+ ));
+ }
+ baseURL = servers.get(serverIndex).URL(serverVariables);
+ } else {
+ baseURL = basePath;
+ }
+ url.append(baseURL).append(path);
+ }
if (queryParams != null && !queryParams.isEmpty()) {
// support (constant) query string in `path`, e.g. "/posts?draft=1"
@@ -1182,11 +1378,11 @@ public void processHeaderParams(Map headerParams, Request.Builde
*/
public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) {
for (Entry param : cookieParams.entrySet()) {
- reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue()));
+ reqBuilder.addHeader("Cookie", String.format(java.util.Locale.ROOT, "%s=%s", param.getKey(), param.getValue()));
}
for (Entry param : defaultCookieMap.entrySet()) {
if (!cookieParams.containsKey(param.getKey())) {
- reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue()));
+ reqBuilder.addHeader("Cookie", String.format(java.util.Locale.ROOT, "%s=%s", param.getKey(), param.getValue()));
}
}
}
@@ -1198,14 +1394,19 @@ public void processCookieParams(Map cookieParams, Request.Builde
* @param queryParams List of query parameters
* @param headerParams Map of header parameters
* @param cookieParams Map of cookie parameters
+ * @param payload HTTP request body
+ * @param method HTTP method
+ * @param uri URI
+ * @throws io.github.vrchatapi.ApiException If fails to update the parameters
*/
- public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) {
+ public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams,
+ Map cookieParams, String payload, String method, URI uri) throws ApiException {
for (String authName : authNames) {
Authentication auth = authentications.get(authName);
if (auth == null) {
throw new RuntimeException("Authentication undefined: " + authName);
}
- auth.applyToParams(queryParams, headerParams, cookieParams);
+ auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri);
}
}
@@ -1235,12 +1436,18 @@ public RequestBody buildRequestBodyMultipart(Map formParams) {
for (Entry param : formParams.entrySet()) {
if (param.getValue() instanceof File) {
File file = (File) param.getValue();
- Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\"");
- MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file));
- mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType));
+ addPartToMultiPartBuilder(mpBuilder, param.getKey(), file);
+ } else if (param.getValue() instanceof List) {
+ List list = (List) param.getValue();
+ for (Object item: list) {
+ if (item instanceof File) {
+ addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item);
+ } else {
+ addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue());
+ }
+ }
} else {
- Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"");
- mpBuilder.addPart(partHeaders, RequestBody.create(parameterToString(param.getValue()), null));
+ addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue());
}
}
return mpBuilder.build();
@@ -1261,11 +1468,49 @@ public String guessContentTypeFromFile(File file) {
}
}
+ /**
+ * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder.
+ *
+ * @param mpBuilder MultipartBody.Builder
+ * @param key The key of the Header element
+ * @param file The file to add to the Header
+ */
+ protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) {
+ Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\"");
+ MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file));
+ mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType));
+ }
+
+ /**
+ * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder.
+ *
+ * @param mpBuilder MultipartBody.Builder
+ * @param key The key of the Header element
+ * @param obj The complex object to add to the Header
+ */
+ protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) {
+ RequestBody requestBody;
+ if (obj instanceof String) {
+ requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain"));
+ } else {
+ String content;
+ if (obj != null) {
+ content = JSON.serialize(obj);
+ } else {
+ content = null;
+ }
+ requestBody = RequestBody.create(content, MediaType.parse("application/json"));
+ }
+
+ Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"");
+ mpBuilder.addPart(partHeaders, requestBody);
+ }
+
/**
* Get network interceptor to add it to the httpClient to track download progress for
* async requests.
*/
- private Interceptor getProgressInterceptor() {
+ protected Interceptor getProgressInterceptor() {
return new Interceptor() {
@Override
public Response intercept(Interceptor.Chain chain) throws IOException {
@@ -1286,7 +1531,7 @@ public Response intercept(Interceptor.Chain chain) throws IOException {
* Apply SSL related settings to httpClient according to the current values of
* verifyingSsl and sslCaCert.
*/
- private void applySslSettings() {
+ protected void applySslSettings() {
try {
TrustManager[] trustManagers;
HostnameVerifier hostnameVerifier;
@@ -1328,13 +1573,23 @@ public boolean verify(String hostname, SSLSession session) {
KeyStore caKeyStore = newEmptyKeyStore(password);
int index = 0;
for (Certificate certificate : certificates) {
- String certificateAlias = "ca" + Integer.toString(index++);
+ String certificateAlias = "ca" + (index++);
caKeyStore.setCertificateEntry(certificateAlias, certificate);
}
trustManagerFactory.init(caKeyStore);
}
trustManagers = trustManagerFactory.getTrustManagers();
- hostnameVerifier = OkHostnameVerifier.INSTANCE;
+ if (tlsServerName != null && !tlsServerName.isEmpty()) {
+ hostnameVerifier = new HostnameVerifier() {
+ @Override
+ public boolean verify(String hostname, SSLSession session) {
+ // Verify the certificate against tlsServerName instead of the actual hostname
+ return OkHostnameVerifier.INSTANCE.verify(tlsServerName, session);
+ }
+ };
+ } else {
+ hostnameVerifier = OkHostnameVerifier.INSTANCE;
+ }
}
SSLContext sslContext = SSLContext.getInstance("TLS");
@@ -1348,7 +1603,7 @@ public boolean verify(String hostname, SSLSession session) {
}
}
- private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException {
+ protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException {
try {
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
keyStore.load(null, password);
@@ -1357,4 +1612,26 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti
throw new AssertionError(e);
}
}
+
+ /**
+ * Convert the HTTP request body to a string.
+ *
+ * @param requestBody The HTTP request object
+ * @return The string representation of the HTTP request body
+ * @throws io.github.vrchatapi.ApiException If fail to serialize the request body object into a string
+ */
+ protected String requestBodyToString(RequestBody requestBody) throws ApiException {
+ if (requestBody != null) {
+ try {
+ final Buffer buffer = new Buffer();
+ requestBody.writeTo(buffer);
+ return buffer.readUtf8();
+ } catch (final IOException e) {
+ throw new ApiException(e);
+ }
+ }
+
+ // empty http request body
+ return "";
+ }
}
diff --git a/src/main/java/io/github/vrchatapi/ApiException.java b/src/main/java/io/github/vrchatapi/ApiException.java
index e7b15fd5..31173457 100644
--- a/src/main/java/io/github/vrchatapi/ApiException.java
+++ b/src/main/java/io/github/vrchatapi/ApiException.java
@@ -1,8 +1,8 @@
/*
* VRChat API Documentation
*
- * The version of the OpenAPI document: 1.6.9
- * Contact: me@ruby.js.org
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -15,22 +15,51 @@
import java.util.Map;
import java.util.List;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+
+/**
+ * ApiException class.
+ */
+@SuppressWarnings("serial")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0")
public class ApiException extends Exception {
+ private static final long serialVersionUID = 1L;
+
private int code = 0;
private Map> responseHeaders = null;
private String responseBody = null;
+ /**
+ * Constructor for ApiException.
+ */
public ApiException() {}
+ /**
+ * Constructor for ApiException.
+ *
+ * @param throwable a {@link java.lang.Throwable} object
+ */
public ApiException(Throwable throwable) {
super(throwable);
}
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ */
public ApiException(String message) {
super(message);
}
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ * @param throwable a {@link java.lang.Throwable} object
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) {
super(message, throwable);
this.code = code;
@@ -38,23 +67,60 @@ public ApiException(String message, Throwable throwable, int code, MapConstructor for ApiException.
+ *
+ * @param message the error message
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
public ApiException(String message, int code, Map> responseHeaders, String responseBody) {
this(message, (Throwable) null, code, responseHeaders, responseBody);
}
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ * @param throwable a {@link java.lang.Throwable} object
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ */
public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) {
this(message, throwable, code, responseHeaders, null);
}
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
public ApiException(int code, Map> responseHeaders, String responseBody) {
- this((String) null, (Throwable) null, code, responseHeaders, responseBody);
+ this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody);
}
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param message a {@link java.lang.String} object
+ */
public ApiException(int code, String message) {
super(message);
this.code = code;
}
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param message the error message
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
public ApiException(int code, String message, Map> responseHeaders, String responseBody) {
this(code, message);
this.responseHeaders = responseHeaders;
@@ -87,4 +153,14 @@ public Map> getResponseHeaders() {
public String getResponseBody() {
return responseBody;
}
+
+ /**
+ * Get the exception message including HTTP response data.
+ *
+ * @return The exception message
+ */
+ public String getMessage() {
+ return String.format(java.util.Locale.ROOT, "Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s",
+ super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders());
+ }
}
diff --git a/src/main/java/io/github/vrchatapi/ApiResponse.java b/src/main/java/io/github/vrchatapi/ApiResponse.java
index 5e4237a3..c6392341 100644
--- a/src/main/java/io/github/vrchatapi/ApiResponse.java
+++ b/src/main/java/io/github/vrchatapi/ApiResponse.java
@@ -1,8 +1,8 @@
/*
* VRChat API Documentation
*
- * The version of the OpenAPI document: 1.6.9
- * Contact: me@ruby.js.org
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -17,8 +17,6 @@
/**
* API response returned by API call.
- *
- * @param The type of data that is deserialized from response body
*/
public class ApiResponse {
final private int statusCode;
@@ -26,6 +24,8 @@ public class ApiResponse {
final private T data;
/**
+ * Constructor for ApiResponse.
+ *
* @param statusCode The status code of HTTP response
* @param headers The headers of HTTP response
*/
@@ -34,6 +34,8 @@ public ApiResponse(int statusCode, Map> headers) {
}
/**
+ * Constructor for ApiResponse.
+ *
* @param statusCode The status code of HTTP response
* @param headers The headers of HTTP response
* @param data The object deserialized from response bod
@@ -44,14 +46,29 @@ public ApiResponse(int statusCode, Map> headers, T data) {
this.data = data;
}
+ /**
+ * Get the status code.
+ *
+ * @return the status code
+ */
public int getStatusCode() {
return statusCode;
}
+ /**
+ * Get the headers.
+ *
+ * @return a {@link java.util.Map} of headers
+ */
public Map> getHeaders() {
return headers;
}
+ /**
+ * Get the data.
+ *
+ * @return the data
+ */
public T getData() {
return data;
}
diff --git a/src/main/java/io/github/vrchatapi/Configuration.java b/src/main/java/io/github/vrchatapi/Configuration.java
index 4d5e66d7..9f58b74c 100644
--- a/src/main/java/io/github/vrchatapi/Configuration.java
+++ b/src/main/java/io/github/vrchatapi/Configuration.java
@@ -1,8 +1,8 @@
/*
* VRChat API Documentation
*
- * The version of the OpenAPI document: 1.6.9
- * Contact: me@ruby.js.org
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -12,27 +12,51 @@
package io.github.vrchatapi;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+import java.util.Objects;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Supplier;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0")
public class Configuration {
- private static ApiClient defaultApiClient = new ApiClient();
-
- /**
- * Get the default API client, which would be used when creating API
- * instances without providing an API client.
- *
- * @return Default API client
- */
- public static ApiClient getDefaultApiClient() {
- return defaultApiClient;
- }
+ public static final String VERSION = "1.20.8";
+
+ private static final AtomicReference defaultApiClient = new AtomicReference<>();
+ private static volatile Supplier apiClientFactory = ApiClient::new;
- /**
- * Set the default API client, which would be used when creating API
- * instances without providing an API client.
- *
- * @param apiClient API client
- */
- public static void setDefaultApiClient(ApiClient apiClient) {
- defaultApiClient = apiClient;
+ /**
+ * Get the default API client, which would be used when creating API instances without providing an API client.
+ *
+ * @return Default API client
+ */
+ public static ApiClient getDefaultApiClient() {
+ ApiClient client = defaultApiClient.get();
+ if (client == null) {
+ client = defaultApiClient.updateAndGet(val -> {
+ if (val != null) { // changed by another thread
+ return val;
+ }
+ return apiClientFactory.get();
+ });
}
-}
+ return client;
+ }
+
+ /**
+ * Set the default API client, which would be used when creating API instances without providing an API client.
+ *
+ * @param apiClient API client
+ */
+ public static void setDefaultApiClient(ApiClient apiClient) {
+ defaultApiClient.set(apiClient);
+ }
+
+ /**
+ * set the callback used to create new ApiClient objects
+ */
+ public static void setApiClientFactory(Supplier factory) {
+ apiClientFactory = Objects.requireNonNull(factory);
+ }
+
+ private Configuration() {
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/io/github/vrchatapi/GzipRequestInterceptor.java b/src/main/java/io/github/vrchatapi/GzipRequestInterceptor.java
index b82b1901..ec597834 100644
--- a/src/main/java/io/github/vrchatapi/GzipRequestInterceptor.java
+++ b/src/main/java/io/github/vrchatapi/GzipRequestInterceptor.java
@@ -1,8 +1,8 @@
/*
* VRChat API Documentation
*
- * The version of the OpenAPI document: 1.6.9
- * Contact: me@ruby.js.org
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
diff --git a/src/main/java/io/github/vrchatapi/JSON.java b/src/main/java/io/github/vrchatapi/JSON.java
index 40d100b2..ed9df065 100644
--- a/src/main/java/io/github/vrchatapi/JSON.java
+++ b/src/main/java/io/github/vrchatapi/JSON.java
@@ -1,8 +1,8 @@
/*
* VRChat API Documentation
*
- * The version of the OpenAPI document: 1.6.9
- * Contact: me@ruby.js.org
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -22,32 +22,40 @@
import com.google.gson.JsonElement;
import io.gsonfire.GsonFireBuilder;
import io.gsonfire.TypeSelector;
-import org.threeten.bp.LocalDate;
-import org.threeten.bp.OffsetDateTime;
-import org.threeten.bp.format.DateTimeFormatter;
-import io.github.vrchatapi.model.*;
import okio.ByteString;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
import java.io.StringReader;
import java.lang.reflect.Type;
+import java.nio.charset.StandardCharsets;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.ParsePosition;
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
import java.util.HashMap;
+/*
+ * A JSON utility class
+ *
+ * NOTE: in the future, this class may be converted to static, which may break
+ * backward-compatibility
+ */
public class JSON {
- private Gson gson;
- private boolean isLenientOnJson = false;
- private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
- private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
- private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
- private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
- private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
+ private static Gson gson;
+ private static boolean isLenientOnJson = false;
+ private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
+ private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
+ private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
+ private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
+ private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
@SuppressWarnings("unchecked")
public static GsonBuilder createGson() {
@@ -80,14 +88,291 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
return clazz;
}
- public JSON() {
- gson = createGson()
- .registerTypeAdapter(Date.class, dateTypeAdapter)
- .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
- .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
- .registerTypeAdapter(LocalDate.class, localDateTypeAdapter)
- .registerTypeAdapter(byte[].class, byteArrayAdapter)
- .create();
+ static {
+ GsonBuilder gsonBuilder = createGson();
+ gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter);
+ gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfig.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigAccessLogsUrls.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigAnnouncement.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigAudioConfig.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigAvatarPerfLimiter.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstants.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsGROUPS.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsINSTANCE.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETS.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsLANGUAGE.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigDownloadURLList.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigEvents.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigIosVersion.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigMinSupportedClientBuildNumber.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigOfflineAnalysis.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIHealth.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AccountDeletionLog.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AddFavoriteRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AddGroupGalleryImageRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AdminAssetBundle.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AdminUnityPackage.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Agreement.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AgreementRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AgreementStatus.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Avatar.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarModeration.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarModerationCreated.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarPerformance.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarPublishedListingsInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarStyle.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarStyles.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarUnityPackageUrlObject.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Badge.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Balance.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.BanGroupMemberRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.BoopRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CalendarEvent.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CalendarEventDiscovery.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CalendarEventRecurrence.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CalendarEventRecurrenceEnd.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CalendarEventUserInterest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ChangeUserTagsRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ChangeWorldTagsRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateAvatarModerationRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateAvatarRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateCalendarEventRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateFileRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateFileVersionRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupAnnouncementRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupGalleryRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupInviteRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupPostRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupRoleRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateInstanceRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateJamSubmissionRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateListingRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateProductRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreatePropRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateWorldRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CurrentUser.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CurrentUserPlatformHistoryInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CurrentUserPresence.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.DeclineGroupInviteRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Disable2FAResult.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.DiscordDetails.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.DynamicContentRow.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EarningsMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EarningsMetricsTotals.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyAccount.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyBalances.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyPayout.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyPayoutEligibility.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyPayoutList.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyPayoutStatus.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EditPrintRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EquipInventoryItemRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Error.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Favorite.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FavoriteGroup.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FavoriteGroupLimits.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FavoriteLimits.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FavoritedWorld.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Feedback.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileAnalysis.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileAnalysisAvatarStats.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileUploadURL.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileVersion.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileVersionUploadStatus.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FinishFileDataUploadRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FollowCalendarEventRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FriendStatus.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GetGroupPosts200Response.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GetUserGroupInstances200Response.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Group.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupAnnouncement.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupAuditLogEntry.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupGallery.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupGalleryFileOrder.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupGalleryFileOrderRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupGalleryImage.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupInstance.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupMember.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupMemberLimitedUser.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupMyMember.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupPermission.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupPost.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupRole.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupRoleTemplateValues.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupRoleTemplateValuesRoles.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupTransferable.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupTransferableRequirements.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InfoPush.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InfoPushData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InfoPushDataArticle.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InfoPushDataArticleContent.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InfoPushDataClickable.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Instance.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InstanceContentSettings.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InstancePlatforms.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InstanceShortNameResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Inventory.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryConsumptionResults.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryDefaultAttributesValue.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryDefaultAttributesValueValidator.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryDrop.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryItem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryMetadata.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryNotificationDetails.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventorySpawn.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryTemplate.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryUserAttributes.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InviteMessage.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InviteRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InviteResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InviteUserWithPhotoRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Jam.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.JamStateChangeDates.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.JamSubmission.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.JoinGroupRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.License.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LicenseGroup.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedGroup.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedUnityPackage.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedUserFriend.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedUserGroups.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedUserInstance.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedUserSearch.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedWorld.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ModelFile.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ModerateUserRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ModerationReport.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.MutualFriend.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Mutuals.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Notification.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationDetailInvite.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationDetailInviteResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationDetailRequestInvite.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationDetailRequestInviteResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationDetailVoteToKick.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2DetailsBoop.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2Response.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.OkStatus.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.OkStatus2.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PaginatedCalendarEventList.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PaginatedGroupAuditLogEntryList.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PaginatedModerationReportList.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PastDisplayName.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Pending2FAResult.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PerformanceLimiterInfo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Permission.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PermissionData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PlatformBuildInfo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PlayerModeration.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Print.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PrintFiles.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PrivateProfile.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PrivateProfileActivity.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Product.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductListing.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductListingVariant.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductPurchase.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductPurchaseHistory.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductPurchaseProduct.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductPurchasePurchaseContext.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductPurchaseRecord.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProfileRepresentedGroup.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Prop.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PropPublishStatus.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PropUnityPackage.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PublicProfile.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PurchaseContextData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PurchaseProductListingRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RegisterUserAccountRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ReportCategory.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ReportReason.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RepresentedGroup.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RequestInviteRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RequestInviteWithPhotoRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RespondGroupJoinRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RespondInviteWithPhotoRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RespondNotificationV2Request.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Response.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RewardBadge.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RewardRedemption.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RewardRedemptionData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RewardRedemptionRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RewardRedemptionResult.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SearchGroupMembers200Response.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SellerEligibility.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SentNotification.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ServiceQueueStats.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ServiceStatus.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ShareInventoryItemDirectRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Store.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.StoreContext.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.StoreShelf.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SubmitModerationReportRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SubmitModerationReportRequestDetails.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Subscription.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Success.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SuccessFlag.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TiliaKyc.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TiliaStatus.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TiliaTOS.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TokenBundle.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Transaction.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TransactionAgreement.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TransactionSteamInfo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TransactionSteamWalletInfo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TransferGroupRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TutorialStatus.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TwoFactorAuthCode.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TwoFactorEmailCode.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TwoFactorRecoveryCodes.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TwoFactorRecoveryCodesOtpInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UnityPackage.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateAssetReviewNotesRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateAvatarRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateCalendarEventRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateFavoriteGroupRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateGroupGalleryRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateGroupMemberRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateGroupRepresentationRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateGroupRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateGroupRoleRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateInventoryItemRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateInviteMessageRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateListingRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateProductRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdatePropRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateTiliaTOSRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateUserBadgeRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateUserNoteRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateUserRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateWorldRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UploadGalleryImageRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UploadImageRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UploadPrintRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.User.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserCreditsEligible.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserExists.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserNote.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserNoteTargetUser.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserSubscription.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserSubscriptionEligible.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Verify2FAEmailCodeResult.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Verify2FAResult.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.VerifyAuthTokenResult.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.World.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.WorldMetadata.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.WorldPublishStatus.CustomTypeAdapterFactory());
+ gson = gsonBuilder.create();
}
/**
@@ -95,7 +380,7 @@ public JSON() {
*
* @return Gson
*/
- public Gson getGson() {
+ public static Gson getGson() {
return gson;
}
@@ -103,16 +388,13 @@ public Gson getGson() {
* Set Gson.
*
* @param gson Gson
- * @return JSON
*/
- public JSON setGson(Gson gson) {
- this.gson = gson;
- return this;
+ public static void setGson(Gson gson) {
+ JSON.gson = gson;
}
- public JSON setLenientOnJson(boolean lenientOnJson) {
+ public static void setLenientOnJson(boolean lenientOnJson) {
isLenientOnJson = lenientOnJson;
- return this;
}
/**
@@ -121,7 +403,7 @@ public JSON setLenientOnJson(boolean lenientOnJson) {
* @param obj Object
* @return String representation of the JSON
*/
- public String serialize(Object obj) {
+ public static String serialize(Object obj) {
return gson.toJson(obj);
}
@@ -134,7 +416,7 @@ public String serialize(Object obj) {
* @return The deserialized Java object
*/
@SuppressWarnings("unchecked")
- public T deserialize(String body, Type returnType) {
+ public static T deserialize(String body, Type returnType) {
try {
if (isLenientOnJson) {
JsonReader jsonReader = new JsonReader(new StringReader(body));
@@ -155,10 +437,32 @@ public T deserialize(String body, Type returnType) {
}
}
+ /**
+ * Deserialize the given JSON InputStream to a Java object.
+ *
+ * @param Type
+ * @param inputStream The JSON InputStream
+ * @param returnType The type to deserialize into
+ * @return The deserialized Java object
+ */
+ @SuppressWarnings("unchecked")
+ public static T deserialize(InputStream inputStream, Type returnType) throws IOException {
+ try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) {
+ if (isLenientOnJson) {
+ // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
+ JsonReader jsonReader = new JsonReader(reader);
+ jsonReader.setLenient(true);
+ return gson.fromJson(jsonReader, returnType);
+ } else {
+ return gson.fromJson(reader, returnType);
+ }
+ }
+ }
+
/**
* Gson TypeAdapter for Byte Array type
*/
- public class ByteArrayAdapter extends TypeAdapter {
+ public static class ByteArrayAdapter extends TypeAdapter {
@Override
public void write(JsonWriter out, byte[] value) throws IOException {
@@ -230,7 +534,7 @@ public OffsetDateTime read(JsonReader in) throws IOException {
/**
* Gson TypeAdapter for JSR310 LocalDate type
*/
- public class LocalDateTypeAdapter extends TypeAdapter {
+ public static class LocalDateTypeAdapter extends TypeAdapter {
private DateTimeFormatter formatter;
@@ -268,14 +572,12 @@ public LocalDate read(JsonReader in) throws IOException {
}
}
- public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
+ public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
offsetDateTimeTypeAdapter.setFormat(dateFormat);
- return this;
}
- public JSON setLocalDateFormat(DateTimeFormatter dateFormat) {
+ public static void setLocalDateFormat(DateTimeFormatter dateFormat) {
localDateTypeAdapter.setFormat(dateFormat);
- return this;
}
/**
@@ -389,14 +691,11 @@ public Date read(JsonReader in) throws IOException {
}
}
- public JSON setDateFormat(DateFormat dateFormat) {
+ public static void setDateFormat(DateFormat dateFormat) {
dateTypeAdapter.setFormat(dateFormat);
- return this;
}
- public JSON setSqlDateFormat(DateFormat dateFormat) {
+ public static void setSqlDateFormat(DateFormat dateFormat) {
sqlDateTypeAdapter.setFormat(dateFormat);
- return this;
}
-
}
diff --git a/src/main/java/io/github/vrchatapi/Pair.java b/src/main/java/io/github/vrchatapi/Pair.java
index 4cee8298..5ac4d0be 100644
--- a/src/main/java/io/github/vrchatapi/Pair.java
+++ b/src/main/java/io/github/vrchatapi/Pair.java
@@ -1,8 +1,8 @@
/*
* VRChat API Documentation
*
- * The version of the OpenAPI document: 1.6.9
- * Contact: me@ruby.js.org
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -12,49 +12,25 @@
package io.github.vrchatapi;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0")
public class Pair {
- private String name = "";
- private String value = "";
+ private final String name;
+ private final String value;
- public Pair (String name, String value) {
- setName(name);
- setValue(value);
- }
+ public Pair(String name, String value) {
+ this.name = isValidString(name) ? name : "";
+ this.value = isValidString(value) ? value : "";
+ }
- private void setName(String name) {
- if (!isValidString(name)) {
- return;
- }
+ public String getName() {
+ return this.name;
+ }
- this.name = name;
- }
+ public String getValue() {
+ return this.value;
+ }
- private void setValue(String value) {
- if (!isValidString(value)) {
- return;
- }
-
- this.value = value;
- }
-
- public String getName() {
- return this.name;
- }
-
- public String getValue() {
- return this.value;
- }
-
- private boolean isValidString(String arg) {
- if (arg == null) {
- return false;
- }
-
- if (arg.trim().isEmpty()) {
- return false;
- }
-
- return true;
- }
+ private static boolean isValidString(String arg) {
+ return arg != null;
+ }
}
diff --git a/src/main/java/io/github/vrchatapi/ProgressRequestBody.java b/src/main/java/io/github/vrchatapi/ProgressRequestBody.java
index 1a1eeb7c..5634b999 100644
--- a/src/main/java/io/github/vrchatapi/ProgressRequestBody.java
+++ b/src/main/java/io/github/vrchatapi/ProgressRequestBody.java
@@ -1,8 +1,8 @@
/*
* VRChat API Documentation
*
- * The version of the OpenAPI document: 1.6.9
- * Contact: me@ruby.js.org
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
diff --git a/src/main/java/io/github/vrchatapi/ProgressResponseBody.java b/src/main/java/io/github/vrchatapi/ProgressResponseBody.java
index 6c25ef5f..038b799e 100644
--- a/src/main/java/io/github/vrchatapi/ProgressResponseBody.java
+++ b/src/main/java/io/github/vrchatapi/ProgressResponseBody.java
@@ -1,8 +1,8 @@
/*
* VRChat API Documentation
*
- * The version of the OpenAPI document: 1.6.9
- * Contact: me@ruby.js.org
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
diff --git a/src/main/java/io/github/vrchatapi/ServerConfiguration.java b/src/main/java/io/github/vrchatapi/ServerConfiguration.java
index 6b6e36f4..ab2a0f99 100644
--- a/src/main/java/io/github/vrchatapi/ServerConfiguration.java
+++ b/src/main/java/io/github/vrchatapi/ServerConfiguration.java
@@ -1,3 +1,15 @@
+/*
+ * VRChat API Documentation
+ *
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
package io.github.vrchatapi;
import java.util.Map;
@@ -5,6 +17,7 @@
/**
* Representing a Server configuration.
*/
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0")
public class ServerConfiguration {
public String URL;
public String description;
@@ -39,10 +52,10 @@ public String URL(Map variables) {
if (variables != null && variables.containsKey(name)) {
value = variables.get(name);
if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
- throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + ".");
+ throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
- url = url.replaceAll("\\{" + name + "\\}", value);
+ url = url.replace("{" + name + "}", value);
}
return url;
}
diff --git a/src/main/java/io/github/vrchatapi/ServerVariable.java b/src/main/java/io/github/vrchatapi/ServerVariable.java
index 35c71a91..856a0b39 100644
--- a/src/main/java/io/github/vrchatapi/ServerVariable.java
+++ b/src/main/java/io/github/vrchatapi/ServerVariable.java
@@ -1,3 +1,15 @@
+/*
+ * VRChat API Documentation
+ *
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
package io.github.vrchatapi;
import java.util.HashSet;
@@ -5,6 +17,7 @@
/**
* Representing a Server Variable for server URL template substitution.
*/
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0")
public class ServerVariable {
public String description;
public String defaultValue;
diff --git a/src/main/java/io/github/vrchatapi/StringUtil.java b/src/main/java/io/github/vrchatapi/StringUtil.java
index 2861a84c..4621c676 100644
--- a/src/main/java/io/github/vrchatapi/StringUtil.java
+++ b/src/main/java/io/github/vrchatapi/StringUtil.java
@@ -1,8 +1,8 @@
/*
* VRChat API Documentation
*
- * The version of the OpenAPI document: 1.6.9
- * Contact: me@ruby.js.org
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -15,7 +15,7 @@
import java.util.Collection;
import java.util.Iterator;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
diff --git a/src/main/java/io/github/vrchatapi/api/AuthenticationApi.java b/src/main/java/io/github/vrchatapi/api/AuthenticationApi.java
index 8316bb9a..c0c17580 100644
--- a/src/main/java/io/github/vrchatapi/api/AuthenticationApi.java
+++ b/src/main/java/io/github/vrchatapi/api/AuthenticationApi.java
@@ -1,8 +1,8 @@
/*
* VRChat API Documentation
*
- * The version of the OpenAPI document: 1.6.9
- * Contact: me@ruby.js.org
+ * The version of the OpenAPI document: 1.20.8
+ * Contact: vrchatapi.lpv0t@aries.fyi
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -26,11 +26,26 @@
import java.io.IOException;
+import io.github.vrchatapi.model.AvatarModeration;
+import io.github.vrchatapi.model.AvatarModerationCreated;
+import io.github.vrchatapi.model.AvatarModerationType;
+import io.github.vrchatapi.model.CreateAvatarModerationRequest;
import io.github.vrchatapi.model.CurrentUser;
+import io.github.vrchatapi.model.Disable2FAResult;
import io.github.vrchatapi.model.Error;
+import io.github.vrchatapi.model.ModerationReport;
+import io.github.vrchatapi.model.OkStatus2;
+import io.github.vrchatapi.model.PaginatedModerationReportList;
+import io.github.vrchatapi.model.Pending2FAResult;
+import io.github.vrchatapi.model.RegisterUserAccountRequest;
+import io.github.vrchatapi.model.SubmitModerationReportRequest;
import io.github.vrchatapi.model.Success;
+import io.github.vrchatapi.model.SuccessFlag;
import io.github.vrchatapi.model.TwoFactorAuthCode;
+import io.github.vrchatapi.model.TwoFactorEmailCode;
+import io.github.vrchatapi.model.TwoFactorRecoveryCodes;
import io.github.vrchatapi.model.UserExists;
+import io.github.vrchatapi.model.Verify2FAEmailCodeResult;
import io.github.vrchatapi.model.Verify2FAResult;
import io.github.vrchatapi.model.VerifyAuthTokenResult;
@@ -42,6 +57,8 @@
public class AuthenticationApi {
private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
public AuthenticationApi() {
this(Configuration.getDefaultApiClient());
@@ -59,23 +76,174 @@ public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for cancelPending2FA
+ * @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 | - |
+ | 401 | Error response due to missing auth cookie. | - |
+
+ */
+ public okhttp3.Call cancelPending2FACall(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 = "/auth/twofactorauth/totp/pending";
+
+ 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[] { "authCookie" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call cancelPending2FAValidateBeforeCall(final ApiCallback _callback) throws ApiException {
+ return cancelPending2FACall(_callback);
+
+ }
+
+ /**
+ * Cancel pending enabling of time-based 2FA codes
+ * Cancels the sequence for enabling time-based 2FA.
+ * @return Disable2FAResult
+ * @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 | - |
+ | 401 | Error response due to missing auth cookie. | - |
+
+ */
+ public Disable2FAResult cancelPending2FA() throws ApiException {
+ ApiResponse localVarResp = cancelPending2FAWithHttpInfo();
+ return localVarResp.getData();
+ }
+
+ /**
+ * Cancel pending enabling of time-based 2FA codes
+ * Cancels the sequence for enabling time-based 2FA.
+ * @return ApiResponse<Disable2FAResult>
+ * @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 | - |
+ | 401 | Error response due to missing auth cookie. | - |
+
+ */
+ public ApiResponse cancelPending2FAWithHttpInfo() throws ApiException {
+ okhttp3.Call localVarCall = cancelPending2FAValidateBeforeCall(null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Cancel pending enabling of time-based 2FA codes (asynchronously)
+ * Cancels the sequence for enabling time-based 2FA.
+ * @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 | - |
+ | 401 | Error response due to missing auth cookie. | - |
+
+ */
+ public okhttp3.Call cancelPending2FAAsync(final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = cancelPending2FAValidateBeforeCall(_callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
/**
* Build call for checkUserExists
* @param email Filter by email. (optional)
* @param displayName Filter by displayName. (optional)
- * @param userId Filter by UserID. (optional)
+ * @param username Filter by Username. (optional)
* @param excludeUserId Exclude by UserID. (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 | Returns a response if a user exists or not. | - |
| 400 | Error response when missing at least 1 of the required parameters. | - |
*/
- public okhttp3.Call checkUserExistsCall(String email, String displayName, String userId, String excludeUserId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call checkUserExistsCall(@javax.annotation.Nullable String email, @javax.annotation.Nullable String displayName, @javax.annotation.Nullable String username, @javax.annotation.Nullable String excludeUserId, 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
@@ -95,8 +263,8 @@ public okhttp3.Call checkUserExistsCall(String email, String displayName, String
localVarQueryParams.addAll(localVarApiClient.parameterToPair("displayName", displayName));
}
- if (userId != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId));
+ if (username != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username));
}
if (excludeUserId != null) {
@@ -112,21 +280,19 @@ public okhttp3.Call checkUserExistsCall(String email, String displayName, String
}
final String[] localVarContentTypes = {
-
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
- String[] localVarAuthNames = new String[] { "apiKeyCookie" };
- return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call checkUserExistsValidateBeforeCall(String email, String displayName, String userId, String excludeUserId, final ApiCallback _callback) throws ApiException {
-
-
- okhttp3.Call localVarCall = checkUserExistsCall(email, displayName, userId, excludeUserId, _callback);
- return localVarCall;
+ private okhttp3.Call checkUserExistsValidateBeforeCall(@javax.annotation.Nullable String email, @javax.annotation.Nullable String displayName, @javax.annotation.Nullable String username, @javax.annotation.Nullable String excludeUserId, final ApiCallback _callback) throws ApiException {
+ return checkUserExistsCall(email, displayName, username, excludeUserId, _callback);
}
@@ -135,19 +301,20 @@ private okhttp3.Call checkUserExistsValidateBeforeCall(String email, String disp
* Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search.
* @param email Filter by email. (optional)
* @param displayName Filter by displayName. (optional)
- * @param userId Filter by UserID. (optional)
+ * @param username Filter by Username. (optional)
* @param excludeUserId Exclude by UserID. (optional)
* @return UserExists
* @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 | Returns a response if a user exists or not. | - |
| 400 | Error response when missing at least 1 of the required parameters. | - |
*/
- public UserExists checkUserExists(String email, String displayName, String userId, String excludeUserId) throws ApiException {
- ApiResponse localVarResp = checkUserExistsWithHttpInfo(email, displayName, userId, excludeUserId);
+ public UserExists checkUserExists(@javax.annotation.Nullable String email, @javax.annotation.Nullable String displayName, @javax.annotation.Nullable String username, @javax.annotation.Nullable String excludeUserId) throws ApiException {
+ ApiResponse localVarResp = checkUserExistsWithHttpInfo(email, displayName, username, excludeUserId);
return localVarResp.getData();
}
@@ -156,19 +323,20 @@ public UserExists checkUserExists(String email, String displayName, String userI
* Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search.
* @param email Filter by email. (optional)
* @param displayName Filter by displayName. (optional)
- * @param userId Filter by UserID. (optional)
+ * @param username Filter by Username. (optional)
* @param excludeUserId Exclude by UserID. (optional)
* @return ApiResponse<UserExists>
* @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 | Returns a response if a user exists or not. | - |
| 400 | Error response when missing at least 1 of the required parameters. | - |
*/
- public ApiResponse checkUserExistsWithHttpInfo(String email, String displayName, String userId, String excludeUserId) throws ApiException {
- okhttp3.Call localVarCall = checkUserExistsValidateBeforeCall(email, displayName, userId, excludeUserId, null);
+ public ApiResponse checkUserExistsWithHttpInfo(@javax.annotation.Nullable String email, @javax.annotation.Nullable String displayName, @javax.annotation.Nullable String username, @javax.annotation.Nullable String excludeUserId) throws ApiException {
+ okhttp3.Call localVarCall = checkUserExistsValidateBeforeCall(email, displayName, username, excludeUserId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
@@ -178,44 +346,58 @@ public ApiResponse checkUserExistsWithHttpInfo(String email, String
* Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search.
* @param email Filter by email. (optional)
* @param displayName Filter by displayName. (optional)
- * @param userId Filter by UserID. (optional)
+ * @param username Filter by Username. (optional)
* @param excludeUserId Exclude by UserID. (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 | Returns a response if a user exists or not. | - |
| 400 | Error response when missing at least 1 of the required parameters. | - |
*/
- public okhttp3.Call checkUserExistsAsync(String email, String displayName, String userId, String excludeUserId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call checkUserExistsAsync(@javax.annotation.Nullable String email, @javax.annotation.Nullable String displayName, @javax.annotation.Nullable String username, @javax.annotation.Nullable String excludeUserId, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = checkUserExistsValidateBeforeCall(email, displayName, userId, excludeUserId, _callback);
+ okhttp3.Call localVarCall = checkUserExistsValidateBeforeCall(email, displayName, username, excludeUserId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
- * Build call for deleteUser
- * @param userId (required)
+ * Build call for confirmEmail
+ * @param id Target user for which to verify email. (required)
+ * @param verifyEmail Token to verify email. (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 | - |
- | 401 | Error response due to missing apiKey or auth cookie. | - |
+ | 302 | OK | - |
*/
- public okhttp3.Call deleteUserCall(String userId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call confirmEmailCall(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull String verifyEmail, 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 = "/user/{userId}/delete"
- .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString()));
+ String localVarPath = "/auth/confirmEmail";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -223,8 +405,15 @@ public okhttp3.Call deleteUserCall(String userId, final ApiCallback _callback) t
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (id != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id));
+ }
+
+ if (verifyEmail != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("verify_email", verifyEmail));
+ }
+
final String[] localVarAccepts = {
- "application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
@@ -232,104 +421,121 @@ public okhttp3.Call deleteUserCall(String userId, final ApiCallback _callback) t
}
final String[] localVarContentTypes = {
-
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
- String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" };
- return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call deleteUserValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException {
-
- // verify the required parameter 'userId' is set
- if (userId == null) {
- throw new ApiException("Missing the required parameter 'userId' when calling deleteUser(Async)");
+ private okhttp3.Call confirmEmailValidateBeforeCall(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull String verifyEmail, 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 confirmEmail(Async)");
}
-
- okhttp3.Call localVarCall = deleteUserCall(userId, _callback);
- return localVarCall;
+ // verify the required parameter 'verifyEmail' is set
+ if (verifyEmail == null) {
+ throw new ApiException("Missing the required parameter 'verifyEmail' when calling confirmEmail(Async)");
+ }
+
+ return confirmEmailCall(id, verifyEmail, _callback);
}
/**
- * Delete User
- * Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT.
- * @param userId (required)
- * @return CurrentUser
+ * Confirm Email
+ * Confirms the email address for a user
+ * @param id Target user for which to verify email. (required)
+ * @param verifyEmail Token to verify email. (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 | - |
- | 401 | Error response due to missing apiKey or auth cookie. | - |
+ | 302 | OK | - |
*/
- public CurrentUser deleteUser(String userId) throws ApiException {
- ApiResponse localVarResp = deleteUserWithHttpInfo(userId);
- return localVarResp.getData();
+ public void confirmEmail(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull String verifyEmail) throws ApiException {
+ confirmEmailWithHttpInfo(id, verifyEmail);
}
/**
- * Delete User
- * Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT.
- * @param userId (required)
- * @return ApiResponse<CurrentUser>
+ * Confirm Email
+ * Confirms the email address for a user
+ * @param id Target user for which to verify email. (required)
+ * @param verifyEmail Token to verify email. (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 | - |
- | 401 | Error response due to missing apiKey or auth cookie. | - |
+ | 302 | OK | - |
*/
- public ApiResponse deleteUserWithHttpInfo(String userId) throws ApiException {
- okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userId, null);
- Type localVarReturnType = new TypeToken(){}.getType();
- return localVarApiClient.execute(localVarCall, localVarReturnType);
+ public ApiResponse confirmEmailWithHttpInfo(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull String verifyEmail) throws ApiException {
+ okhttp3.Call localVarCall = confirmEmailValidateBeforeCall(id, verifyEmail, null);
+ return localVarApiClient.execute(localVarCall);
}
/**
- * Delete User (asynchronously)
- * Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT.
- * @param userId (required)
+ * Confirm Email (asynchronously)
+ * Confirms the email address for a user
+ * @param id Target user for which to verify email. (required)
+ * @param verifyEmail Token to verify email. (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 | - |
- | 401 | Error response due to missing apiKey or auth cookie. | - |
+ | 302 | OK | - |
*/
- public okhttp3.Call deleteUserAsync(String userId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call confirmEmailAsync(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull String verifyEmail, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userId, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
- localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ okhttp3.Call localVarCall = confirmEmailValidateBeforeCall(id, verifyEmail, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
- * Build call for getCurrentUser
+ * Build call for createGlobalAvatarModeration
+ * @param createAvatarModerationRequest (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 | * Set-Cookie - Successful authentication returns an `auth` cookie. * \0Set-Cookie - This endpoint **always** sets the `apiKey` irrespective if it is already set. |
- | 401 | Error response due to missing apiKey or auth cookie. | - |
+ | 200 | Returns a single AvatarModerationCreated object | - |
+ | 401 | Error response due to missing auth cookie. | - |
*/
- public okhttp3.Call getCurrentUserCall(final ApiCallback _callback) throws ApiException {
- Object localVarPostBody = null;
+ public okhttp3.Call createGlobalAvatarModerationCall(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest, 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 = createAvatarModerationRequest;
// create path and map variables
- String localVarPath = "/auth/user";
+ String localVarPath = "/auth/user/avatarmoderations";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -346,96 +552,122 @@ public okhttp3.Call getCurrentUserCall(final ApiCallback _callback) throws ApiEx
}
final String[] localVarContentTypes = {
-
+ "application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
- String[] localVarAuthNames = new String[] { "authCookie", "authHeader", "twoFactorAuthCookie" };
- return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ String[] localVarAuthNames = new String[] { "authCookie" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getCurrentUserValidateBeforeCall(final ApiCallback _callback) throws ApiException {
-
+ private okhttp3.Call createGlobalAvatarModerationValidateBeforeCall(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'createAvatarModerationRequest' is set
+ if (createAvatarModerationRequest == null) {
+ throw new ApiException("Missing the required parameter 'createAvatarModerationRequest' when calling createGlobalAvatarModeration(Async)");
+ }
- okhttp3.Call localVarCall = getCurrentUserCall(_callback);
- return localVarCall;
+ return createGlobalAvatarModerationCall(createAvatarModerationRequest, _callback);
}
/**
- * Login and/or Get Current User Info
- * This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed.
- * @return CurrentUser
+ * Create Global Avatar Moderation
+ * Globally moderates an avatar.
+ * @param createAvatarModerationRequest (required)
+ * @return AvatarModerationCreated
* @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 | * Set-Cookie - Successful authentication returns an `auth` cookie. * \0Set-Cookie - This endpoint **always** sets the `apiKey` irrespective if it is already set. |
- | 401 | Error response due to missing apiKey or auth cookie. | - |
+ | 200 | Returns a single AvatarModerationCreated object | - |
+ | 401 | Error response due to missing auth cookie. | - |
*/
- public CurrentUser getCurrentUser() throws ApiException {
- ApiResponse localVarResp = getCurrentUserWithHttpInfo();
+ public AvatarModerationCreated createGlobalAvatarModeration(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest) throws ApiException {
+ ApiResponse localVarResp = createGlobalAvatarModerationWithHttpInfo(createAvatarModerationRequest);
return localVarResp.getData();
}
/**
- * Login and/or Get Current User Info
- * This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed.
- * @return ApiResponse<CurrentUser>
+ * Create Global Avatar Moderation
+ * Globally moderates an avatar.
+ * @param createAvatarModerationRequest (required)
+ * @return ApiResponse<AvatarModerationCreated>
* @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 | * Set-Cookie - Successful authentication returns an `auth` cookie. * \0Set-Cookie - This endpoint **always** sets the `apiKey` irrespective if it is already set. |
- | 401 | Error response due to missing apiKey or auth cookie. | - |
+ | 200 | Returns a single AvatarModerationCreated object | - |
+ | 401 | Error response due to missing auth cookie. | - |
*/
- public ApiResponse getCurrentUserWithHttpInfo() throws ApiException {
- okhttp3.Call localVarCall = getCurrentUserValidateBeforeCall(null);
- Type localVarReturnType = new TypeToken(){}.getType();
+ public ApiResponse createGlobalAvatarModerationWithHttpInfo(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest) throws ApiException {
+ okhttp3.Call localVarCall = createGlobalAvatarModerationValidateBeforeCall(createAvatarModerationRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * Login and/or Get Current User Info (asynchronously)
- * This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed.
+ * Create Global Avatar Moderation (asynchronously)
+ * Globally moderates an avatar.
+ * @param createAvatarModerationRequest (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 | * Set-Cookie - Successful authentication returns an `auth` cookie. * \0Set-Cookie - This endpoint **always** sets the `apiKey` irrespective if it is already set. |
- | 401 | Error response due to missing apiKey or auth cookie. | - |
+ | 200 | Returns a single AvatarModerationCreated object | - |
+ | 401 | Error response due to missing auth cookie. | - |
*/
- public okhttp3.Call getCurrentUserAsync(final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call createGlobalAvatarModerationAsync(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = getCurrentUserValidateBeforeCall(_callback);
- Type localVarReturnType = new TypeToken(){}.getType();
+ okhttp3.Call localVarCall = createGlobalAvatarModerationValidateBeforeCall(createAvatarModerationRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
- * Build call for logout
+ * Build call for deleteGlobalAvatarModeration
+ * @param targetAvatarId Must be a valid avatar ID. (required)
+ * @param avatarModerationType The avatar moderation type associated with the avatar. (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 | * Set-Cookie - Clears the `auth` cookie. * \0Set-Cookie - Clears the `age` cookie. * \0\0Set-Cookie - Clears the `tos` cookie. |
- | 401 | Error response due to missing apiKey or auth cookie. | - |
+ | 200 | Returns a single OkStatus2 object | - |
+ | 401 | Error response due to missing auth cookie. | - |
*/
- public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call deleteGlobalAvatarModerationCall(@javax.annotation.Nonnull String targetAvatarId, @javax.annotation.Nonnull AvatarModerationType avatarModerationType, 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 = "/logout";
+ String localVarPath = "/auth/user/avatarmoderations";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -443,6 +675,14 @@ public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (targetAvatarId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("targetAvatarId", targetAvatarId));
+ }
+
+ if (avatarModerationType != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("avatarModerationType", avatarModerationType));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -452,97 +692,130 @@ public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException
}
final String[] localVarContentTypes = {
-
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
String[] localVarAuthNames = new String[] { "authCookie" };
- return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call logoutValidateBeforeCall(final ApiCallback _callback) throws ApiException {
-
+ private okhttp3.Call deleteGlobalAvatarModerationValidateBeforeCall(@javax.annotation.Nonnull String targetAvatarId, @javax.annotation.Nonnull AvatarModerationType avatarModerationType, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'targetAvatarId' is set
+ if (targetAvatarId == null) {
+ throw new ApiException("Missing the required parameter 'targetAvatarId' when calling deleteGlobalAvatarModeration(Async)");
+ }
- okhttp3.Call localVarCall = logoutCall(_callback);
- return localVarCall;
+ // verify the required parameter 'avatarModerationType' is set
+ if (avatarModerationType == null) {
+ throw new ApiException("Missing the required parameter 'avatarModerationType' when calling deleteGlobalAvatarModeration(Async)");
+ }
+
+ return deleteGlobalAvatarModerationCall(targetAvatarId, avatarModerationType, _callback);
}
/**
- * Logout
- * Invalidates the login session.
- * @return Success
+ * Delete Global Avatar Moderation
+ * Globally unmoderates an avatar.
+ * @param targetAvatarId Must be a valid avatar ID. (required)
+ * @param avatarModerationType The avatar moderation type associated with the avatar. (required)
+ * @return OkStatus2
* @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 | * Set-Cookie - Clears the `auth` cookie. * \0Set-Cookie - Clears the `age` cookie. * \0\0Set-Cookie - Clears the `tos` cookie. |
- | 401 | Error response due to missing apiKey or auth cookie. | - |
+ | 200 | Returns a single OkStatus2 object | - |
+ | 401 | Error response due to missing auth cookie. | - |
*/
- public Success logout() throws ApiException {
- ApiResponse localVarResp = logoutWithHttpInfo();
+ public OkStatus2 deleteGlobalAvatarModeration(@javax.annotation.Nonnull String targetAvatarId, @javax.annotation.Nonnull AvatarModerationType avatarModerationType) throws ApiException {
+ ApiResponse localVarResp = deleteGlobalAvatarModerationWithHttpInfo(targetAvatarId, avatarModerationType);
return localVarResp.getData();
}
/**
- * Logout
- * Invalidates the login session.
- * @return ApiResponse<Success>
+ * Delete Global Avatar Moderation
+ * Globally unmoderates an avatar.
+ * @param targetAvatarId Must be a valid avatar ID. (required)
+ * @param avatarModerationType The avatar moderation type associated with the avatar. (required)
+ * @return ApiResponse<OkStatus2>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-