diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ff50389f..82bfb9b0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -44,7 +44,7 @@ jobs: run: npm install @openapitools/openapi-generator-cli - name: Set OpenAPI Generator version - run: ./node_modules/\@openapitools/openapi-generator-cli/main.js version-manager set 6.2.1 + run: ./node_modules/\@openapitools/openapi-generator-cli/main.js version-manager set 7.24.0 - name: Download Specification run: wget "${SPEC_URL}" '--output-document' "${ARTIFACT_NAME}" diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index f8a0e1ab..cc6d325a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -17,11 +17,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8' ] + java: [ 17, 21 ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} distribution: 'temurin' diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0badc2b2..d3635559 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -172,8 +172,8 @@ docs/InstancesApi.md docs/Inventory.md docs/InventoryApi.md docs/InventoryConsumptionResults.md -docs/InventoryDefaultAttributes1.md -docs/InventoryDefaultAttributes1Validator.md +docs/InventoryDefaultAttributesValue.md +docs/InventoryDefaultAttributesValueValidator.md docs/InventoryDrop.md docs/InventoryEquipSlot.md docs/InventoryFlag.md @@ -214,6 +214,7 @@ docs/ModerationReport.md docs/MutualFriend.md docs/Mutuals.md docs/Notification.md +docs/NotificationDetailBoop.md docs/NotificationDetailInvite.md docs/NotificationDetailInviteResponse.md docs/NotificationDetailRequestInvite.md @@ -221,6 +222,13 @@ docs/NotificationDetailRequestInviteResponse.md docs/NotificationDetailVoteToKick.md docs/NotificationType.md docs/NotificationV2.md +docs/NotificationV2Data.md +docs/NotificationV2DataBadgeEarned.md +docs/NotificationV2DataBoop.md +docs/NotificationV2DataEventAnnouncement.md +docs/NotificationV2DataGroupAnnouncement.md +docs/NotificationV2DataGroupInformative.md +docs/NotificationV2DataGroupTransfer.md docs/NotificationV2DetailsBoop.md docs/NotificationV2Response.md docs/NotificationV2Type.md @@ -245,6 +253,8 @@ docs/PlayermoderationApi.md docs/Print.md docs/PrintFiles.md docs/PrintsApi.md +docs/PrivateProfile.md +docs/PrivateProfileActivity.md docs/Product.md docs/ProductListing.md docs/ProductListingType.md @@ -256,13 +266,16 @@ docs/ProductPurchaseProduct.md docs/ProductPurchasePurchaseContext.md docs/ProductPurchaseRecord.md docs/ProductType.md +docs/ProfileRepresentedGroup.md docs/Prop.md docs/PropPublishStatus.md docs/PropUnityPackage.md docs/PropsApi.md +docs/PublicProfile.md docs/PurchaseContextData.md docs/PurchaseProductListingRequest.md docs/Region.md +docs/RegisterUserAccount200Response.md docs/RegisterUserAccountRequest.md docs/ReleaseStatus.md docs/ReportCategory.md @@ -270,6 +283,7 @@ docs/ReportReason.md docs/RepresentedGroup.md docs/RequestInviteRequest.md docs/RequestInviteWithPhotoRequest.md +docs/RequiresTwoFactorAuth.md docs/RespondGroupJoinRequest.md docs/RespondInviteWithPhotoRequest.md docs/RespondNotificationV2Request.md @@ -282,6 +296,7 @@ docs/RewardRedemptionResult.md docs/SearchGroupMembers200Response.md docs/SellerEligibility.md docs/SentNotification.md +docs/SentNotificationDetails.md docs/ServiceQueueStats.md docs/ServiceStatus.md docs/ShareInventoryItemDirectRequest.md @@ -310,6 +325,7 @@ docs/TransactionSteamWalletInfo.md docs/TransferGroupRequest.md docs/TutorialStatus.md docs/TwoFactorAuthCode.md +docs/TwoFactorAuthType.md docs/TwoFactorEmailCode.md docs/TwoFactorRecoveryCodes.md docs/TwoFactorRecoveryCodesOtpInner.md @@ -559,8 +575,8 @@ src/main/java/io/github/vrchatapi/model/InstanceShortNameResponse.java src/main/java/io/github/vrchatapi/model/InstanceType.java src/main/java/io/github/vrchatapi/model/Inventory.java src/main/java/io/github/vrchatapi/model/InventoryConsumptionResults.java -src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributes1.java -src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributes1Validator.java +src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributesValue.java +src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributesValueValidator.java src/main/java/io/github/vrchatapi/model/InventoryDrop.java src/main/java/io/github/vrchatapi/model/InventoryEquipSlot.java src/main/java/io/github/vrchatapi/model/InventoryFlag.java @@ -598,6 +614,7 @@ src/main/java/io/github/vrchatapi/model/ModerationReport.java src/main/java/io/github/vrchatapi/model/MutualFriend.java src/main/java/io/github/vrchatapi/model/Mutuals.java src/main/java/io/github/vrchatapi/model/Notification.java +src/main/java/io/github/vrchatapi/model/NotificationDetailBoop.java src/main/java/io/github/vrchatapi/model/NotificationDetailInvite.java src/main/java/io/github/vrchatapi/model/NotificationDetailInviteResponse.java src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInvite.java @@ -605,6 +622,13 @@ src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInviteResponse. src/main/java/io/github/vrchatapi/model/NotificationDetailVoteToKick.java src/main/java/io/github/vrchatapi/model/NotificationType.java src/main/java/io/github/vrchatapi/model/NotificationV2.java +src/main/java/io/github/vrchatapi/model/NotificationV2Data.java +src/main/java/io/github/vrchatapi/model/NotificationV2DataBadgeEarned.java +src/main/java/io/github/vrchatapi/model/NotificationV2DataBoop.java +src/main/java/io/github/vrchatapi/model/NotificationV2DataEventAnnouncement.java +src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupAnnouncement.java +src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupInformative.java +src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupTransfer.java src/main/java/io/github/vrchatapi/model/NotificationV2DetailsBoop.java src/main/java/io/github/vrchatapi/model/NotificationV2Response.java src/main/java/io/github/vrchatapi/model/NotificationV2Type.java @@ -626,6 +650,8 @@ src/main/java/io/github/vrchatapi/model/PlayerModeration.java src/main/java/io/github/vrchatapi/model/PlayerModerationType.java src/main/java/io/github/vrchatapi/model/Print.java src/main/java/io/github/vrchatapi/model/PrintFiles.java +src/main/java/io/github/vrchatapi/model/PrivateProfile.java +src/main/java/io/github/vrchatapi/model/PrivateProfileActivity.java src/main/java/io/github/vrchatapi/model/Product.java src/main/java/io/github/vrchatapi/model/ProductListing.java src/main/java/io/github/vrchatapi/model/ProductListingType.java @@ -637,12 +663,15 @@ src/main/java/io/github/vrchatapi/model/ProductPurchaseProduct.java src/main/java/io/github/vrchatapi/model/ProductPurchasePurchaseContext.java src/main/java/io/github/vrchatapi/model/ProductPurchaseRecord.java src/main/java/io/github/vrchatapi/model/ProductType.java +src/main/java/io/github/vrchatapi/model/ProfileRepresentedGroup.java src/main/java/io/github/vrchatapi/model/Prop.java src/main/java/io/github/vrchatapi/model/PropPublishStatus.java src/main/java/io/github/vrchatapi/model/PropUnityPackage.java +src/main/java/io/github/vrchatapi/model/PublicProfile.java src/main/java/io/github/vrchatapi/model/PurchaseContextData.java src/main/java/io/github/vrchatapi/model/PurchaseProductListingRequest.java src/main/java/io/github/vrchatapi/model/Region.java +src/main/java/io/github/vrchatapi/model/RegisterUserAccount200Response.java src/main/java/io/github/vrchatapi/model/RegisterUserAccountRequest.java src/main/java/io/github/vrchatapi/model/ReleaseStatus.java src/main/java/io/github/vrchatapi/model/ReportCategory.java @@ -650,6 +679,7 @@ src/main/java/io/github/vrchatapi/model/ReportReason.java src/main/java/io/github/vrchatapi/model/RepresentedGroup.java src/main/java/io/github/vrchatapi/model/RequestInviteRequest.java src/main/java/io/github/vrchatapi/model/RequestInviteWithPhotoRequest.java +src/main/java/io/github/vrchatapi/model/RequiresTwoFactorAuth.java src/main/java/io/github/vrchatapi/model/RespondGroupJoinRequest.java src/main/java/io/github/vrchatapi/model/RespondInviteWithPhotoRequest.java src/main/java/io/github/vrchatapi/model/RespondNotificationV2Request.java @@ -662,6 +692,7 @@ src/main/java/io/github/vrchatapi/model/RewardRedemptionResult.java src/main/java/io/github/vrchatapi/model/SearchGroupMembers200Response.java src/main/java/io/github/vrchatapi/model/SellerEligibility.java src/main/java/io/github/vrchatapi/model/SentNotification.java +src/main/java/io/github/vrchatapi/model/SentNotificationDetails.java src/main/java/io/github/vrchatapi/model/ServiceQueueStats.java src/main/java/io/github/vrchatapi/model/ServiceStatus.java src/main/java/io/github/vrchatapi/model/ShareInventoryItemDirectRequest.java @@ -690,6 +721,7 @@ src/main/java/io/github/vrchatapi/model/TransactionSteamWalletInfo.java src/main/java/io/github/vrchatapi/model/TransferGroupRequest.java src/main/java/io/github/vrchatapi/model/TutorialStatus.java src/main/java/io/github/vrchatapi/model/TwoFactorAuthCode.java +src/main/java/io/github/vrchatapi/model/TwoFactorAuthType.java src/main/java/io/github/vrchatapi/model/TwoFactorEmailCode.java src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodes.java src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodesOtpInner.java diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 0df17dd0..07832195 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1 \ No newline at end of file +7.24.0 diff --git a/build.gradle b/build.gradle index 658199b7..4038dcb9 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'io.github.vrchatapi' -version = '1.20.7' +version = '1.20.8-nightly.20' buildscript { repositories { @@ -62,9 +62,9 @@ if(hasProperty('target') && target == 'android') { def task = project.tasks.create "jar${variant.name.capitalize()}", Jar task.description = "Create jar artifact for ${variant.name}" task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" artifacts.add('archives', task) } } @@ -106,20 +106,18 @@ ext { } dependencies { - implementation 'io.swagger:swagger-annotations:1.6.8' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.10.0' - implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' + implementation 'com.squareup.okhttp3:okhttp:4.12.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' implementation 'com.google.code.gson:gson:2.9.1' - implementation 'io.gsonfire:gson-fire:1.8.5' - implementation 'javax.ws.rs:jsr311-api:1.1.1' - implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' - implementation 'org.openapitools:jackson-databind-nullable:0.2.4' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation 'io.gsonfire:gson-fire:1.9.0' + implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' + implementation 'org.openapitools:jackson-databind-nullable:0.2.10' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.18.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.3' } javadoc { diff --git a/build.sbt b/build.sbt index 98e48c05..25e942ee 100644 --- a/build.sbt +++ b/build.sbt @@ -2,26 +2,25 @@ lazy val root = (project in file(".")). settings( organization := "io.github.vrchatapi", name := "vrchatapi", - version := "1.20.7", - scalaVersion := "2.11.4", + version := "1.20.8-nightly.20", + scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), - javacOptions in compile ++= Seq("-Xlint:deprecation"), - publishArtifact in (Compile, packageDoc) := false, + compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.6.5", - "com.squareup.okhttp3" % "okhttp" % "4.10.0", - "com.squareup.okhttp3" % "logging-interceptor" % "4.10.0", + "com.squareup.okhttp3" % "okhttp" % "4.12.0", + "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", - "javax.ws.rs" % "jsr311-api" % "1.1.1", - "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", - "org.openapitools" % "jackson-databind-nullable" % "0.2.4", - "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", + "org.apache.commons" % "commons-lang3" % "3.18.0", + "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", + "org.openapitools" % "jackson-databind-nullable" % "0.2.10", + "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test", + "org.junit.jupiter" % "junit-jupiter-api" % "5.10.3" % "test", "com.novocode" % "junit-interface" % "0.10" % "test", "org.mockito" % "mockito-core" % "3.12.4" % "test" ) diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md index 942d3509..aff68137 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationApi.md @@ -29,7 +29,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**verifyRecoveryCode**](AuthenticationApi.md#verifyRecoveryCode) | **POST** /auth/twofactorauth/otp/verify | Verify 2FA code with Recovery code | - + # **cancelPending2FA** > Disable2FAResult cancelPending2FA() @@ -95,7 +95,7 @@ This endpoint does not need any parameter. | **200** | OK | - | | **401** | Error response due to missing auth cookie. | - | - + # **checkUserExists** > UserExists checkUserExists(email, displayName, username, excludeUserId) @@ -164,7 +164,7 @@ No authorization required | **200** | Returns a response if a user exists or not. | - | | **400** | Error response when missing at least 1 of the required parameters. | - | - + # **confirmEmail** > confirmEmail(id, verifyEmail) @@ -227,7 +227,7 @@ No authorization required |-------------|-------------|------------------| | **302** | OK | - | - + # **createGlobalAvatarModeration** > AvatarModerationCreated createGlobalAvatarModeration(createAvatarModerationRequest) @@ -297,7 +297,7 @@ public class Example { | **200** | Returns a single AvatarModerationCreated object | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteGlobalAvatarModeration** > OkStatus2 deleteGlobalAvatarModeration(targetAvatarId, avatarModerationType) @@ -369,7 +369,7 @@ public class Example { | **200** | Returns a single OkStatus2 object | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteModerationReport** > SuccessFlag deleteModerationReport(moderationReportId) @@ -440,7 +440,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response due to missing Administrator credentials. | - | - + # **deleteUser** > CurrentUser deleteUser(userId) @@ -510,7 +510,7 @@ public class Example { | **200** | OK | - | | **401** | Error response due to missing auth cookie. | - | - + # **disable2FA** > Disable2FAResult disable2FA() @@ -576,7 +576,7 @@ This endpoint does not need any parameter. | **200** | OK | - | | **401** | Error response due to missing auth cookie. | - | - + # **enable2FA** > Pending2FAResult enable2FA() @@ -642,9 +642,9 @@ This endpoint does not need any parameter. | **200** | OK | - | | **401** | Error response due to missing auth cookie. | - | - + # **getCurrentUser** -> CurrentUser getCurrentUser() +> RegisterUserAccount200Response getCurrentUser() Login and/or Get Current User Info @@ -665,12 +665,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: authCookie - ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); - authCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //authCookie.setApiKeyPrefix("Token"); - // Configure HTTP basic authorization: authHeader HttpBasicAuth authHeader = (HttpBasicAuth) defaultClient.getAuthentication("authHeader"); authHeader.setUsername("YOUR USERNAME"); @@ -682,9 +676,15 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //twoFactorAuthCookie.setApiKeyPrefix("Token"); + // Configure API key authorization: authCookie + ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); + authCookie.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //authCookie.setApiKeyPrefix("Token"); + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); try { - CurrentUser result = apiInstance.getCurrentUser(); + RegisterUserAccount200Response result = apiInstance.getCurrentUser(); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AuthenticationApi#getCurrentUser"); @@ -702,11 +702,11 @@ This endpoint does not need any parameter. ### Return type -[**CurrentUser**](CurrentUser.md) +[**RegisterUserAccount200Response**](RegisterUserAccount200Response.md) ### Authorization -[authCookie](../README.md#authCookie), [authHeader](../README.md#authHeader), [twoFactorAuthCookie](../README.md#twoFactorAuthCookie) +[authHeader](../README.md#authHeader), [twoFactorAuthCookie](../README.md#twoFactorAuthCookie), [authCookie](../README.md#authCookie) ### HTTP request headers @@ -719,7 +719,7 @@ This endpoint does not need any parameter. | **200** | OK | * Set-Cookie - Successful authentication returns an `auth` cookie.
| | **401** | Error response due to missing auth cookie. | - | - + # **getGlobalAvatarModerations** > List<AvatarModeration> getGlobalAvatarModerations() @@ -785,7 +785,7 @@ This endpoint does not need any parameter. | **200** | Returns list of globally blocked avatars with timestamps | - | | **401** | Error response due to missing auth cookie. | - | - + # **getModerationReports** > PaginatedModerationReportList getModerationReports(offset, n, reportingUserId, status, type) @@ -864,7 +864,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response due to missing Administrator credentials. | - | - + # **getRecoveryCodes** > TwoFactorRecoveryCodes getRecoveryCodes() @@ -930,7 +930,7 @@ This endpoint does not need any parameter. | **200** | Returns the two factor recovery codes | - | | **401** | Error response due to missing auth cookie. | - | - + # **logout** > Success logout() @@ -996,9 +996,9 @@ This endpoint does not need any parameter. | **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 auth cookie. | - | - + # **registerUserAccount** -> CurrentUser registerUserAccount(registerUserAccountRequest) +> RegisterUserAccount200Response registerUserAccount(registerUserAccountRequest) Register User Account @@ -1021,7 +1021,7 @@ public class Example { AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); RegisterUserAccountRequest registerUserAccountRequest = new RegisterUserAccountRequest(); // RegisterUserAccountRequest | try { - CurrentUser result = apiInstance.registerUserAccount(registerUserAccountRequest); + RegisterUserAccount200Response result = apiInstance.registerUserAccount(registerUserAccountRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AuthenticationApi#registerUserAccount"); @@ -1042,7 +1042,7 @@ public class Example { ### Return type -[**CurrentUser**](CurrentUser.md) +[**RegisterUserAccount200Response**](RegisterUserAccount200Response.md) ### Authorization @@ -1059,7 +1059,7 @@ No authorization required | **200** | OK | * Set-Cookie - Successful authentication returns an `auth` cookie.
| | **401** | Error response due to missing auth cookie. | - | - + # **resendEmailConfirmation** > Success resendEmailConfirmation() @@ -1125,7 +1125,7 @@ This endpoint does not need any parameter. | **200** | OK | - | | **401** | Error response due to missing auth cookie. | - | - + # **submitModerationReport** > ModerationReport submitModerationReport(submitModerationReportRequest) @@ -1195,7 +1195,7 @@ public class Example { | **200** | Returns a single ModerationReport object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **verify2FA** > Verify2FAResult verify2FA(twoFactorAuthCode) @@ -1265,7 +1265,7 @@ public class Example { | **200** | OK | * Set-Cookie - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
| | **401** | Error response due to missing auth cookie. | - | - + # **verify2FAEmailCode** > Verify2FAEmailCodeResult verify2FAEmailCode(twoFactorEmailCode) @@ -1335,7 +1335,7 @@ public class Example { | **200** | OK | * Set-Cookie - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
| | **401** | Error response due to missing auth cookie. | - | - + # **verifyAuthToken** > VerifyAuthTokenResult verifyAuthToken() @@ -1401,7 +1401,7 @@ This endpoint does not need any parameter. | **200** | Returns wether a provided auth token is valid or not. | - | | **401** | Error response due to missing auth cookie. | - | - + # **verifyLoginPlace** > verifyLoginPlace(token, userId) @@ -1464,7 +1464,7 @@ No authorization required |-------------|-------------|------------------| | **302** | OK | - | - + # **verifyPending2FA** > Verify2FAResult verifyPending2FA(twoFactorAuthCode) @@ -1534,7 +1534,7 @@ public class Example { | **200** | OK | * Set-Cookie - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
| | **401** | Error response due to missing auth cookie. | - | - + # **verifyRecoveryCode** > Verify2FAResult verifyRecoveryCode(twoFactorAuthCode) diff --git a/docs/AvatarsApi.md b/docs/AvatarsApi.md index f885b98c..639c4562 100644 --- a/docs/AvatarsApi.md +++ b/docs/AvatarsApi.md @@ -20,7 +20,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**updateAvatar**](AvatarsApi.md#updateAvatar) | **PUT** /avatars/{avatarId} | Update Avatar | - + # **createAvatar** > Avatar createAvatar(createAvatarRequest) @@ -91,7 +91,7 @@ public class Example { | **400** | Error response due to missing permissions. | - | | **401** | Error response when set featured to true without being an admin. | - | - + # **deleteAvatar** > Avatar deleteAvatar(avatarId) @@ -162,7 +162,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to show information about a non-existent avatar. | - | - + # **deleteImpostor** > deleteImpostor(avatarId) @@ -232,7 +232,7 @@ null (empty response body) | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to show information about a non-existent avatar. | - | - + # **enqueueImpostor** > ServiceStatus enqueueImpostor(avatarId) @@ -303,7 +303,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to show information about a non-existent avatar. | - | - + # **getAvatar** > Avatar getAvatar(avatarId) @@ -374,7 +374,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to show information about a non-existent avatar. | - | - + # **getAvatarStyles** > List<AvatarStyle> getAvatarStyles() @@ -432,7 +432,7 @@ No authorization required |-------------|-------------|------------------| | **200** | Returns a list of AvatarStyle objects. | - | - + # **getFavoritedAvatars** > List<Avatar> getFavoritedAvatars(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId) @@ -525,9 +525,9 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a list of Avatar objects. | - | | **401** | Error response due to missing auth cookie. | - | -| **403** | Error response when trying to see favourited avatars of another user without sufficient admin permissions. | - | +| **403** | Error response when trying to see favorited avatars of another user without sufficient admin permissions. | - | - + # **getImpostorQueueStats** > ServiceQueueStats getImpostorQueueStats() @@ -593,7 +593,7 @@ This endpoint does not need any parameter. | **200** | Returns a Service Queue Stats. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getLicensedAvatars** > List<Avatar> getLicensedAvatars(n, offset) @@ -665,7 +665,7 @@ public class Example { | **200** | Returns a list of Avatar objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getOwnAvatar** > Avatar getOwnAvatar(userId) @@ -736,7 +736,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response when trying to see another users current avatar without sufficient admin permissions. | - | - + # **searchAvatars** > List<Avatar> searchAvatars(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, isInternalVariant) @@ -832,7 +832,7 @@ public class Example { | **200** | Returns a list of Avatar objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **selectAvatar** > CurrentUser selectAvatar(avatarId) @@ -903,7 +903,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to show information about a non-existent avatar. | - | - + # **selectFallbackAvatar** > CurrentUser selectFallbackAvatar(avatarId) @@ -975,7 +975,7 @@ public class Example { | **403** | Error response when trying to select a fallback avatar that is missing the fallback tag. | - | | **404** | Error response when trying to show information about a non-existent avatar. | - | - + # **updateAvatar** > Avatar updateAvatar(avatarId, updateAvatarRequest) diff --git a/docs/Badge.md b/docs/Badge.md index 5ec0c0d3..d3d8faca 100644 --- a/docs/Badge.md +++ b/docs/Badge.md @@ -13,6 +13,7 @@ |**badgeImageUrl** | **String** | direct url to image | | |**badgeName** | **String** | | | |**hidden** | **Boolean** | only present in CurrentUser badges | [optional] | +|**isQuantifiable** | **Boolean** | | [optional] | |**showcased** | **Boolean** | | | |**updatedAt** | **OffsetDateTime** | only present in CurrentUser badges | [optional] | diff --git a/docs/CalendarApi.md b/docs/CalendarApi.md index e77d9963..69af25b9 100644 --- a/docs/CalendarApi.md +++ b/docs/CalendarApi.md @@ -19,7 +19,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**updateGroupCalendarEvent**](CalendarApi.md#updateGroupCalendarEvent) | **PUT** /calendar/{groupId}/{calendarId}/event | Update a calendar event | - + # **createGroupCalendarEvent** > CalendarEvent createGroupCalendarEvent(groupId, createCalendarEventRequest) @@ -93,7 +93,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response due to an invalid or illegal calendar request. | - | - + # **deleteGroupCalendarEvent** > Success deleteGroupCalendarEvent(groupId, calendarId) @@ -166,7 +166,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. | - | - + # **discoverCalendarEvents** > CalendarEventDiscovery discoverCalendarEvents(scope, categories, tags, featuredResults, nonFeaturedResults, personalizedResults, minimumInterestCount, minimumRemainingMinutes, upcomingOffsetMinutes, n, nextCursor) @@ -256,7 +256,7 @@ public class Example { | **200** | Returns a CalendarEventDiscovery objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **followGroupCalendarEvent** > CalendarEvent followGroupCalendarEvent(groupId, calendarId, followCalendarEventRequest) @@ -330,7 +330,7 @@ public class Example { | **200** | Returns a single CalendarEvent object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getCalendarEvents** > PaginatedCalendarEventList getCalendarEvents(date, n, offset) @@ -404,7 +404,7 @@ public class Example { | **200** | Returns a list of CalendarEvent objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getFeaturedCalendarEvents** > PaginatedCalendarEventList getFeaturedCalendarEvents(date, n, offset) @@ -478,7 +478,7 @@ public class Example { | **200** | Returns a list of CalendarEvent objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getFollowedCalendarEvents** > PaginatedCalendarEventList getFollowedCalendarEvents(date, n, offset) @@ -552,7 +552,7 @@ public class Example { | **200** | Returns a list of CalendarEvent objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getGroupCalendarEvent** > CalendarEvent getGroupCalendarEvent(groupId, calendarId) @@ -624,7 +624,7 @@ public class Example { | **200** | Returns a single CalendarEvent object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getGroupCalendarEventICS** > File getGroupCalendarEventICS(groupId, calendarId) @@ -690,7 +690,7 @@ No authorization required | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. | - | - + # **getGroupCalendarEvents** > PaginatedCalendarEventList getGroupCalendarEvents(groupId, date, n, offset) @@ -766,7 +766,7 @@ public class Example { | **200** | Returns a list of CalendarEvent objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getGroupNextCalendarEvent** > CalendarEvent getGroupNextCalendarEvent(groupId) @@ -837,7 +837,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. | - | - + # **searchCalendarEvents** > PaginatedCalendarEventList searchCalendarEvents(searchTerm, utcOffset, n, offset, isInternalVariant) @@ -915,7 +915,7 @@ public class Example { | **200** | Returns a list of CalendarEvent objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **updateGroupCalendarEvent** > CalendarEvent updateGroupCalendarEvent(groupId, calendarId, updateCalendarEventRequest) diff --git a/docs/CalendarEventRecurrenceEndType.md b/docs/CalendarEventRecurrenceEndType.md index 1045d4f1..6e581cd7 100644 --- a/docs/CalendarEventRecurrenceEndType.md +++ b/docs/CalendarEventRecurrenceEndType.md @@ -5,9 +5,9 @@ ## Enum -* `AFTERDATE` (value: `"afterDate"`) +* `AFTER_DATE` (value: `"afterDate"`) -* `AFTEROCCURRENCES` (value: `"afterOccurrences"`) +* `AFTER_OCCURRENCES` (value: `"afterOccurrences"`) diff --git a/docs/ContentFilter.md b/docs/ContentFilter.md index 1c2fcce1..dd8c25b0 100644 --- a/docs/ContentFilter.md +++ b/docs/ContentFilter.md @@ -5,15 +5,15 @@ ## Enum -* `ADULT` (value: `"content_adult"`) +* `CONTENT_ADULT` (value: `"content_adult"`) -* `GORE` (value: `"content_gore"`) +* `CONTENT_GORE` (value: `"content_gore"`) -* `HORROR` (value: `"content_horror"`) +* `CONTENT_HORROR` (value: `"content_horror"`) -* `SEX` (value: `"content_sex"`) +* `CONTENT_SEX` (value: `"content_sex"`) -* `VIOLENCE` (value: `"content_violence"`) +* `CONTENT_VIOLENCE` (value: `"content_violence"`) diff --git a/docs/CurrentUser.md b/docs/CurrentUser.md index 1f6e3696..842d42b7 100644 --- a/docs/CurrentUser.md +++ b/docs/CurrentUser.md @@ -15,6 +15,8 @@ |**ageVerificationStatus** | **AgeVerificationStatus** | | | |**ageVerified** | **Boolean** | `true` if, user is age verified (not 18+). | | |**allowAvatarCopying** | **Boolean** | | | +|**appleDetails** | **Object** | | [optional] | +|**appleId** | **String** | | [optional] | |**authToken** | **String** | The auth token for NEWLY REGISTERED ACCOUNTS ONLY (/auth/register) | [optional] | |**badges** | [**List<Badge>**](Badge.md) | | [optional] | |**bio** | **String** | | | @@ -37,9 +39,11 @@ |**googleDetails** | **Object** | | [optional] | |**googleId** | **String** | | [optional] | |**hasBirthday** | **Boolean** | | | +|**hasDiscordFriendsOptOut** | **Boolean** | | [optional] | |**hasEmail** | **Boolean** | | | |**hasLoggedInFromClient** | **Boolean** | | | |**hasPendingEmail** | **Boolean** | | | +|**hasSharedConnectionsOptOut** | **Boolean** | | [optional] | |**hideContentFilterSettings** | **Boolean** | | [optional] | |**homeLocation** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | |**id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | | @@ -73,6 +77,8 @@ |**steamDetails** | **Object** | | | |**steamId** | **String** | | | |**tags** | **List<String>** | | | +|**twitchDetails** | **Object** | | [optional] | +|**twitchId** | **String** | | [optional] | |**twoFactorAuthEnabled** | **Boolean** | | | |**twoFactorAuthEnabledDate** | **OffsetDateTime** | | [optional] | |**unsubscribe** | **Boolean** | | | diff --git a/docs/EconomyApi.md b/docs/EconomyApi.md index 6da32da8..9e055505 100644 --- a/docs/EconomyApi.md +++ b/docs/EconomyApi.md @@ -36,8 +36,8 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**getTiliaStatus**](EconomyApi.md#getTiliaStatus) | **GET** /tilia/status | Get Tilia Status | | [**getTiliaTos**](EconomyApi.md#getTiliaTos) | **GET** /user/{userId}/tilia/tos | Get Tilia TOS Agreement Status | | [**getTokenBundles**](EconomyApi.md#getTokenBundles) | **GET** /tokenBundles | List Token Bundles | -| [**getUserCreditsEligible**](EconomyApi.md#getUserCreditsEligible) | **GET** /users/{userId}/credits/eligible | Get User Credits Eligiblity | -| [**getUserSubscriptionEligible**](EconomyApi.md#getUserSubscriptionEligible) | **GET** /users/{userId}/subscription/eligible | Get User Subscription Eligiblity | +| [**getUserCreditsEligible**](EconomyApi.md#getUserCreditsEligible) | **GET** /users/{userId}/credits/eligible | Get User Credits Eligibility | +| [**getUserSubscriptionEligible**](EconomyApi.md#getUserSubscriptionEligible) | **GET** /users/{userId}/subscription/eligible | Get User Subscription Eligibility | | [**getUserTiliaKyc**](EconomyApi.md#getUserTiliaKyc) | **GET** /user/{userId}/tilia/kyc | Get User Tilia KYC | | [**listStores**](EconomyApi.md#listStores) | **GET** /economy/stores | List Stores | | [**listUserProducts**](EconomyApi.md#listUserProducts) | **GET** /user/{userId}/products | List User Products | @@ -47,7 +47,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**updateTiliaTos**](EconomyApi.md#updateTiliaTos) | **PUT** /user/{userId}/tilia/tos | Update Tilia TOS Agreement Status | - + # **createProduct** > Product createProduct(createProductRequest) @@ -117,7 +117,7 @@ public class Example { | **200** | Returns a single Product object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **createProductListingDirect** > ProductListing createProductListingDirect(createListingRequest) @@ -187,7 +187,7 @@ public class Example { | **200** | Returns a single ProductListing object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteProduct** > SuccessFlag deleteProduct(productId) @@ -257,7 +257,7 @@ public class Example { | **200** | Returns an SuccessFlag object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteProductListingDirect** > SuccessFlag deleteProductListingDirect(productId, hydrate) @@ -329,7 +329,7 @@ public class Example { | **200** | Returns an SuccessFlag object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getActiveLicenses** > List<License> getActiveLicenses() @@ -395,7 +395,7 @@ This endpoint does not need any parameter. | **200** | Returns a list of License objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getBalance** > Balance getBalance(userId) @@ -465,7 +465,7 @@ public class Example { | **200** | Returns a single Balance object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getBalanceEarnings** > Balance getBalanceEarnings(userId) @@ -535,7 +535,7 @@ public class Example { | **200** | Returns a single Balance object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getBulkGiftPurchases** > List<Object> getBulkGiftPurchases(mostRecent) @@ -605,7 +605,7 @@ public class Example { | **200** | Returns a list of ??? objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getCurrentSubscriptions** > List<UserSubscription> getCurrentSubscriptions() @@ -671,7 +671,7 @@ This endpoint does not need any parameter. | **200** | Returns a list of UserSubscription objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getEarningsMetrics** > EarningsMetrics getEarningsMetrics(sellerId, metricDateStart, metricDateEnd, groupByDuration) @@ -747,7 +747,7 @@ public class Example { | **200** | Returns a single EarningsMetrics object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getEconomyAccount** > EconomyAccount getEconomyAccount(userId) @@ -817,7 +817,7 @@ public class Example { | **200** | Returns a single EconomyAccount object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getEconomyBalances** > EconomyBalances getEconomyBalances(userId) @@ -887,7 +887,7 @@ public class Example { | **200** | Returns an EconomyBalances object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getEconomyPayoutStatus** > EconomyPayoutStatus getEconomyPayoutStatus(userId) @@ -957,7 +957,7 @@ public class Example { | **200** | Returns an EconomyPayoutStatus object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getEconomyPayouts** > EconomyPayoutList getEconomyPayouts(userId) @@ -1027,7 +1027,7 @@ public class Example { | **200** | Returns an EconomyPayoutList object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getLicenseGroup** > LicenseGroup getLicenseGroup(licenseGroupId) @@ -1097,7 +1097,7 @@ public class Example { | **200** | Returns a single LicenseGroup object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getProductListing** > ProductListing getProductListing(productId, hydrate) @@ -1169,7 +1169,7 @@ public class Example { | **200** | Returns a single ProductListing object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getProductListingAlternate** > ProductListing getProductListingAlternate(productId) @@ -1239,7 +1239,7 @@ public class Example { | **200** | Returns a single ProductListing object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getProductListings** > List<ProductListing> getProductListings(userId, n, offset, hydrate, listingType, groupId, active) @@ -1321,7 +1321,7 @@ public class Example { | **200** | Returns a list of ProductListing objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getProductPurchase** > ProductPurchase getProductPurchase(productPurchaseId) @@ -1391,7 +1391,7 @@ public class Example { | **200** | Returns a single ProductPurchase object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getProductPurchaseHistory** > ProductPurchaseHistory getProductPurchaseHistory(userId, n, dateMin, dateMax, fromUserId, toUserId, sort, order) @@ -1475,7 +1475,7 @@ public class Example { | **200** | Returns a single ProductPurchaseHistory object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getProductPurchaseStacks** > List<Object> getProductPurchaseStacks(productPurchaseId) @@ -1545,7 +1545,7 @@ public class Example { | **200** | Returns a list of stacks for a product purchase. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getProductPurchases** > List<ProductPurchase> getProductPurchases(buyerId, sellerId, n, offset, mostRecent, sort, order) @@ -1627,7 +1627,7 @@ public class Example { | **200** | Returns a list of ProductPurchase objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getRecentSubscription** > UserSubscription getRecentSubscription() @@ -1693,7 +1693,7 @@ This endpoint does not need any parameter. | **200** | Returns a UserSubscription object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getSellerEligibility** > SellerEligibility getSellerEligibility() @@ -1759,7 +1759,7 @@ This endpoint does not need any parameter. | **200** | Returns a single SellerEligibility object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getSteamTransaction** > Transaction getSteamTransaction(transactionId) @@ -1829,7 +1829,7 @@ public class Example { | **200** | Returns a single Transaction object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getSteamTransactions** > List<Transaction> getSteamTransactions() @@ -1895,7 +1895,7 @@ This endpoint does not need any parameter. | **200** | Returns a list of Transaction objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getStore** > Store getStore(storeId, hydrateListings, hydrateProducts) @@ -1969,7 +1969,7 @@ public class Example { | **200** | Returns a single Store object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getStoreShelves** > List<StoreShelf> getStoreShelves(storeId, hydrateListings, fetch) @@ -2043,7 +2043,7 @@ public class Example { | **200** | Returns a list of StoreShelf objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getSubscriptions** > List<Subscription> getSubscriptions() @@ -2109,7 +2109,7 @@ This endpoint does not need any parameter. | **200** | Returns a list of Subscription objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getTiliaStatus** > TiliaStatus getTiliaStatus() @@ -2175,7 +2175,7 @@ This endpoint does not need any parameter. | **200** | Returns a single TiliaStatus object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getTiliaTos** > TiliaTOS getTiliaTos(userId) @@ -2245,7 +2245,7 @@ public class Example { | **200** | Returns a single TiliaTOS object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getTokenBundles** > List<TokenBundle> getTokenBundles() @@ -2311,11 +2311,11 @@ This endpoint does not need any parameter. | **200** | Returns a list of TokenBundle objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserCreditsEligible** > UserCreditsEligible getUserCreditsEligible(userId, subscriptionId) -Get User Credits Eligiblity +Get User Credits Eligibility Get the user's eligibility status for subscriptions based on available credits. @@ -2383,11 +2383,11 @@ public class Example { | **200** | Returns a single UserCreditsEligible object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserSubscriptionEligible** > UserSubscriptionEligible getUserSubscriptionEligible(userId, steamId) -Get User Subscription Eligiblity +Get User Subscription Eligibility Get the user's eligibility status for subscriptions. @@ -2455,7 +2455,7 @@ public class Example { | **200** | Returns a single UserSubscriptionEligible object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserTiliaKyc** > TiliaKyc getUserTiliaKyc(userId) @@ -2525,7 +2525,7 @@ public class Example { | **200** | Returns a TiliaKyc object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **listStores** > List<Store> listStores(sellerId, managementPov, n, offset) @@ -2601,7 +2601,7 @@ public class Example { | **200** | Returns a list of Store objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **listUserProducts** > List<Product> listUserProducts(userId, n, offset) @@ -2675,7 +2675,7 @@ public class Example { | **200** | Returns a list of Product objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **purchaseProductListing** > ProductPurchase purchaseProductListing(purchaseProductListingRequest) @@ -2745,7 +2745,7 @@ public class Example { | **200** | Returns a single ProductPurchase object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **updateProduct** > Product updateProduct(productId, updateProductRequest) @@ -2817,7 +2817,7 @@ public class Example { | **200** | Returns a single Product object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **updateProductListingDirect** > ProductListing updateProductListingDirect(productId, updateListingRequest, hydrate) @@ -2891,7 +2891,7 @@ public class Example { | **200** | Returns a single ProductListing object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **updateTiliaTos** > Object updateTiliaTos(userId, updateTiliaTOSRequest) diff --git a/docs/FavoriteType.md b/docs/FavoriteType.md index bbe3fe45..257ba987 100644 --- a/docs/FavoriteType.md +++ b/docs/FavoriteType.md @@ -9,7 +9,7 @@ * `FRIEND` (value: `"friend"`) -* `VRCPLUSWORLD` (value: `"vrcPlusWorld"`) +* `VRC_PLUS_WORLD` (value: `"vrcPlusWorld"`) * `WORLD` (value: `"world"`) diff --git a/docs/FavoritesApi.md b/docs/FavoritesApi.md index de44add3..80822497 100644 --- a/docs/FavoritesApi.md +++ b/docs/FavoritesApi.md @@ -14,7 +14,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**updateFavoriteGroup**](FavoritesApi.md#updateFavoriteGroup) | **PUT** /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} | Update Favorite Group | - + # **addFavorite** > Favorite addFavorite(addFavoriteRequest) @@ -85,7 +85,7 @@ public class Example { | **400** | Error response when trying favorite someone or something when already having it/them favorited. | - | | **403** | Error response when trying favorite someone whom you are not friends with. | - | - + # **clearFavoriteGroup** > Success clearFavoriteGroup(favoriteGroupType, favoriteGroupName, userId) @@ -158,7 +158,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Success response after clearing a favorite group. | - | - + # **getFavoriteGroup** > FavoriteGroup getFavoriteGroup(favoriteGroupType, favoriteGroupName, userId) @@ -231,7 +231,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a single FavoriteGroup object. | - | - + # **getFavoriteGroups** > List<FavoriteGroup> getFavoriteGroups(n, offset, userId, ownerId) @@ -264,7 +264,7 @@ public class Example { Integer n = 60; // Integer | The number of objects to return. Integer offset = 56; // Integer | A zero-based offset from the default object sorting from where search results start. String userId = "userId_example"; // String | Target user to see information on, admin-only. - String ownerId = "ownerId_example"; // String | The owner of whoms favorite groups to return. Must be a UserID. + String ownerId = "ownerId_example"; // String | The owner whose favorite groups to return. Must be a UserID. try { List result = apiInstance.getFavoriteGroups(n, offset, userId, ownerId); System.out.println(result); @@ -286,7 +286,7 @@ public class Example { | **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | | **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] | | **userId** | **String**| Target user to see information on, admin-only. | [optional] | -| **ownerId** | **String**| The owner of whoms favorite groups to return. Must be a UserID. | [optional] | +| **ownerId** | **String**| The owner whose favorite groups to return. Must be a UserID. | [optional] | ### Return type @@ -307,7 +307,7 @@ public class Example { | **200** | Returns a list of FavoriteGroup objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getFavoriteLimits** > FavoriteLimits getFavoriteLimits() @@ -373,7 +373,7 @@ This endpoint does not need any parameter. | **200** | Returns a single FavoriteLimits object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getFavorites** > List<Favorite> getFavorites(n, offset, type, tag) @@ -449,7 +449,7 @@ public class Example { | **200** | Returns a list of Favorite objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **removeFavorite** > Success removeFavorite(favoriteId) @@ -520,7 +520,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to show information about a non-existent favorite. | - | - + # **updateFavoriteGroup** > updateFavoriteGroup(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest) diff --git a/docs/FilesApi.md b/docs/FilesApi.md index e0f1b7f3..0bddf777 100644 --- a/docs/FilesApi.md +++ b/docs/FilesApi.md @@ -27,7 +27,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**uploadImage**](FilesApi.md#uploadImage) | **POST** /file/image | Upload gallery image, icon, emoji or sticker | - + # **createFile** > ModelFile createFile(createFileRequest) @@ -96,7 +96,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a single File object. | - | - + # **createFileVersion** > ModelFile createFileVersion(fileId, createFileVersionRequest) @@ -167,7 +167,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a single File object. | - | - + # **deleteFile** > ModelFile deleteFile(fileId) @@ -237,7 +237,7 @@ public class Example { | **200** | Returns a single File object. | - | | **404** | Error response when trying to delete a non-existent file. | - | - + # **deleteFileVersion** > ModelFile deleteFileVersion(fileId, versionId) @@ -310,13 +310,13 @@ public class Example { | **400** | Error response when trying to delete the initial version of a file. Delete the main File object instead. | - | | **500** | Error response when trying to delete any version of a file that is not the last one. | - | - + # **downloadFileVersion** > File downloadFileVersion(fileId, versionId) Download File Version -Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when neccesary. +Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when necessary. ### Example ```java @@ -382,7 +382,7 @@ public class Example { | **200** | Raw file | - | | **404** | Error response when trying to show information about a non-existent file. | - | - + # **finishFileDataUpload** > ModelFile finishFileDataUpload(fileId, versionId, fileType, finishFileDataUploadRequest) @@ -457,7 +457,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a single File object. | - | - + # **getAdminAssetBundle** > AdminAssetBundle getAdminAssetBundle(adminAssetBundleId) @@ -526,7 +526,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a single AdminAssetBundle object. | - | - + # **getContentAgreementStatus** > AgreementStatus getContentAgreementStatus(agreementCode, contentId, version) @@ -600,7 +600,7 @@ public class Example { | **200** | Returns a single AgreementStatus object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getFile** > ModelFile getFile(fileId) @@ -670,7 +670,7 @@ public class Example { | **200** | Returns a single File object. | - | | **404** | Error response when trying to show information about a non-existent file. | - | - + # **getFileAnalysis** > FileAnalysis getFileAnalysis(fileId, versionId) @@ -743,7 +743,7 @@ public class Example { | **202** | Error response when requesting file Analysis that is not yet available. | - | | **404** | Error response when trying to show information about a non-existent file. | - | - + # **getFileAnalysisSecurity** > FileAnalysis getFileAnalysisSecurity(fileId, versionId) @@ -816,7 +816,7 @@ public class Example { | **202** | Error response when requesting file Analysis that is not yet available. | - | | **404** | Error response when trying to show information about a non-existent file. | - | - + # **getFileAnalysisStandard** > FileAnalysis getFileAnalysisStandard(fileId, versionId) @@ -889,7 +889,7 @@ public class Example { | **202** | Error response when requesting file Analysis that is not yet available. | - | | **404** | Error response when trying to show information about a non-existent file. | - | - + # **getFileDataUploadStatus** > FileVersionUploadStatus getFileDataUploadStatus(fileId, versionId, fileType) @@ -962,7 +962,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. | - | - + # **getFiles** > List<ModelFile> getFiles(tag, userId, n, offset) @@ -1037,7 +1037,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a list of File objects. | - | - + # **setGroupGalleryFileOrder** > GroupGalleryFileOrder setGroupGalleryFileOrder(groupGalleryFileOrderRequest) @@ -1107,7 +1107,7 @@ public class Example { | **200** | Returns a list of File IDs. | - | | **404** | Error response when trying to show information about a non-existent file. | - | - + # **startFileDataUpload** > FileUploadURL startFileDataUpload(fileId, versionId, fileType, partNumber) @@ -1183,7 +1183,7 @@ public class Example { | **200** | See [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html](AWS REST docs - PUT Object) | - | | **400** | Error response when trying to start an upload against a FileVersion that is already marked as `complete`. | - | - + # **submitContentAgreement** > Agreement submitContentAgreement(agreementRequest) @@ -1253,7 +1253,7 @@ public class Example { | **200** | Returns a single Agreement object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **updateAssetReviewNotes** > updateAssetReviewNotes(assetReviewId, updateAssetReviewNotesRequest) @@ -1324,7 +1324,7 @@ null (empty response body) | **200** | The asset review notes are submitted. | - | | **401** | Error response due to missing auth cookie. | - | - + # **uploadGalleryImage** > ModelFile uploadGalleryImage(_file) @@ -1393,7 +1393,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a single File object. | - | - + # **uploadIcon** > ModelFile uploadIcon(_file) @@ -1462,7 +1462,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a single File object. | - | - + # **uploadImage** > ModelFile uploadImage(_file, tag, animationStyle, frames, framesOverTime, loopStyle, maskTag) diff --git a/docs/FriendsApi.md b/docs/FriendsApi.md index 62a5fdce..deeda858 100644 --- a/docs/FriendsApi.md +++ b/docs/FriendsApi.md @@ -12,7 +12,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**unfriend**](FriendsApi.md#unfriend) | **DELETE** /auth/user/friends/{userId} | Unfriend | - + # **boop** > Success boop(userId, boopRequest) @@ -86,7 +86,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to send a friend request to a user which doesn't exist. | - | - + # **deleteFriendRequest** > Success deleteFriendRequest(userId) @@ -157,7 +157,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to delete a non-existent friend-request. | - | - + # **friend** > Notification friend(userId) @@ -224,12 +224,12 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single Notifcation object. | - | +| **200** | Returns a single Notification object. | - | | **400** | Bad request error response when sending a friend request | - | | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to send a friend request to a user which doesn't exist. | - | - + # **getFriendStatus** > FriendStatus getFriendStatus(userId) @@ -299,7 +299,7 @@ public class Example { | **200** | Returns a users Friend Status. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getFriends** > List<LimitedUserFriend> getFriends(offset, n, offline) @@ -373,7 +373,7 @@ public class Example { | **200** | Returns a list of LimitedUserFriend objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **unfriend** > Success unfriend(userId) diff --git a/docs/GroupRoleTemplate.md b/docs/GroupRoleTemplate.md index 9108c4cd..585b9939 100644 --- a/docs/GroupRoleTemplate.md +++ b/docs/GroupRoleTemplate.md @@ -7,11 +7,11 @@ * `DEFAULT` (value: `"default"`) -* `MANAGEDFREE` (value: `"managedFree"`) +* `MANAGED_FREE` (value: `"managedFree"`) -* `MANAGEDINVITE` (value: `"managedInvite"`) +* `MANAGED_INVITE` (value: `"managedInvite"`) -* `MANAGEDREQUEST` (value: `"managedRequest"`) +* `MANAGED_REQUEST` (value: `"managedRequest"`) diff --git a/docs/GroupSearchSort.md b/docs/GroupSearchSort.md index fec24039..634c512b 100644 --- a/docs/GroupSearchSort.md +++ b/docs/GroupSearchSort.md @@ -5,9 +5,9 @@ ## Enum -* `ASC` (value: `"joinedAt:asc"`) +* `JOINED_AT_ASC` (value: `"joinedAt:asc"`) -* `DESC` (value: `"joinedAt:desc"`) +* `JOINED_AT_DESC` (value: `"joinedAt:desc"`) diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md index da623460..d56e6570 100644 --- a/docs/GroupsApi.md +++ b/docs/GroupsApi.md @@ -57,7 +57,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**updateGroupRole**](GroupsApi.md#updateGroupRole) | **PUT** /groups/{groupId}/roles/{groupRoleId} | Update Group Role | - + # **addGroupGalleryImage** > GroupGalleryImage addGroupGalleryImage(groupId, groupGalleryId, addGroupGalleryImageRequest) @@ -132,7 +132,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **addGroupMemberRole** > List<String> addGroupMemberRole(groupId, userId, groupRoleId) @@ -207,7 +207,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **addGroupPost** > GroupPost addGroupPost(groupId, createGroupPostRequest) @@ -279,7 +279,7 @@ public class Example { | **200** | Returns a GroupPost object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **banGroupMember** > GroupMember banGroupMember(groupId, banGroupMemberRequest) @@ -353,7 +353,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **blockGroup** > Success blockGroup(groupId) @@ -426,7 +426,7 @@ public class Example { | **403** | Error response when trying to block a group you already have blocked. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **cancelGroupRequest** > cancelGroupRequest(groupId) @@ -497,7 +497,7 @@ null (empty response body) | **403** | Error response when trying to perform operations on a group you are not member of. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **cancelGroupTransfer** > Success cancelGroupTransfer(groupId) @@ -569,7 +569,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **createGroup** > Group createGroup(createGroupRequest) @@ -639,7 +639,7 @@ public class Example { | **200** | Returns a single Group object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **createGroupAnnouncement** > GroupAnnouncement createGroupAnnouncement(groupId, createGroupAnnouncementRequest) @@ -712,7 +712,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **createGroupGallery** > GroupGallery createGroupGallery(groupId, createGroupGalleryRequest) @@ -785,7 +785,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **createGroupInvite** > createGroupInvite(groupId, createGroupInviteRequest) @@ -859,7 +859,7 @@ null (empty response body) | **403** | Forbidden error response when creating a group invite. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **createGroupRole** > GroupRole createGroupRole(groupId, createGroupRoleRequest) @@ -932,7 +932,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **declineGroupInvite** > Success declineGroupInvite(groupId, declineGroupInviteRequest) @@ -1006,7 +1006,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **deleteGroup** > Success deleteGroup(groupId, hardDelete) @@ -1079,7 +1079,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **deleteGroupAnnouncement** > Success deleteGroupAnnouncement(groupId) @@ -1150,7 +1150,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **deleteGroupGallery** > Success deleteGroupGallery(groupId, groupGalleryId) @@ -1223,7 +1223,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **deleteGroupGalleryImage** > Success deleteGroupGalleryImage(groupId, groupGalleryId, groupGalleryImageId) @@ -1299,7 +1299,7 @@ public class Example { | **403** | Error response when trying to delete a submission to a group's gallery when the user does not have permission to do so. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **deleteGroupInvite** > deleteGroupInvite(groupId, userId) @@ -1371,7 +1371,7 @@ null (empty response body) | **400** | Bad request error response when deleting a group invite | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteGroupPost** > Success deleteGroupPost(groupId, notificationId) @@ -1444,7 +1444,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Response after deleting a group post. | - | - + # **deleteGroupRole** > List<GroupRole> deleteGroupRole(groupId, groupRoleId) @@ -1517,7 +1517,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a group you are not member of. | - | - + # **getGroup** > Group getGroup(groupId, includeRoles) @@ -1590,7 +1590,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupAnnouncements** > GroupAnnouncement getGroupAnnouncements(groupId) @@ -1661,7 +1661,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupAuditLogEntryTypes** > List<String> getGroupAuditLogEntryTypes(groupId) @@ -1732,7 +1732,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupAuditLogs** > PaginatedGroupAuditLogEntryList getGroupAuditLogs(groupId, n, offset, startDate, endDate, actorIds, eventTypes, targetIds) @@ -1817,7 +1817,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupBans** > List<GroupMember> getGroupBans(groupId, n, offset) @@ -1893,7 +1893,7 @@ public class Example { | **403** | Error response due to missing permissions. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupGalleryImages** > List<GroupGalleryImage> getGroupGalleryImages(groupId, groupGalleryId, n, offset, approved) @@ -1972,7 +1972,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupInstances** > List<GroupInstance> getGroupInstances(groupId) @@ -2043,7 +2043,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupInvites** > List<GroupMember> getGroupInvites(groupId, n, offset) @@ -2119,7 +2119,7 @@ public class Example { | **403** | Error response when trying to perform operations on a group you are not member of. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupMember** > GroupMember getGroupMember(groupId, userId) @@ -2193,7 +2193,7 @@ public class Example { | **403** | Error response when trying to perform operations on a group you are not member of. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupMembers** > List<GroupMember> getGroupMembers(groupId, n, offset, sort, roleId) @@ -2273,7 +2273,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupPermissions** > List<GroupPermission> getGroupPermissions(groupId) @@ -2345,7 +2345,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupPosts** > GetGroupPosts200Response getGroupPosts(groupId, n, offset, publicOnly) @@ -2421,7 +2421,7 @@ public class Example { | **200** | Returns a GroupPost Array. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getGroupRequests** > List<GroupMember> getGroupRequests(groupId, n, offset, blocked) @@ -2499,7 +2499,7 @@ public class Example { | **403** | Error response when trying to perform operations on a group you are not member of. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupRoleTemplates** > Map<String, GroupRoleTemplateValues> getGroupRoleTemplates() @@ -2565,7 +2565,7 @@ This endpoint does not need any parameter. | **200** | Returns a dictionary of GroupRoleTemplate objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getGroupRoles** > List<GroupRole> getGroupRoles(groupId) @@ -2636,7 +2636,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **getGroupTransferability** > GroupTransferable getGroupTransferability(groupId, transferTargetId) @@ -2710,13 +2710,13 @@ public class Example { | **403** | Error response when trying to perform operations on a group you are not member of. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **initiateOrAcceptGroupTransfer** > Success initiateOrAcceptGroupTransfer(groupId, transferGroupRequest) Initiate or Accept Group Transfer -To initiate, must be logged in as the current owner and specify the transferTargetId in the body. To accept, must be logged in as the user targetted by a pending transfer, no body is required. +To initiate, must be logged in as the current owner and specify the transferTargetId in the body. To accept, must be logged in as the user targeted by a pending transfer, no body is required. ### Example ```java @@ -2784,7 +2784,7 @@ public class Example { | **403** | Error response when trying to transfer a group to an ineligible target user. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **joinGroup** > GroupMember joinGroup(groupId, confirmOverrideBlock, joinGroupRequest) @@ -2860,7 +2860,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **kickGroupMember** > Success kickGroupMember(groupId, userId) @@ -2934,7 +2934,7 @@ public class Example { | **403** | Error response when trying to perform operations on a group you are not member of. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **leaveGroup** > leaveGroup(groupId) @@ -3004,7 +3004,7 @@ null (empty response body) | **403** | Error response when trying to perform operations on a group you are not member of. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **removeGroupMemberRole** > List<String> removeGroupMemberRole(groupId, userId, groupRoleId) @@ -3079,7 +3079,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **respondGroupJoinRequest** > respondGroupJoinRequest(groupId, userId, respondGroupJoinRequest) @@ -3153,7 +3153,7 @@ null (empty response body) | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **searchGroupMembers** > SearchGroupMembers200Response searchGroupMembers(groupId, query, n, offset) @@ -3231,7 +3231,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **searchGroups** > List<LimitedGroup> searchGroups(query, offset, n) @@ -3298,7 +3298,7 @@ No authorization required | **200** | Returns a list of LimitedGroup objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **unbanGroupMember** > GroupMember unbanGroupMember(groupId, userId) @@ -3371,7 +3371,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **updateGroup** > Group updateGroup(groupId, updateGroupRequest) @@ -3444,7 +3444,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **updateGroupGallery** > GroupGallery updateGroupGallery(groupId, groupGalleryId, updateGroupGalleryRequest) @@ -3519,7 +3519,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **updateGroupMember** > GroupMember updateGroupMember(groupId, userId, updateGroupMemberRequest) @@ -3594,7 +3594,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing group. | - | - + # **updateGroupPost** > GroupPost updateGroupPost(groupId, notificationId, createGroupPostRequest) @@ -3669,7 +3669,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Response after deleting a group post. | - | - + # **updateGroupRepresentation** > Success updateGroupRepresentation(groupId, updateGroupRepresentationRequest) @@ -3742,7 +3742,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response when trying to perform operations on a group you are not member of. | - | - + # **updateGroupRole** > List<GroupRole> updateGroupRole(groupId, groupRoleId, updateGroupRoleRequest) diff --git a/docs/InfoPushDataClickable.md b/docs/InfoPushDataClickable.md index 16d60355..4a80b464 100644 --- a/docs/InfoPushDataClickable.md +++ b/docs/InfoPushDataClickable.md @@ -16,10 +16,10 @@ | Name | Value | |---- | -----| -| CANNEDWORLDSEARCH | "CannedWorldSearch" | -| OPENSAFETYMENU | "OpenSafetyMenu" | -| OPENURL | "OpenURL" | -| OPENVRCPLUSMENU | "OpenVRCPlusMenu" | +| CANNED_WORLD_SEARCH | "CannedWorldSearch" | +| OPEN_SAFETY_MENU | "OpenSafetyMenu" | +| OPEN_URL | "OpenURL" | +| OPEN_VRC_PLUS_MENU | "OpenVRCPlusMenu" | diff --git a/docs/InstancesApi.md b/docs/InstancesApi.md index b026fd0e..8fdef998 100644 --- a/docs/InstancesApi.md +++ b/docs/InstancesApi.md @@ -12,7 +12,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**getShortName**](InstancesApi.md#getShortName) | **GET** /instances/{worldId}:{instanceId}/shortName | Get Instance Short Name | - + # **closeInstance** > Instance closeInstance(worldId, instanceId, hardClose, closedAt) @@ -88,9 +88,9 @@ public class Example { | **200** | Returns a single Instance object. | - | | **401** | Error response due to missing auth cookie. | - | | **403** | Error response due to not being allowed to close an instance | - | -| **404** | Error response due to non existant instance | - | +| **404** | Error response due to non existent instance | - | - + # **createInstance** > Instance createInstance(createInstanceRequest) @@ -160,7 +160,7 @@ public class Example { | **200** | Returns a single Instance object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getInstance** > Instance getInstance(worldId, instanceId) @@ -232,7 +232,7 @@ public class Example { | **200** | Returns a single Instance object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getInstanceByShortName** > Instance getInstanceByShortName(shortName) @@ -301,9 +301,9 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a single Instance object. | - | | **401** | Error response due to missing auth cookie. | - | -| **404** | Error response due to non existant instance | - | +| **404** | Error response due to non existent instance | - | - + # **getRecentLocations** > List<String> getRecentLocations(n, offset) @@ -375,7 +375,7 @@ public class Example { | **200** | Returns a list of LocationIDs. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getShortName** > InstanceShortNameResponse getShortName(worldId, instanceId) diff --git a/docs/InventoryApi.md b/docs/InventoryApi.md index 3778e35d..04d40d0a 100644 --- a/docs/InventoryApi.md +++ b/docs/InventoryApi.md @@ -21,7 +21,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**updateOwnInventoryItem**](InventoryApi.md#updateOwnInventoryItem) | **PUT** /inventory/{inventoryItemId} | Update Own Inventory Item | - + # **consumeOwnInventoryItem** > InventoryConsumptionResults consumeOwnInventoryItem(inventoryItemId) @@ -92,7 +92,7 @@ public class Example { | **400** | Error response when trying to consume an InventoryItem lacking the consumable flag. | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteOwnInventoryItem** > SuccessFlag deleteOwnInventoryItem(inventoryItemId) @@ -162,7 +162,7 @@ public class Example { | **200** | Returns an SuccessFlag object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **equipOwnInventoryItem** > InventoryItem equipOwnInventoryItem(inventoryItemId, equipInventoryItemRequest) @@ -235,7 +235,7 @@ public class Example { | **400** | Error response when trying to equip an InventoryItem lacking the equippable flag. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getInventory** > Inventory getInventory(n, offset, holderId, equipSlot, order, tags, types, flags, notTypes, notFlags, archived) @@ -326,7 +326,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response due to missing permissions. | - | - + # **getInventoryCollections** > List<String> getInventoryCollections() @@ -392,7 +392,7 @@ This endpoint does not need any parameter. | **200** | Returns a list of strings. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getInventoryDrops** > List<InventoryDrop> getInventoryDrops(active) @@ -462,7 +462,7 @@ public class Example { | **200** | Returns a list of InventoryDrop objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getInventoryTemplate** > InventoryTemplate getInventoryTemplate(inventoryTemplateId) @@ -532,7 +532,7 @@ public class Example { | **200** | Returns an InventoryTemplate object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getOwnInventoryItem** > InventoryItem getOwnInventoryItem(inventoryItemId) @@ -602,7 +602,7 @@ public class Example { | **200** | Returns an InventoryItem object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserInventoryItem** > InventoryItem getUserInventoryItem(userId, inventoryItemId) @@ -674,7 +674,7 @@ public class Example { | **200** | Returns an InventoryItem object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **redeemReward** > List<RewardRedemptionResult> redeemReward(rewardRedemptionRequest) @@ -744,7 +744,7 @@ public class Example { | **200** | Returns a single RewardRedemptionResult object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **shareInventoryItemDirect** > OkStatus shareInventoryItemDirect(itemId, duration, shareInventoryItemDirectRequest) @@ -818,7 +818,7 @@ public class Example { | **200** | Returns an OkStatus object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **shareInventoryItemPedestal** > InventorySpawn shareInventoryItemPedestal(itemId, duration) @@ -890,7 +890,7 @@ public class Example { | **200** | Returns an InventorySpawn object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **spawnInventoryItem** > InventorySpawn spawnInventoryItem(id) @@ -960,7 +960,7 @@ public class Example { | **200** | Returns an InventorySpawn object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **unequipOwnInventorySlot** > String unequipOwnInventorySlot(inventoryItemId) @@ -1030,7 +1030,7 @@ public class Example { | **200** | Returns a string. | - | | **401** | Error response due to missing auth cookie. | - | - + # **updateOwnInventoryItem** > InventoryItem updateOwnInventoryItem(inventoryItemId, updateInventoryItemRequest) diff --git a/docs/InventoryDefaultAttributes1.md b/docs/InventoryDefaultAttributesValue.md similarity index 51% rename from docs/InventoryDefaultAttributes1.md rename to docs/InventoryDefaultAttributesValue.md index 109eb080..5b9bcc95 100644 --- a/docs/InventoryDefaultAttributes1.md +++ b/docs/InventoryDefaultAttributesValue.md @@ -1,6 +1,6 @@ -# InventoryDefaultAttributes1 +# InventoryDefaultAttributesValue ## Properties @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**defaultValue** | **String** | | [optional] | -|**validator** | [**InventoryDefaultAttributes1Validator**](InventoryDefaultAttributes1Validator.md) | | [optional] | +|**validator** | [**InventoryDefaultAttributesValueValidator**](InventoryDefaultAttributesValueValidator.md) | | [optional] | diff --git a/docs/InventoryDefaultAttributes1Validator.md b/docs/InventoryDefaultAttributesValueValidator.md similarity index 79% rename from docs/InventoryDefaultAttributes1Validator.md rename to docs/InventoryDefaultAttributesValueValidator.md index 0f73a8d6..d5823c18 100644 --- a/docs/InventoryDefaultAttributes1Validator.md +++ b/docs/InventoryDefaultAttributesValueValidator.md @@ -1,6 +1,6 @@ -# InventoryDefaultAttributes1Validator +# InventoryDefaultAttributesValueValidator ## Properties diff --git a/docs/InventoryItem.md b/docs/InventoryItem.md index 40896d19..5e6da27b 100644 --- a/docs/InventoryItem.md +++ b/docs/InventoryItem.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**collections** | **List<String>** | | | |**createdAt** | **OffsetDateTime** | | | -|**defaultAttributes** | [**Map<String, InventoryDefaultAttributes1>**](InventoryDefaultAttributes1.md) | | | +|**defaultAttributes** | [**Map<String, InventoryDefaultAttributesValue>**](InventoryDefaultAttributesValue.md) | | | |**description** | **String** | | | |**equipSlot** | **InventoryEquipSlot** | | [optional] | |**equipSlots** | **List<InventoryEquipSlot>** | | [optional] | diff --git a/docs/InviteApi.md b/docs/InviteApi.md index ccf7e8b4..ce8a0517 100644 --- a/docs/InviteApi.md +++ b/docs/InviteApi.md @@ -17,7 +17,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**updateInviteMessage**](InviteApi.md#updateInviteMessage) | **PUT** /message/{userId}/{messageType}/{slot} | Update Invite Message | - + # **getInviteMessage** > InviteMessage getInviteMessage(userId, messageType, slot) @@ -93,7 +93,7 @@ public class Example { | **401** | Error response due to missing authorization to perform that action. | - | | **404** | Error response when trying to get an Invite Message with a too high slot number. | - | - + # **getInviteMessages** > List<InviteMessage> getInviteMessages(userId, messageType) @@ -166,7 +166,7 @@ public class Example { | **400** | Error response when trying to update an Invite Message with an invalid slot number. | - | | **401** | Error response due to missing authorization to perform that action. | - | - + # **inviteMyselfTo** > SentNotification inviteMyselfTo(worldId, instanceId) @@ -235,11 +235,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single SentNotifcation object. | - | +| **200** | Returns a single SentNotification object. | - | | **401** | Error response due to missing auth cookie. | - | -| **404** | Error response due to non existant instance | - | +| **404** | Error response due to non existent instance | - | - + # **inviteUser** > SentNotification inviteUser(userId, inviteRequest) @@ -308,10 +308,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single SentNotifcation object. | - | -| **403** | Error response when trying to invite someome whom you are not friends with. | - | +| **200** | Returns a single SentNotification object. | - | +| **403** | Error response when trying to invite someone whom you are not friends with. | - | - + # **inviteUserWithPhoto** > SentNotification inviteUserWithPhoto(userId, data, image) @@ -382,10 +382,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single SentNotifcation object. | - | -| **403** | Error response when trying to invite someome whom you are not friends with. | - | +| **200** | Returns a single SentNotification object. | - | +| **403** | Error response when trying to invite someone whom you are not friends with. | - | - + # **requestInvite** > Notification requestInvite(userId, requestInviteRequest) @@ -454,10 +454,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single Notifcation object. | - | -| **403** | Error response when trying to invite someome whom you are not friends with. | - | +| **200** | Returns a single Notification object. | - | +| **403** | Error response when trying to invite someone whom you are not friends with. | - | - + # **requestInviteWithPhoto** > Notification requestInviteWithPhoto(userId, data, image) @@ -528,10 +528,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single Notifcation object. | - | -| **403** | Error response when trying to invite someome whom you are not friends with. | - | +| **200** | Returns a single Notification object. | - | +| **403** | Error response when trying to invite someone whom you are not friends with. | - | - + # **resetInviteMessage** > List<InviteMessage> resetInviteMessage(userId, messageType, slot) @@ -605,10 +605,10 @@ public class Example { | **200** | Returns a list of InviteMessage objects. | - | | **400** | Error response when trying to update an Invite Message with an invalid slot number. | - | | **401** | Error response due to missing authorization to perform that action. | - | -| **404** | Error response when trying to reset an Invite Message whos slot doesn't exist. | - | +| **404** | Error response when trying to reset an Invite Message whose slot doesn't exist. | - | | **429** | Error response when trying to update an Invite Message before the cooldown has expired. | - | - + # **respondInvite** > Notification respondInvite(notificationId, inviteResponse) @@ -677,10 +677,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single Notifcation object. | - | +| **200** | Returns a single Notification object. | - | | **400** | Error response when trying to respond to an invite and something went wrong. | - | - + # **respondInviteWithPhoto** > Notification respondInviteWithPhoto(notificationId, data, image) @@ -751,10 +751,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single Notifcation object. | - | +| **200** | Returns a single Notification object. | - | | **400** | Error response when trying to respond to an invite and something went wrong. | - | - + # **updateInviteMessage** > List<InviteMessage> updateInviteMessage(userId, messageType, slot, updateInviteMessageRequest) diff --git a/docs/InviteMessageType.md b/docs/InviteMessageType.md index faeb34ae..7d1d2c81 100644 --- a/docs/InviteMessageType.md +++ b/docs/InviteMessageType.md @@ -9,7 +9,7 @@ * `REQUEST` (value: `"request"`) -* `REQUESTRESPONSE` (value: `"requestResponse"`) +* `REQUEST_RESPONSE` (value: `"requestResponse"`) * `RESPONSE` (value: `"response"`) diff --git a/docs/JamsApi.md b/docs/JamsApi.md index 14bc2dfc..8ee060c0 100644 --- a/docs/JamsApi.md +++ b/docs/JamsApi.md @@ -11,7 +11,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**submitJamContent**](JamsApi.md#submitJamContent) | **POST** /jams/{jamId}/submissions | Submit Jam Content | - + # **deleteJamSubmission** > Success deleteJamSubmission(jamId, jamSubmissionId) @@ -85,7 +85,7 @@ public class Example { | **403** | Error response due to missing permissions. | - | | **404** | Error response when trying to show information about a non-existent jam. | - | - + # **getJam** > Jam getJam(jamId) @@ -155,7 +155,7 @@ public class Example { | **200** | Returns a Jam object. | - | | **404** | Error response when trying to show information about a non-existent jam. | - | - + # **getJamSubmissions** > List<JamSubmission> getJamSubmissions(jamId, contentId, submitterId) @@ -229,7 +229,7 @@ public class Example { | **200** | Returns a list of JamSubmission objects. | - | | **404** | Error response when trying to show information about a non-existent jam. | - | - + # **getJams** > List<Jam> getJams(type) @@ -298,7 +298,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a list of Jam objects. | - | - + # **submitJamContent** > JamSubmission submitJamContent(jamId, createJamSubmissionRequest) diff --git a/docs/LicenseType.md b/docs/LicenseType.md index 80faa5d7..74a64d50 100644 --- a/docs/LicenseType.md +++ b/docs/LicenseType.md @@ -7,7 +7,7 @@ * `AVATAR` (value: `"avatar"`) -* `LICENSEGROUP` (value: `"licenseGroup"`) +* `LICENSE_GROUP` (value: `"licenseGroup"`) * `PERMISSION` (value: `"permission"`) diff --git a/docs/LimitedUserSearch.md b/docs/LimitedUserSearch.md index 1ed29dc6..0d7fa952 100644 --- a/docs/LimitedUserSearch.md +++ b/docs/LimitedUserSearch.md @@ -8,6 +8,9 @@ User object received when searching | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**bannerColor** | **String** | | [optional] | +|**bannerType** | **String** | | [optional] | +|**bannerUrl** | **String** | | [optional] | |**bio** | **String** | | [optional] | |**bioLinks** | **List<String>** | | [optional] | |**currentAvatarImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | | @@ -15,9 +18,13 @@ User object received when searching |**currentAvatarThumbnailImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | | |**developerType** | **DeveloperType** | | | |**displayName** | **String** | | | +|**iconFrame** | **String** | | [optional] | +|**iconUrl** | **String** | | [optional] | |**id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | | |**isFriend** | **Boolean** | | | |**lastPlatform** | **String** | This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | | +|**nameplateEffect** | **String** | | [optional] | +|**profileEffect** | **String** | | [optional] | |**profilePicOverride** | **String** | | [optional] | |**pronouns** | **String** | | [optional] | |**status** | **UserStatus** | | | diff --git a/docs/MiscellaneousApi.md b/docs/MiscellaneousApi.md index 9b577f82..c648369d 100644 --- a/docs/MiscellaneousApi.md +++ b/docs/MiscellaneousApi.md @@ -15,7 +15,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**getSystemTime**](MiscellaneousApi.md#getSystemTime) | **GET** /time | Current System Time | - + # **getAssignedPermissions** > List<Permission> getAssignedPermissions() @@ -81,7 +81,7 @@ This endpoint does not need any parameter. | **200** | Returns a list of Permission objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getCSS** > String getCSS(variant, branch) @@ -146,7 +146,7 @@ No authorization required | **200** | **Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively. | - | | **400** | Error response when trying to download non-public and non-main JavaScript or CSS without Admin Credentials. | - | - + # **getConfig** > APIConfig getConfig() @@ -204,7 +204,7 @@ No authorization required |-------------|-------------|------------------| | **200** | Returns the API's config. | - | - + # **getCurrentOnlineUsers** > Integer getCurrentOnlineUsers() @@ -262,7 +262,7 @@ No authorization required |-------------|-------------|------------------| | **200** | OK | - | - + # **getHealth** > APIHealth getHealth() @@ -320,7 +320,7 @@ No authorization required |-------------|-------------|------------------| | **200** | Returns the API's health. | - | - + # **getInfoPush** > List<InfoPush> getInfoPush(require, include) @@ -391,7 +391,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a list of InfoPush objects. | - | - + # **getJavaScript** > String getJavaScript(variant, branch) @@ -456,7 +456,7 @@ No authorization required | **200** | **Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively. | - | | **400** | Error response when trying to download non-public and non-main JavaScript or CSS without Admin Credentials. | - | - + # **getPermission** > Permission getPermission(permissionId) @@ -526,7 +526,7 @@ public class Example { | **200** | Returns a single Permission object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getSystemTime** > OffsetDateTime getSystemTime() diff --git a/docs/NotificationDetailBoop.md b/docs/NotificationDetailBoop.md new file mode 100644 index 00000000..2c31831b --- /dev/null +++ b/docs/NotificationDetailBoop.md @@ -0,0 +1,16 @@ + + +# NotificationDetailBoop + +Either inventoryItemId by itself, or emojiId with optional emojiVersion + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**emojiId** | **String** | | [optional] | +|**emojiVersion** | **Integer** | | [optional] | +|**inventoryItemId** | **String** | | [optional] | + + + diff --git a/docs/NotificationType.md b/docs/NotificationType.md index 4ad0f42b..2fe83e60 100644 --- a/docs/NotificationType.md +++ b/docs/NotificationType.md @@ -7,17 +7,17 @@ * `BOOP` (value: `"boop"`) -* `FRIENDREQUEST` (value: `"friendRequest"`) +* `FRIEND_REQUEST` (value: `"friendRequest"`) * `INVITE` (value: `"invite"`) -* `INVITERESPONSE` (value: `"inviteResponse"`) +* `INVITE_RESPONSE` (value: `"inviteResponse"`) * `MESSAGE` (value: `"message"`) -* `REQUESTINVITE` (value: `"requestInvite"`) +* `REQUEST_INVITE` (value: `"requestInvite"`) -* `REQUESTINVITERESPONSE` (value: `"requestInviteResponse"`) +* `REQUEST_INVITE_RESPONSE` (value: `"requestInviteResponse"`) * `VOTETOKICK` (value: `"votetokick"`) diff --git a/docs/NotificationV2.md b/docs/NotificationV2.md index 59421d82..6ead1049 100644 --- a/docs/NotificationV2.md +++ b/docs/NotificationV2.md @@ -11,7 +11,7 @@ |**canDelete** | **Boolean** | | | |**category** | **String** | | | |**createdAt** | **OffsetDateTime** | | | -|**data** | **Map<String, String>** | | | +|**data** | [**NotificationV2Data**](NotificationV2Data.md) | | | |**details** | [**NotificationV2DetailsBoop**](NotificationV2DetailsBoop.md) | | [optional] | |**expiresAt** | **OffsetDateTime** | | | |**expiryAfterSeen** | **Integer** | | | diff --git a/docs/NotificationV2Data.md b/docs/NotificationV2Data.md new file mode 100644 index 00000000..17d7925f --- /dev/null +++ b/docs/NotificationV2Data.md @@ -0,0 +1,24 @@ + + +# NotificationV2Data + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**badgeDescription** | **String** | | | +|**badgeId** | **String** | | | +|**badgeName** | **String** | | | +|**boopingUserDisplayName** | **String** | | | +|**ownerId** | **String** | | | +|**ownerName** | **String** | | | +|**title** | **String** | | | +|**announcementTitle** | **String** | | | +|**groupId** | **String** | | | +|**groupName** | **String** | | | +|**transferTargetDisplayName** | **String** | | [optional] | +|**ownerUserDisplayName** | **String** | | | + + + diff --git a/docs/NotificationV2DataBadgeEarned.md b/docs/NotificationV2DataBadgeEarned.md new file mode 100644 index 00000000..15d0c385 --- /dev/null +++ b/docs/NotificationV2DataBadgeEarned.md @@ -0,0 +1,15 @@ + + +# NotificationV2DataBadgeEarned + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**badgeDescription** | **String** | | | +|**badgeId** | **String** | | | +|**badgeName** | **String** | | | + + + diff --git a/docs/NotificationV2DataBoop.md b/docs/NotificationV2DataBoop.md new file mode 100644 index 00000000..a9d27b6f --- /dev/null +++ b/docs/NotificationV2DataBoop.md @@ -0,0 +1,13 @@ + + +# NotificationV2DataBoop + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**boopingUserDisplayName** | **String** | | | + + + diff --git a/docs/NotificationV2DataEventAnnouncement.md b/docs/NotificationV2DataEventAnnouncement.md new file mode 100644 index 00000000..8e92bdf6 --- /dev/null +++ b/docs/NotificationV2DataEventAnnouncement.md @@ -0,0 +1,15 @@ + + +# NotificationV2DataEventAnnouncement + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ownerId** | **String** | | | +|**ownerName** | **String** | | | +|**title** | **String** | | | + + + diff --git a/docs/NotificationV2DataGroupAnnouncement.md b/docs/NotificationV2DataGroupAnnouncement.md new file mode 100644 index 00000000..a65421e4 --- /dev/null +++ b/docs/NotificationV2DataGroupAnnouncement.md @@ -0,0 +1,15 @@ + + +# NotificationV2DataGroupAnnouncement + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**announcementTitle** | **String** | | | +|**groupId** | **String** | | | +|**groupName** | **String** | | | + + + diff --git a/docs/NotificationV2DataGroupInformative.md b/docs/NotificationV2DataGroupInformative.md new file mode 100644 index 00000000..50b3811a --- /dev/null +++ b/docs/NotificationV2DataGroupInformative.md @@ -0,0 +1,15 @@ + + +# NotificationV2DataGroupInformative + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**groupId** | **String** | | | +|**groupName** | **String** | | | +|**transferTargetDisplayName** | **String** | | [optional] | + + + diff --git a/docs/NotificationV2DataGroupTransfer.md b/docs/NotificationV2DataGroupTransfer.md new file mode 100644 index 00000000..2c188584 --- /dev/null +++ b/docs/NotificationV2DataGroupTransfer.md @@ -0,0 +1,14 @@ + + +# NotificationV2DataGroupTransfer + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**groupName** | **String** | | | +|**ownerUserDisplayName** | **String** | | | + + + diff --git a/docs/NotificationV2Type.md b/docs/NotificationV2Type.md index 3575ba8f..d5d59288 100644 --- a/docs/NotificationV2Type.md +++ b/docs/NotificationV2Type.md @@ -29,13 +29,13 @@ * `GROUP_INVITE` (value: `"group.invite"`) -* `GROUP_JOINREQUEST` (value: `"group.joinRequest"`) +* `GROUP_JOIN_REQUEST` (value: `"group.joinRequest"`) * `GROUP_POST` (value: `"group.post"`) * `GROUP_TRANSFER` (value: `"group.transfer"`) -* `INVITE_INSTANCE_CONTENTGATED` (value: `"invite.instance.contentGated"`) +* `INVITE_INSTANCE_CONTENT_GATED` (value: `"invite.instance.contentGated"`) * `MODERATION_CONTENTRESTRICTION` (value: `"moderation.contentrestriction"`) diff --git a/docs/NotificationsApi.md b/docs/NotificationsApi.md index ae426eee..9f93f0d2 100644 --- a/docs/NotificationsApi.md +++ b/docs/NotificationsApi.md @@ -19,7 +19,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**respondNotificationV2**](NotificationsApi.md#respondNotificationV2) | **POST** /notifications/{notificationId}/respond | Respond NotificationV2 | - + # **acceptFriendRequest** > Success acceptFriendRequest(notificationId) @@ -90,7 +90,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to accept a non-existent friend request. | - | - + # **acknowledgeNotificationV2** > NotificationV2 acknowledgeNotificationV2(notificationId) @@ -157,11 +157,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single NotifcationV2 object. | - | +| **200** | Returns a single NotificationV2 object. | - | | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing notification. | - | - + # **clearNotifications** > Success clearNotifications() @@ -227,7 +227,7 @@ This endpoint does not need any parameter. | **200** | Successful response after clearing all notifications. | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteAllNotificationV2s** > Success deleteAllNotificationV2s() @@ -293,7 +293,7 @@ This endpoint does not need any parameter. | **200** | Successful response after clearing all notifications. | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteNotification** > Notification deleteNotification(notificationId) @@ -360,10 +360,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single Notifcation object. | - | +| **200** | Returns a single Notification object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteNotificationV2** > Success deleteNotificationV2(notificationId) @@ -435,7 +435,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing notification. | - | - + # **getNotification** > Notification getNotification(notificationId) @@ -502,11 +502,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single Notifcation object. | - | +| **200** | Returns a single Notification object. | - | | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing notification. | - | - + # **getNotificationV2** > NotificationV2 getNotificationV2(notificationId) @@ -573,12 +573,12 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single NotifcationV2 object. | - | +| **200** | Returns a single NotificationV2 object. | - | | **401** | Error response due to missing auth cookie. | - | | **403** | Error response due to missing Administrator credentials. | - | | **404** | Error response when trying to perform operations on a non-existing notification. | - | - + # **getNotificationV2s** > List<NotificationV2> getNotificationV2s(limit) @@ -645,10 +645,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a list of NotifcationV2 objects. | - | +| **200** | Returns a list of NotificationV2 objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getNotifications** > List<Notification> getNotifications(type, sent, hidden, after, n, offset) @@ -725,10 +725,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a list of Notifcation objects. | - | +| **200** | Returns a list of Notification objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **markNotificationAsRead** > Notification markNotificationAsRead(notificationId) @@ -795,10 +795,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single Notifcation object. | - | +| **200** | Returns a single Notification object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **replyNotificationV2** > NotificationV2 replyNotificationV2(notificationId, body) @@ -867,12 +867,12 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single NotifcationV2 object. | - | +| **200** | Returns a single NotificationV2 object. | - | | **400** | Error response when trying to perform an invalid operations on a notification. | - | | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing notification. | - | - + # **respondNotificationV2** > NotificationV2 respondNotificationV2(notificationId, respondNotificationV2Request) @@ -941,7 +941,7 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Returns a single NotifcationV2 object. | - | +| **200** | Returns a single NotificationV2 object. | - | | **400** | Error response when trying to perform an invalid operations on a notification. | - | | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing notification. | - | diff --git a/docs/PerformanceRatings.md b/docs/PerformanceRatings.md index 445cddbb..b8807847 100644 --- a/docs/PerformanceRatings.md +++ b/docs/PerformanceRatings.md @@ -15,7 +15,7 @@ * `POOR` (value: `"Poor"`) -* `VERYPOOR` (value: `"VeryPoor"`) +* `VERY_POOR` (value: `"VeryPoor"`) diff --git a/docs/PlayerModerationType.md b/docs/PlayerModerationType.md index 56d5d455..f287f6d7 100644 --- a/docs/PlayerModerationType.md +++ b/docs/PlayerModerationType.md @@ -7,21 +7,21 @@ * `BLOCK` (value: `"block"`) -* `HIDEAVATAR` (value: `"hideAvatar"`) +* `HIDE_AVATAR` (value: `"hideAvatar"`) -* `INTERACTOFF` (value: `"interactOff"`) +* `INTERACT_OFF` (value: `"interactOff"`) -* `INTERACTON` (value: `"interactOn"`) +* `INTERACT_ON` (value: `"interactOn"`) * `MUTE` (value: `"mute"`) -* `MUTECHAT` (value: `"muteChat"`) +* `MUTE_CHAT` (value: `"muteChat"`) -* `SHOWAVATAR` (value: `"showAvatar"`) +* `SHOW_AVATAR` (value: `"showAvatar"`) * `UNMUTE` (value: `"unmute"`) -* `UNMUTECHAT` (value: `"unmuteChat"`) +* `UNMUTE_CHAT` (value: `"unmuteChat"`) diff --git a/docs/PlayermoderationApi.md b/docs/PlayermoderationApi.md index 99f6e344..98f9df54 100644 --- a/docs/PlayermoderationApi.md +++ b/docs/PlayermoderationApi.md @@ -10,7 +10,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**unmoderateUser**](PlayermoderationApi.md#unmoderateUser) | **PUT** /auth/user/unplayermoderate | Unmoderate User | - + # **clearAllPlayerModerations** > Success clearAllPlayerModerations() @@ -76,7 +76,7 @@ This endpoint does not need any parameter. | **200** | Success response after e.g. clearing all player moderations. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getPlayerModerations** > List<PlayerModeration> getPlayerModerations(type, targetUserId) @@ -148,7 +148,7 @@ public class Example { | **200** | Returns a list of PlayerModeration objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **moderateUser** > PlayerModeration moderateUser(moderateUserRequest) @@ -218,7 +218,7 @@ public class Example { | **200** | Returns a single PlayerModeration object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **unmoderateUser** > Success unmoderateUser(moderateUserRequest) diff --git a/docs/PrintsApi.md b/docs/PrintsApi.md index edc10090..79670781 100644 --- a/docs/PrintsApi.md +++ b/docs/PrintsApi.md @@ -11,7 +11,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**uploadPrint**](PrintsApi.md#uploadPrint) | **POST** /prints | Upload Print | - + # **deletePrint** > deletePrint(printId) @@ -80,7 +80,7 @@ null (empty response body) | **200** | Empty response if successful | - | | **401** | Error response due to missing auth cookie. | - | - + # **editPrint** > Print editPrint(printId, image, note) @@ -154,7 +154,7 @@ public class Example { | **200** | Returns a single Print object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getPrint** > Print getPrint(printId) @@ -224,7 +224,7 @@ public class Example { | **200** | Returns a single Print object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserPrints** > List<Print> getUserPrints(userId) @@ -295,7 +295,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response when trying to request another user's prints. | - | - + # **uploadPrint** > Print uploadPrint(image, timestamp, note, worldId, worldName) diff --git a/docs/PrivateProfile.md b/docs/PrivateProfile.md new file mode 100644 index 00000000..de0f2b53 --- /dev/null +++ b/docs/PrivateProfile.md @@ -0,0 +1,18 @@ + + +# PrivateProfile + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**activity** | [**PrivateProfileActivity**](PrivateProfileActivity.md) | | [optional] | +|**id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional] | +|**isFriend** | **Boolean** | | [optional] | +|**note** | **String** | | [optional] | +|**status** | **UserStatus** | | [optional] | +|**statusDescription** | **String** | | [optional] | + + + diff --git a/docs/PrivateProfileActivity.md b/docs/PrivateProfileActivity.md new file mode 100644 index 00000000..dfc5a2a3 --- /dev/null +++ b/docs/PrivateProfileActivity.md @@ -0,0 +1,22 @@ + + +# PrivateProfileActivity + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**instanceId** | **String** | InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. | [optional] | +|**lastActivity** | **String** | Either a date-time or an empty string. | [optional] | +|**lastLogin** | **String** | Either a date-time or an empty string. | [optional] | +|**location** | **String** | Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list. | [optional] | +|**platform** | **String** | This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | [optional] | +|**state** | **UserState** | | [optional] | +|**travelingToInstance** | **String** | | [optional] | +|**travelingToLocation** | **String** | | [optional] | +|**travelingToWorld** | **String** | | [optional] | +|**worldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] | + + + diff --git a/docs/ProfileRepresentedGroup.md b/docs/ProfileRepresentedGroup.md new file mode 100644 index 00000000..08221b80 --- /dev/null +++ b/docs/ProfileRepresentedGroup.md @@ -0,0 +1,16 @@ + + +# ProfileRepresentedGroup + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bannerUrl** | **String** | | [optional] | +|**iconUrl** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/docs/PropsApi.md b/docs/PropsApi.md index 6beaa222..5e9214c3 100644 --- a/docs/PropsApi.md +++ b/docs/PropsApi.md @@ -14,7 +14,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**updateProp**](PropsApi.md#updateProp) | **PUT** /props/{propId} | Update Prop | - + # **createProp** > Prop createProp(createPropRequest) @@ -85,7 +85,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response due to missing permissions. | - | - + # **deleteProp** > deleteProp(propId) @@ -156,7 +156,7 @@ null (empty response body) | **403** | Error response due to missing permissions. | - | | **404** | Error response when trying to perform operations on a non-existing prop. | - | - + # **getProp** > Prop getProp(propId) @@ -227,7 +227,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to perform operations on a non-existing prop. | - | - + # **getPropPublishStatus** > PropPublishStatus getPropPublishStatus(propId) @@ -299,7 +299,7 @@ public class Example { | **403** | Error response due to missing permissions. | - | | **404** | Error response when trying to perform operations on a non-existing prop. | - | - + # **listProps** > List<Prop> listProps(authorId, n, offset) @@ -374,7 +374,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response due to missing permissions. | - | - + # **publishProp** > PropPublishStatus publishProp(propId) @@ -446,7 +446,7 @@ public class Example { | **403** | Error response due to missing permissions. | - | | **404** | Error response when trying to perform operations on a non-existing prop. | - | - + # **unpublishProp** > PropPublishStatus unpublishProp(propId) @@ -518,7 +518,7 @@ public class Example { | **403** | Error response due to missing permissions. | - | | **404** | Error response when trying to perform operations on a non-existing prop. | - | - + # **updateProp** > Prop updateProp(propId, updatePropRequest) diff --git a/docs/PublicProfile.md b/docs/PublicProfile.md new file mode 100644 index 00000000..be6d36a4 --- /dev/null +++ b/docs/PublicProfile.md @@ -0,0 +1,33 @@ + + +# PublicProfile + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ageVerificationStatus** | **AgeVerificationStatus** | | [optional] | +|**ageVerified** | **Boolean** | `true` if, user is age verified (not 18+). | [optional] | +|**backgroundType** | **String** | | [optional] | +|**badges** | [**List<Badge>**](Badge.md) | | [optional] | +|**bannerColor** | **String** | | [optional] | +|**bannerType** | **String** | | [optional] | +|**bio** | **String** | | [optional] | +|**bioLinks** | **List<String>** | | [optional] | +|**displayName** | **String** | | [optional] | +|**hasVrcPlus** | **Boolean** | | [optional] | +|**iconFrame** | **String** | | [optional] | +|**iconUrl** | **String** | | [optional] | +|**id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional] | +|**isEconomyCreator** | **Boolean** | | [optional] | +|**languages** | **List<String>** | | [optional] | +|**nameplateEffect** | **String** | | [optional] | +|**profileEffect** | **String** | | [optional] | +|**pronouns** | **String** | | [optional] | +|**representedGroup** | [**ProfileRepresentedGroup**](ProfileRepresentedGroup.md) | | [optional] | +|**themeId** | **String** | | [optional] | +|**trustTags** | **List<String>** | | [optional] | + + + diff --git a/docs/RegisterUserAccount200Response.md b/docs/RegisterUserAccount200Response.md new file mode 100644 index 00000000..303e69d0 --- /dev/null +++ b/docs/RegisterUserAccount200Response.md @@ -0,0 +1,95 @@ + + +# RegisterUserAccount200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**acceptedPrivacyVersion** | **Integer** | | [optional] | +|**acceptedTOSVersion** | **Integer** | | | +|**accountDeletionDate** | **LocalDate** | | [optional] | +|**accountDeletionLog** | [**List<AccountDeletionLog>**](AccountDeletionLog.md) | | [optional] | +|**activeFriends** | **List<String>** | | [optional] | +|**ageVerificationStatus** | **AgeVerificationStatus** | | | +|**ageVerified** | **Boolean** | `true` if, user is age verified (not 18+). | | +|**allowAvatarCopying** | **Boolean** | | | +|**appleDetails** | **Object** | | [optional] | +|**appleId** | **String** | | [optional] | +|**authToken** | **String** | The auth token for NEWLY REGISTERED ACCOUNTS ONLY (/auth/register) | [optional] | +|**badges** | [**List<Badge>**](Badge.md) | | [optional] | +|**bio** | **String** | | | +|**bioLinks** | **List<String>** | | | +|**contentFilters** | **List<String>** | These tags begin with `content_` and control content gating | [optional] | +|**currentAvatar** | **String** | | | +|**currentAvatarImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | | +|**currentAvatarTags** | **List<String>** | | | +|**currentAvatarThumbnailImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | | +|**dateJoined** | **LocalDate** | | | +|**developerType** | **DeveloperType** | | | +|**discordDetails** | [**DiscordDetails**](DiscordDetails.md) | | [optional] | +|**discordId** | **String** | https://discord.com/developers/docs/reference#snowflakes | [optional] | +|**displayName** | **String** | | | +|**emailVerified** | **Boolean** | | | +|**fallbackAvatar** | **String** | | [optional] | +|**friendGroupNames** | **List<String>** | Always empty array. | | +|**friendKey** | **String** | | | +|**friends** | **List<String>** | | | +|**googleDetails** | **Object** | | [optional] | +|**googleId** | **String** | | [optional] | +|**hasBirthday** | **Boolean** | | | +|**hasDiscordFriendsOptOut** | **Boolean** | | [optional] | +|**hasEmail** | **Boolean** | | | +|**hasLoggedInFromClient** | **Boolean** | | | +|**hasPendingEmail** | **Boolean** | | | +|**hasSharedConnectionsOptOut** | **Boolean** | | [optional] | +|**hideContentFilterSettings** | **Boolean** | | [optional] | +|**homeLocation** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | +|**id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | | +|**isAdult** | **Boolean** | | | +|**isBoopingEnabled** | **Boolean** | | [optional] | +|**isFriend** | **Boolean** | | | +|**lastActivity** | **OffsetDateTime** | | [optional] | +|**lastLogin** | **OffsetDateTime** | | | +|**lastMobile** | **OffsetDateTime** | | | +|**lastPlatform** | **String** | This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | | +|**obfuscatedEmail** | **String** | | | +|**obfuscatedPendingEmail** | **String** | | | +|**oculusId** | **String** | | | +|**offlineFriends** | **List<String>** | | [optional] | +|**onlineFriends** | **List<String>** | | [optional] | +|**pastDisplayNames** | [**List<PastDisplayName>**](PastDisplayName.md) | | | +|**picoId** | **String** | | [optional] | +|**platformHistory** | [**List<CurrentUserPlatformHistoryInner>**](CurrentUserPlatformHistoryInner.md) | | [optional] | +|**presence** | [**CurrentUserPresence**](CurrentUserPresence.md) | | [optional] | +|**profilePicOverride** | **String** | | | +|**profilePicOverrideThumbnail** | **String** | | | +|**pronouns** | **String** | | | +|**pronounsHistory** | **List<String>** | | | +|**queuedInstance** | **String** | | [optional] | +|**receiveMobileInvitations** | **Boolean** | | [optional] | +|**state** | **UserState** | | | +|**status** | **UserStatus** | | | +|**statusDescription** | **String** | | | +|**statusFirstTime** | **Boolean** | | | +|**statusHistory** | **List<String>** | | | +|**steamDetails** | **Object** | | | +|**steamId** | **String** | | | +|**tags** | **List<String>** | | | +|**twitchDetails** | **Object** | | [optional] | +|**twitchId** | **String** | | [optional] | +|**twoFactorAuthEnabled** | **Boolean** | | | +|**twoFactorAuthEnabledDate** | **OffsetDateTime** | | [optional] | +|**unsubscribe** | **Boolean** | | | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**userIcon** | **String** | | | +|**userLanguage** | **String** | | [optional] | +|**userLanguageCode** | **String** | | [optional] | +|**username** | **String** | -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). | [optional] | +|**usesGeneratedPassword** | **Boolean** | | | +|**viveId** | **String** | | [optional] | +|**requiresTwoFactorAuth** | **List<TwoFactorAuthType>** | | | + + + diff --git a/docs/RegisterUserAccountRequest.md b/docs/RegisterUserAccountRequest.md index 198d9e66..255ca710 100644 --- a/docs/RegisterUserAccountRequest.md +++ b/docs/RegisterUserAccountRequest.md @@ -13,7 +13,7 @@ |**email** | **String** | Email address | | |**month** | **String** | Birth month of year | | |**password** | **String** | Password | | -|**subscribe** | **Boolean** | Whether to recieve promotional emails | | +|**subscribe** | **Boolean** | Whether to receive promotional emails | | |**username** | **String** | Display Name / Username (Username is a sanitized version) | | |**year** | **String** | Birth year | | diff --git a/docs/RequiresTwoFactorAuth.md b/docs/RequiresTwoFactorAuth.md new file mode 100644 index 00000000..dad29056 --- /dev/null +++ b/docs/RequiresTwoFactorAuth.md @@ -0,0 +1,13 @@ + + +# RequiresTwoFactorAuth + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requiresTwoFactorAuth** | **List<TwoFactorAuthType>** | | | + + + diff --git a/docs/SentNotification.md b/docs/SentNotification.md index b8db15ac..fdc9ed92 100644 --- a/docs/SentNotification.md +++ b/docs/SentNotification.md @@ -9,7 +9,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**createdAt** | **OffsetDateTime** | | | -|**details** | **Map<String, String>** | | | +|**details** | [**SentNotificationDetails**](SentNotificationDetails.md) | | | |**id** | **String** | | | |**message** | **String** | | | |**receiverUserId** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | | diff --git a/docs/SentNotificationDetails.md b/docs/SentNotificationDetails.md new file mode 100644 index 00000000..61bbe94c --- /dev/null +++ b/docs/SentNotificationDetails.md @@ -0,0 +1,24 @@ + + +# SentNotificationDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**emojiId** | **String** | | [optional] | +|**emojiVersion** | **Integer** | | [optional] | +|**inventoryItemId** | **String** | | [optional] | +|**inviteMessage** | **String** | | [optional] | +|**worldId** | **String** | Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list. | | +|**worldName** | **String** | | | +|**inResponseTo** | **String** | | | +|**responseMessage** | **String** | | | +|**platform** | **String** | This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | [optional] | +|**requestMessage** | **String** | Used when using InviteMessage Slot. | [optional] | +|**initiatorUserId** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | | +|**userToKickId** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | | + + + diff --git a/docs/SortOption.md b/docs/SortOption.md index 9a31b4d0..d2fa9c3f 100644 --- a/docs/SortOption.md +++ b/docs/SortOption.md @@ -15,7 +15,7 @@ * `HEAT` (value: `"heat"`) -* `LABSPUBLICATIONDATE` (value: `"labsPublicationDate"`) +* `LABS_PUBLICATION_DATE` (value: `"labsPublicationDate"`) * `MAGIC` (value: `"magic"`) @@ -25,15 +25,15 @@ * `POPULARITY` (value: `"popularity"`) -* `PUBLICATIONDATE` (value: `"publicationDate"`) +* `PUBLICATION_DATE` (value: `"publicationDate"`) * `RANDOM` (value: `"random"`) * `RELEVANCE` (value: `"relevance"`) -* `REPORTCOUNT` (value: `"reportCount"`) +* `REPORT_COUNT` (value: `"reportCount"`) -* `REPORTSCORE` (value: `"reportScore"`) +* `REPORT_SCORE` (value: `"reportScore"`) * `SHUFFLE` (value: `"shuffle"`) diff --git a/docs/SortOptionProductPurchase.md b/docs/SortOptionProductPurchase.md index 8787544d..52c17658 100644 --- a/docs/SortOptionProductPurchase.md +++ b/docs/SortOptionProductPurchase.md @@ -5,7 +5,7 @@ ## Enum -* `PURCHASEDATE` (value: `"purchaseDate"`) +* `PURCHASE_DATE` (value: `"purchaseDate"`) diff --git a/docs/StoreView.md b/docs/StoreView.md index f2e3e610..ab899504 100644 --- a/docs/StoreView.md +++ b/docs/StoreView.md @@ -13,7 +13,7 @@ * `PUBLIC` (value: `"public"`) -* `PUBLICPREVIEW` (value: `"publicPreview"`) +* `PUBLIC_PREVIEW` (value: `"publicPreview"`) diff --git a/docs/TwoFactorAuthType.md b/docs/TwoFactorAuthType.md new file mode 100644 index 00000000..a83d43f5 --- /dev/null +++ b/docs/TwoFactorAuthType.md @@ -0,0 +1,15 @@ + + +# TwoFactorAuthType + +## Enum + + +* `EMAIL_OTP` (value: `"emailOtp"`) + +* `OTP` (value: `"otp"`) + +* `TOTP` (value: `"totp"`) + + + diff --git a/docs/UpdateUserRequest.md b/docs/UpdateUserRequest.md index 7b6fe32e..bfbd4ead 100644 --- a/docs/UpdateUserRequest.md +++ b/docs/UpdateUserRequest.md @@ -15,6 +15,7 @@ |**currentPassword** | **String** | | [optional] | |**displayName** | **String** | MUST specify currentPassword as well to change display name | [optional] | |**email** | **String** | | [optional] | +|**hasDiscordFriendsOptOut** | **Boolean** | Opt out of the Discord Friend Connections feature | [optional] | |**hasSharedConnectionsOptOut** | **Boolean** | Opt out of the Mutuals feature | [optional] | |**isBoopingEnabled** | **Boolean** | | [optional] | |**password** | **String** | MUST specify currentPassword as well to change password | [optional] | diff --git a/docs/User.md b/docs/User.md index 3fa33e5c..48d2734e 100644 --- a/docs/User.md +++ b/docs/User.md @@ -11,6 +11,8 @@ |**ageVerified** | **Boolean** | `true` if, user is age verified (not 18+). | | |**allowAvatarCopying** | **Boolean** | | | |**badges** | [**List<Badge>**](Badge.md) | | [optional] | +|**bannerType** | **String** | | [optional] | +|**bannerUrl** | **String** | | [optional] | |**bio** | **String** | | | |**bioLinks** | **List<String>** | | | |**currentAvatarImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | | @@ -21,16 +23,21 @@ |**displayName** | **String** | A users visual display name. This is what shows up in-game, and can different from their `username`. Changing display name is restricted to a cooldown period. | | |**friendKey** | **String** | | | |**friendRequestStatus** | **String** | | [optional] | +|**iconFrame** | **String** | | [optional] | +|**iconUrl** | **String** | | [optional] | |**id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | | |**instanceId** | **String** | InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. | [optional] | +|**isEconomyCreator** | **Boolean** | | [optional] | |**isFriend** | **Boolean** | Either their `friendKey`, or empty string if you are not friends. Unknown usage. | | |**lastActivity** | **String** | Either a date-time or empty string. | | |**lastLogin** | **String** | Either a date-time or empty string. | | |**lastMobile** | **String** | | [optional] | |**lastPlatform** | **String** | This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | | |**location** | **String** | Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list. | [optional] | +|**nameplateEffect** | **String** | | [optional] | |**note** | **String** | | [optional] | |**platform** | **String** | | [optional] | +|**profileEffect** | **String** | | [optional] | |**profilePicOverride** | **String** | | | |**profilePicOverrideThumbnail** | **String** | | | |**pronouns** | **String** | | | diff --git a/docs/UsersApi.md b/docs/UsersApi.md index 4cffb1aa..39dff54f 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -13,6 +13,8 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**getMutualFriends**](UsersApi.md#getMutualFriends) | **GET** /users/{userId}/mutuals/friends | Get User Mutual Friends | | [**getMutualGroups**](UsersApi.md#getMutualGroups) | **GET** /users/{userId}/mutuals/groups | Get User Mutual Groups | | [**getMutuals**](UsersApi.md#getMutuals) | **GET** /users/{userId}/mutuals | Get User Mutuals | +| [**getPrivateProfile**](UsersApi.md#getPrivateProfile) | **GET** /profile/{userId}/private | Get Private Profile | +| [**getPublicProfile**](UsersApi.md#getPublicProfile) | **GET** /profile/{userId} | Get Public Profile | | [**getUser**](UsersApi.md#getUser) | **GET** /users/{userId} | Get User by ID | | [**getUserAllGroupPermissions**](UsersApi.md#getUserAllGroupPermissions) | **GET** /users/{userId}/groups/permissions | Get user's permissions for all joined groups. | | [**getUserByName**](UsersApi.md#getUserByName) | **GET** /users/{username}/name | Get User by Username | @@ -32,7 +34,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**updateUserNote**](UsersApi.md#updateUserNote) | **POST** /userNotes | Update User Note | - + # **addTags** > CurrentUser addTags(userId, changeUserTagsRequest) @@ -105,7 +107,7 @@ public class Example { | **400** | Error response when a user attempts to add an invalid, restricted, or duplicate tag to their profile, attempts to add tags above the limit for their profile, or attempts to remove invalid, restricted, or absent tag from their profile. | - | | **401** | Error response due to missing auth cookie. | - | - + # **checkUserPersistenceExists** > checkUserPersistenceExists(userId, worldId) @@ -177,7 +179,7 @@ null (empty response body) | **401** | Error response due to missing auth cookie. | - | | **404** | The user does not have persistence data for the given world. | - | - + # **deleteAllUserPersistenceData** > deleteAllUserPersistenceData(userId) @@ -246,7 +248,7 @@ null (empty response body) | **200** | The user's persistence data for all worlds is deleted. | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteUserPersistence** > deleteUserPersistence(userId, worldId) @@ -318,7 +320,7 @@ null (empty response body) | **401** | Error response due to missing auth cookie. | - | | **404** | The user does not have persistence data for the given world. | - | - + # **getBlockedGroups** > List<Group> getBlockedGroups(userId) @@ -388,7 +390,7 @@ public class Example { | **200** | Returns a list of Group objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getInvitedGroups** > List<Group> getInvitedGroups(userId) @@ -458,7 +460,7 @@ public class Example { | **200** | Returns a list of Group objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getMutualFriends** > List<MutualFriend> getMutualFriends(userId, n, offset) @@ -532,7 +534,7 @@ public class Example { | **200** | Returns a list of MutualFriend objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getMutualGroups** > List<LimitedUserGroups> getMutualGroups(userId, n, offset) @@ -606,7 +608,7 @@ public class Example { | **200** | Returns a list of LimitedUserGroups objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getMutuals** > Mutuals getMutuals(userId) @@ -676,7 +678,147 @@ public class Example { | **200** | Returns a single Mutuals object. | - | | **401** | Error response due to missing auth cookie. | - | - + +# **getPrivateProfile** +> PrivateProfile getPrivateProfile(userId) + +Get Private Profile + +Get profile information visible to the currently authenticated user. + +### Example +```java +// Import classes: +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.auth.*; +import io.github.vrchatapi.models.*; +import io.github.vrchatapi.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); + + // Configure API key authorization: authCookie + ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); + authCookie.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //authCookie.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + PrivateProfile result = apiInstance.getPrivateProfile(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getPrivateProfile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | + +### Return type + +[**PrivateProfile**](PrivateProfile.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns profile data visible to the authenticated user. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getPublicProfile** +> PublicProfile getPublicProfile(userId) + +Get Public Profile + +Get a user's public profile information. + +### Example +```java +// Import classes: +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.auth.*; +import io.github.vrchatapi.models.*; +import io.github.vrchatapi.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); + + // Configure API key authorization: authCookie + ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); + authCookie.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //authCookie.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + PublicProfile result = apiInstance.getPublicProfile(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getPublicProfile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | + +### Return type + +[**PublicProfile**](PublicProfile.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a user's public profile. | - | +| **401** | Error response due to missing auth cookie. | - | + + # **getUser** > User getUser(userId) @@ -746,7 +888,7 @@ public class Example { | **200** | Returns a single User object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserAllGroupPermissions** > Map<String, List<GroupPermissions>> getUserAllGroupPermissions(userId, groupIds) @@ -818,7 +960,7 @@ public class Example { | **200** | The group permissions the user has for every joined group. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserByName** > User getUserByName(username) @@ -888,7 +1030,7 @@ public class Example { | **200** | Returns a single User object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserFeedback** > List<Feedback> getUserFeedback(userId, contentId, n, offset) @@ -964,7 +1106,7 @@ public class Example { | **200** | Returns a list of Feedback objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserGroupInstances** > GetUserGroupInstances200Response getUserGroupInstances(userId) @@ -1035,7 +1177,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response when trying get group instances of another user. | - | - + # **getUserGroupInstancesForGroup** > GetUserGroupInstances200Response getUserGroupInstancesForGroup(userId, groupId) @@ -1108,7 +1250,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response when trying get group instances of another user. | - | - + # **getUserGroupRequests** > List<Group> getUserGroupRequests(userId) @@ -1178,7 +1320,7 @@ public class Example { | **200** | Returns a list of Group objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserGroups** > List<LimitedUserGroups> getUserGroups(userId) @@ -1248,7 +1390,7 @@ public class Example { | **200** | Returns a list of LimitedUserGroups objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserNote** > UserNote getUserNote(userNoteId) @@ -1318,7 +1460,7 @@ public class Example { | **200** | Returns a single UserNote object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserNotes** > List<UserNote> getUserNotes(n, offset) @@ -1390,7 +1532,7 @@ public class Example { | **200** | Returns a list of UserNote objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserRepresentedGroup** > RepresentedGroup getUserRepresentedGroup(userId) @@ -1460,7 +1602,7 @@ public class Example { | **200** | OK | - | | **401** | Error response due to missing auth cookie. | - | - + # **getUserTutorialStatus** > TutorialStatus getUserTutorialStatus(userId) @@ -1530,7 +1672,7 @@ public class Example { | **200** | Returns a single TutorialStatus object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **removeTags** > CurrentUser removeTags(userId, changeUserTagsRequest) @@ -1603,7 +1745,7 @@ public class Example { | **400** | Error response when a user attempts to add an invalid, restricted, or duplicate tag to their profile, attempts to add tags above the limit for their profile, or attempts to remove invalid, restricted, or absent tag from their profile. | - | | **401** | Error response due to missing auth cookie. | - | - + # **searchUsers** > List<LimitedUserSearch> searchUsers(search, developerType, n, offset, isInternalVariant) @@ -1682,7 +1824,7 @@ public class Example { | **400** | Error response when trying to search list of users with an invalid request. | - | | **401** | Error response due to missing auth cookie. | - | - + # **updateBadge** > updateBadge(userId, badgeId, updateUserBadgeRequest) @@ -1757,7 +1899,7 @@ null (empty response body) | **403** | Error response when trying get group instances of another user. | - | | **404** | The user does not have the badge. | - | - + # **updateUser** > CurrentUser updateUser(userId, updateUserRequest) @@ -1830,7 +1972,7 @@ public class Example { | **400** | Error response when a user attempts to change a property without supplying their current password. | - | | **401** | Error response due to missing auth cookie. | - | - + # **updateUserNote** > UserNote updateUserNote(updateUserNoteRequest) diff --git a/docs/WorldsApi.md b/docs/WorldsApi.md index 7ba51002..2f7b1427 100644 --- a/docs/WorldsApi.md +++ b/docs/WorldsApi.md @@ -25,7 +25,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* | [**updateWorld**](WorldsApi.md#updateWorld) | **PUT** /worlds/{worldId} | Update World | - + # **addWorldTags** > World addWorldTags(worldId, changeWorldTagsRequest) @@ -98,7 +98,7 @@ public class Example { | **400** | Error response when a world owner attempts to add an invalid, restricted, or duplicate tag to a world's profile, attempts to add tags above the limit for its profile, or attempts to remove invalid, restricted, or absent tag from its profile. | - | | **401** | Error response due to missing auth cookie. | - | - + # **checkUserPersistenceExists** > checkUserPersistenceExists(userId, worldId) @@ -170,7 +170,7 @@ null (empty response body) | **401** | Error response due to missing auth cookie. | - | | **404** | The user does not have persistence data for the given world. | - | - + # **createWorld** > World createWorld(createWorldRequest) @@ -231,10 +231,10 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Returns a single World object. | - | -| **400** | Error response when trying create a world without having the neccesary Trust rank yet. | - | +| **400** | Error response when trying create a world without having the necessary Trust rank yet. | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteAllUserPersistenceData** > deleteAllUserPersistenceData(userId) @@ -303,7 +303,7 @@ null (empty response body) | **200** | The user's persistence data for all worlds is deleted. | - | | **401** | Error response due to missing auth cookie. | - | - + # **deleteUserPersistence** > deleteUserPersistence(userId, worldId) @@ -375,7 +375,7 @@ null (empty response body) | **401** | Error response due to missing auth cookie. | - | | **404** | The user does not have persistence data for the given world. | - | - + # **deleteWorld** > deleteWorld(worldId) @@ -445,7 +445,7 @@ null (empty response body) | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. | - | - + # **deleteWorldPlatform** > deleteWorldPlatform(worldId, publishedPlatform) @@ -517,7 +517,7 @@ null (empty response body) | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. | - | - + # **getActiveWorlds** > List<LimitedWorld> getActiveWorlds(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform) @@ -611,7 +611,7 @@ public class Example { | **200** | Returns a list of LimitedWorld objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getFavoritedWorlds** > List<FavoritedWorld> getFavoritedWorlds(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId) @@ -704,9 +704,9 @@ public class Example { |-------------|-------------|------------------| | **200** | Returns a list of FavoritedWorld objects. | - | | **401** | Error response due to missing auth cookie. | - | -| **403** | Error response when trying to see favourited worlds of another user without sufficient admin permissions. | - | +| **403** | Error response when trying to see favorited worlds of another user without sufficient admin permissions. | - | - + # **getRecentWorlds** > List<LimitedWorld> getRecentWorlds(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId) @@ -801,7 +801,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **403** | Error response when trying to see recently visited worlds of another user without sufficient admin permissions. | - | - + # **getWorld** > World getWorld(worldId) @@ -864,7 +864,7 @@ No authorization required | **200** | Returns a single World object. | - | | **404** | Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. | - | - + # **getWorldInstance** > Instance getWorldInstance(worldId, instanceId) @@ -936,7 +936,7 @@ public class Example { | **200** | Returns a single Instance object. | - | | **401** | Error response due to missing auth cookie. | - | - + # **getWorldMetadata** > WorldMetadata getWorldMetadata(worldId) @@ -999,7 +999,7 @@ No authorization required | **200** | OK | - | | **404** | Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. | - | - + # **getWorldPublishStatus** > WorldPublishStatus getWorldPublishStatus(worldId) @@ -1070,7 +1070,7 @@ public class Example { | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. | - | - + # **publishWorld** > publishWorld(worldId) @@ -1140,7 +1140,7 @@ null (empty response body) | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. | - | - + # **removeWorldTags** > World removeWorldTags(worldId, changeWorldTagsRequest) @@ -1213,7 +1213,7 @@ public class Example { | **400** | Error response when a world owner attempts to add an invalid, restricted, or duplicate tag to a world's profile, attempts to add tags above the limit for its profile, or attempts to remove invalid, restricted, or absent tag from its profile. | - | | **401** | Error response due to missing auth cookie. | - | - + # **searchWorlds** > List<LimitedWorld> searchWorlds(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform, fuzzy, avatarSpecific) @@ -1315,7 +1315,7 @@ public class Example { | **200** | Returns a list of LimitedWorld objects. | - | | **401** | Error response due to missing auth cookie. | - | - + # **unpublishWorld** > unpublishWorld(worldId) @@ -1385,7 +1385,7 @@ null (empty response body) | **401** | Error response due to missing auth cookie. | - | | **404** | Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. | - | - + # **updateWorld** > World updateWorld(worldId, updateWorldRequest) diff --git a/generate.sh b/generate.sh index a98f91d0..063e311b 100755 --- a/generate.sh +++ b/generate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ ${#} -le 0 ] then @@ -36,4 +36,4 @@ sed -i '/addNetworkInterceptor/a \ builder.cookieJar(new io.github.vrchatapi.util.SimpleOkHttpCookieJar());' src/main/java/io/github/vrchatapi/ApiClient.java # Remove messily pasted markdown at top of every file -find src -type f -exec sed -i '/VRChat API Banner/d' {} \; \ No newline at end of file +find src -type f -exec sed -i '/VRChat API Banner/d' {} \; diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f..e6441136 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a25..b82aa23a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 005bcde0..9d0ce634 100644 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -69,37 +69,35 @@ app_path=$0 # Need this for daisy-chained symlinks. while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] +APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path +[ -h "$app_path" ] do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac +ls=$( ls -ld "$app_path" ) +link=${ls#*' -> '} +case $link in #( +/*) app_path=$link ;; #( +*) app_path=$APP_HOME$link ;; +esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum warn () { - echo "$*" +echo "$*" } >&2 die () { - echo - echo "$*" - echo - exit 1 +echo +echo "$*" +echo +exit 1 } >&2 # OS specific support (must be 'true' or 'false'). @@ -108,10 +106,10 @@ msys=false darwin=false nonstop=false case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; +CYGWIN* ) cygwin=true ;; #( +Darwin* ) darwin=true ;; #( +MSYS* | MINGW* ) msys=true ;; #( +NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -119,39 +117,46 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME +if [ -x "$JAVA_HOME/jre/sh/java" ] ; then +# IBM's JDK on AIX uses strange locations for the executables +JAVACMD=$JAVA_HOME/jre/sh/java +else +JAVACMD=$JAVA_HOME/bin/java +fi +if [ ! -x "$JAVACMD" ] ; then +die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." - fi +fi else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +JAVACMD=java +if ! command -v java >/dev/null 2>&1 +then +die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi +fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac +case $MAX_FD in #( +max*) +# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +MAX_FD=$( ulimit -H -n ) || +warn "Could not query maximum file descriptor limit" +esac +case $MAX_FD in #( +'' | soft) :;; #( +*) +# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. +# shellcheck disable=SC2039,SC3045 +ulimit -n "$MAX_FD" || +warn "Could not set maximum file descriptor limit to $MAX_FD" +esac fi # Collect all arguments for the java command, stacking in reverse order: @@ -164,46 +169,56 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done +APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) +CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + +JAVACMD=$( cygpath --unix "$JAVACMD" ) + +# Now convert the arguments - kludge to limit ourselves to /bin/sh +for arg do +if +case $arg in #( +-*) false ;; # don't mess with options #( +/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath +[ -e "$t" ] ;; #( +*) false ;; +esac +then +arg=$( cygpath --path --ignore --mixed "$arg" ) +fi +# Roll the args list around exactly as many times as the number of +# args, so each arg winds up back in the position where it started, but +# possibly modified. +# +# NB: a `for` loop captures its iteration list before it begins, so +# changing the positional parameters here affects neither the number of +# iterations, nor the values presented in `arg`. +shift # remove old arg +set -- "$@" "$arg" # push replacement arg +done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" +"-Dorg.gradle.appname=$APP_BASE_NAME" \ +-classpath "$CLASSPATH" \ +org.gradle.wrapper.GradleWrapperMain \ +"$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then +die "xargs is not available" +fi # Use "xargs" to parse quoted args. # @@ -225,10 +240,10 @@ set -- \ # eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' +printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | +xargs -n1 | +sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | +tr '\n' ' ' +)" '"$@"' exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 6a68175e..25da30db 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -33,20 +34,20 @@ set APP_HOME=%DIRNAME% for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/openapitools.json b/openapitools.json index f5f966a1..f29b197f 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "6.2.1" + "version": "7.24.0" } } diff --git a/package-lock.json b/package-lock.json index 961a60bf..bf4cab65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,13 +5,14 @@ "packages": { "": { "dependencies": { - "@openapitools/openapi-generator-cli": "^2.32.0" + "@openapitools/openapi-generator-cli": "^2.40.1" } }, "node_modules/@borewit/text-codec": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.2.2.tgz", "integrity": "sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==", + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/Borewit" @@ -83,11 +84,12 @@ } }, "node_modules/@nestjs/common": { - "version": "11.1.17", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.17.tgz", - "integrity": "sha512-hLODw5Abp8OQgA+mUO4tHou4krKgDtUcM9j5Ihxncst9XeyxYBTt2bwZm4e4EQr5E352S4Fyy6V3iFx9ggxKAg==", + "version": "11.1.28", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.28.tgz", + "integrity": "sha512-bRImsxibie+AM7xjdwcrm/gr5YeacI65kSBNzTufa1Ib5iwziaY/lqMtRh9THq6pbV4e1HP9aI2ZxGUumnmaoQ==", + "license": "MIT", "dependencies": { - "file-type": "21.3.2", + "file-type": "21.3.4", "iterare": "1.2.1", "load-esm": "1.0.3", "tslib": "2.8.1", @@ -113,12 +115,11 @@ } }, "node_modules/@nestjs/core": { - "version": "11.1.18", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-11.1.18.tgz", - "integrity": "sha512-wR3DtGyk/LUAiPtbXDuWJJwVkWElKBY0sqnTzf9d4uM3+X18FRZhK7WFc47czsIGOdWuRsMeLYV+1Z9dO4zDEQ==", - "hasInstallScript": true, + "version": "11.1.28", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-11.1.28.tgz", + "integrity": "sha512-06m63xIRj8+l8uOeh/8LnYupGubkyu4f+bPKIadaSui6vK9KpXgoz7HveT1yOVLcEt0M0oCOEW5EuEXZkEmBBQ==", + "license": "MIT", "dependencies": { - "@nuxt/opencollective": "0.4.1", "fast-safe-stringify": "2.1.1", "iterare": "1.2.1", "path-to-regexp": "8.4.2", @@ -152,21 +153,6 @@ } } }, - "node_modules/@nuxt/opencollective": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@nuxt/opencollective/-/opencollective-0.4.1.tgz", - "integrity": "sha512-GXD3wy50qYbxCJ652bDrDzgMr3NFEkIS374+IgFQKkCvk9yiYcLvX2XDYr7UyQxf4wK0e+yqDYRubZ0DtOxnmQ==", - "dependencies": { - "consola": "^3.2.3" - }, - "bin": { - "opencollective": "bin/opencollective.js" - }, - "engines": { - "node": "^14.18.0 || >=16.10.0", - "npm": ">=5.10.0" - } - }, "node_modules/@nuxtjs/opencollective": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", @@ -190,25 +176,26 @@ "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==" }, "node_modules/@openapitools/openapi-generator-cli": { - "version": "2.32.0", - "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.32.0.tgz", - "integrity": "sha512-9HZ3fp3cankdUC89UNsnW+HZFmRUadjjtqOvIIo6/D+bAVs+VJRqyhDy4rT4/cxqcLhXw40njs/vJLj21r60JA==", + "version": "2.40.1", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.40.1.tgz", + "integrity": "sha512-cZsMY3DhFduUlTL9a0L0h4MKNGBvIutxuZSTGTyeUgKbmYeAdrfyRYdGaPtdO3lCcuu3pDs6v9stuZFGkYbe9w==", "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { "@inquirer/select": "1.3.3", "@nestjs/axios": "4.0.1", - "@nestjs/common": "11.1.17", - "@nestjs/core": "11.1.18", + "@nestjs/common": "11.1.28", + "@nestjs/core": "11.1.28", "@nuxtjs/opencollective": "0.3.2", - "axios": "^1.15.0", + "axios": "^1.18.1", "chalk": "4.1.2", "commander": "8.3.0", "compare-versions": "6.1.1", - "concurrently": "9.2.1", + "concurrently": "^10.0.3", "console.table": "0.10.0", - "fs-extra": "11.3.4", + "fs-extra": "11.4.0", "glob": "13.0.6", - "proxy-agent": "6.5.0", + "proxy-agent": "8.0.2", "reflect-metadata": "0.2.2", "rxjs": "7.8.2", "tslib": "2.8.1" @@ -217,7 +204,7 @@ "openapi-generator-cli": "main.js" }, "engines": { - "node": ">=20.19.0" + "node": ">=22.0.0" }, "funding": { "type": "opencollective", @@ -228,6 +215,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/@tokenizer/inflate/-/inflate-0.4.1.tgz", "integrity": "sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==", + "license": "MIT", "dependencies": { "debug": "^4.4.3", "token-types": "^6.1.1" @@ -243,12 +231,8 @@ "node_modules/@tokenizer/token": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" - }, - "node_modules/@tootallnate/quickjs-emscripten": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", - "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==" + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "license": "MIT" }, "node_modules/@types/mute-stream": { "version": "0.0.4", @@ -272,11 +256,15 @@ "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==" }, "node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, "engines": { - "node": ">= 14" + "node": ">= 6.0.0" } }, "node_modules/ansi-escapes": { @@ -319,6 +307,7 @@ "version": "0.13.4", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "license": "MIT", "dependencies": { "tslib": "^2.0.1" }, @@ -329,26 +318,21 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, "node_modules/axios": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.15.2.tgz", - "integrity": "sha512-wLrXxPtcrPTsNlJmKjkPnNPK2Ihe0hn0wGSaTEiHRPxwjvJwT3hKmXF4dpqxmPO9SoNb2FsYXj/xEo0gHN+D5A==", - "dependencies": { - "follow-redirects": "^1.15.11", - "form-data": "^4.0.5", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.19.0.tgz", + "integrity": "sha512-ht/iuYZXEjFxLH/Hkezgd7m6JKlHHXEUSneaDz8uZe1Gj5QZtCnpyDsckvAiEnT89OEbCLmnte4R4sn7P0EKFw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" } }, - "node_modules/axios/node_modules/proxy-from-env": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", - "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", - "engines": { - "node": ">=10" - } - }, "node_modules/balanced-match": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", @@ -358,9 +342,10 @@ } }, "node_modules/basic-ftp": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", - "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.3.1.tgz", + "integrity": "sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==", + "license": "MIT", "engines": { "node": ">=10.0.0" } @@ -380,6 +365,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" @@ -423,29 +409,93 @@ } }, "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "license": "ISC", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -480,6 +530,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -501,48 +552,51 @@ "integrity": "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==" }, "node_modules/concurrently": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz", - "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-10.0.4.tgz", + "integrity": "sha512-trZql+7l/0+WRAsAnEdctr4+iiOS6ZrViI6H8QWcCF9MFS/LT0dKpe8vluB1to6it+OxSI4VospFTIFMW8DJRw==", + "license": "MIT", "dependencies": { - "chalk": "4.1.2", + "chalk": "5.6.2", "rxjs": "7.8.2", - "shell-quote": "1.8.3", - "supports-color": "8.1.1", + "shell-quote": "1.9.0", + "supports-color": "10.2.2", "tree-kill": "1.2.2", - "yargs": "17.7.2" + "yargs": "18.0.0" }, "bin": { - "conc": "dist/bin/concurrently.js", - "concurrently": "dist/bin/concurrently.js" + "conc": "dist/bin/index.js", + "concurrently": "dist/bin/index.js" }, "engines": { - "node": ">=18" + "node": ">=22" }, "funding": { "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, - "node_modules/concurrently/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dependencies": { - "has-flag": "^4.0.0" - }, + "node_modules/concurrently/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "license": "MIT", "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/consola": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", - "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "node_modules/concurrently/node_modules/supports-color": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", + "license": "MIT", "engines": { - "node": "^14.18.0 || >=16.10.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/console.table": { @@ -557,17 +611,19 @@ } }, "node_modules/data-uri-to-buffer": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", - "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-8.0.0.tgz", + "integrity": "sha512-6UHfyCux51b8PTGDgveqtz1tvphBku5DrMKKJbFAZAJOI2zsjDpDoYE1+QGj7FOMS4BdTFNJsJiR3zEB0xH0yQ==", + "license": "MIT", "engines": { - "node": ">= 14" + "node": ">= 20" } }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -590,22 +646,27 @@ } }, "node_modules/degenerator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", - "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-7.0.1.tgz", + "integrity": "sha512-ABErK0IefDSyHjlPH7WUEenIAX2rPPnrDcDM+TS3z3+zu9TfyKKi07BQM+8rmxpdE2y1v5fjjdoAS/x4D2U60w==", + "license": "MIT", "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", "esprima": "^4.0.1" }, "engines": { - "node": ">= 14" + "node": ">= 20" + }, + "peerDependencies": { + "quickjs-wasi": "^2.2.0" } }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -614,6 +675,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", @@ -640,6 +702,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -648,14 +711,16 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0" }, @@ -667,6 +732,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", @@ -681,6 +747,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -697,6 +764,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "license": "BSD-2-Clause", "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -717,6 +785,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -729,6 +798,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -737,6 +807,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -744,7 +815,8 @@ "node_modules/fast-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "license": "MIT" }, "node_modules/figures": { "version": "3.2.0", @@ -761,9 +833,10 @@ } }, "node_modules/file-type": { - "version": "21.3.2", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.2.tgz", - "integrity": "sha512-DLkUvGwep3poOV2wpzbHCOnSKGk1LzyXTv+aHFgN2VFl96wnp8YA9YjO2qPzg5PuL8q/SW9Pdi6WTkYOIh995w==", + "version": "21.3.4", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.4.tgz", + "integrity": "sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==", + "license": "MIT", "dependencies": { "@tokenizer/inflate": "^0.4.1", "strtok3": "^10.3.4", @@ -778,15 +851,16 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -797,24 +871,26 @@ } }, "node_modules/form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" + "hasown": "^2.0.4", + "mime-types": "^2.1.35" }, "engines": { "node": ">= 6" } }, "node_modules/fs-extra": { - "version": "11.3.4", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.4.tgz", - "integrity": "sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.4.0.tgz", + "integrity": "sha512-EQsFzMUJkCKGr1ePqlYADkIUmHW1s3ZXr5Yqy6wbGrfUCphpl2maM/kyOIRA2HpP3AaFQTZXD4ldjek+nccddA==", + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -828,6 +904,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -836,14 +913,28 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", + "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", @@ -867,6 +958,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" @@ -876,16 +968,17 @@ } }, "node_modules/get-uri": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz", - "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-8.0.1.tgz", + "integrity": "sha512-/5N/P4Lrh0p/mDwlDRi7Y1+P2o/OyzZI3l6Iz1Ov6XXwwm1y3RlZLuo3gVgML99djrEDtV980bBxSuOeHLk8ww==", + "license": "MIT", "dependencies": { - "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^6.0.2", + "basic-ftp": "^5.3.1", + "data-uri-to-buffer": "8.0.0", "debug": "^4.3.4" }, "engines": { - "node": ">= 14" + "node": ">= 20" } }, "node_modules/glob": { @@ -908,6 +1001,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -918,7 +1012,8 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" }, "node_modules/has-flag": { "version": "4.0.0", @@ -932,6 +1027,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -943,6 +1039,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" }, @@ -954,9 +1051,10 @@ } }, "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -965,27 +1063,39 @@ } }, "node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-9.1.0.tgz", + "integrity": "sha512-2NxoveTT58mjYT4n3RPTEfCZGLMbidoO8XEieXfpSYxu+PQJ1qpx4ypwH6N+uF9twBPIvRRgvkvW5HUTYWENig==", + "license": "MIT", "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" + "agent-base": "9.0.0", + "debug": "^4.3.4", + "proxy-agent-negotiate": "1.1.0" }, "engines": { - "node": ">= 14" + "node": ">= 20" + } + }, + "node_modules/http-proxy-agent/node_modules/agent-base": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-9.0.0.tgz", + "integrity": "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==", + "license": "MIT", + "engines": { + "node": ">= 20" } }, "node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", "dependencies": { - "agent-base": "^7.1.2", + "agent-base": "6", "debug": "4" }, "engines": { - "node": ">= 14" + "node": ">= 6" } }, "node_modules/ieee754": { @@ -1005,16 +1115,14 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "BSD-3-Clause" }, "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.3.1.tgz", + "integrity": "sha512-1e9d3kb97NHJTIJDZW9rKqW2h6+dFa50Dy0fpPSMQp2ADje5gvKsXmdiK6dwY5t76TaTt5+P5N1Y/LoToIxP6g==", + "license": "MIT", "engines": { "node": ">= 12" } @@ -1035,15 +1143,11 @@ "node": ">=6" } }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" - }, "node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz", + "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==", + "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -1081,6 +1185,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -1089,6 +1194,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1097,6 +1203,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -1129,7 +1236,8 @@ "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/mute-stream": { "version": "1.0.0", @@ -1140,9 +1248,10 @@ } }, "node_modules/netmask": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", - "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.1.tgz", + "integrity": "sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==", + "license": "MIT", "engines": { "node": ">= 0.4.0" } @@ -1167,33 +1276,61 @@ } }, "node_modules/pac-proxy-agent": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", - "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-9.1.0.tgz", + "integrity": "sha512-1aU+1mpj3DrQPfo3gh+3Gap3G5x+axnMx1P/y0ZF2ch7kb2meyOCAH8K2k9d27ROsTE7TnAerzxqF9aon2jqnA==", + "license": "MIT", + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "get-uri": "8.0.1", + "http-proxy-agent": "9.1.0", + "https-proxy-agent": "9.1.0", + "pac-resolver": "9.0.1", + "quickjs-wasi": "^2.2.0", + "socks-proxy-agent": "10.1.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/pac-proxy-agent/node_modules/agent-base": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-9.0.0.tgz", + "integrity": "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==", + "license": "MIT", + "engines": { + "node": ">= 20" + } + }, + "node_modules/pac-proxy-agent/node_modules/https-proxy-agent": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-9.1.0.tgz", + "integrity": "sha512-ag87y7cJJ9/3+GxFr8Oy4O5faDsGRGnBGsJj/YjOSsSx/5eadKLYTMPlzuR6obgoCDDm0abAAZitXXQkMOPSpA==", + "license": "MIT", "dependencies": { - "@tootallnate/quickjs-emscripten": "^0.23.0", - "agent-base": "^7.1.2", + "agent-base": "9.0.0", "debug": "^4.3.4", - "get-uri": "^6.0.1", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.6", - "pac-resolver": "^7.0.1", - "socks-proxy-agent": "^8.0.5" + "proxy-agent-negotiate": "1.1.0" }, "engines": { - "node": ">= 14" + "node": ">= 20" } }, "node_modules/pac-resolver": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", - "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-9.0.1.tgz", + "integrity": "sha512-lJbS008tmkj08VhoM8Hzuv/VE5tK9MS0OIQ/7+s0lIF+BYhiQWFYzkSpML7lXs9iBu2jfmzBTLzhe9n6BX+dYw==", + "license": "MIT", "dependencies": { - "degenerator": "^5.0.0", + "degenerator": "7.0.1", "netmask": "^2.0.2" }, "engines": { - "node": ">= 14" + "node": ">= 20" + }, + "peerDependencies": { + "quickjs-wasi": "^2.2.0" } }, "node_modules/path-scurry": { @@ -1215,55 +1352,100 @@ "version": "8.4.2", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz", "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==", + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/express" } }, "node_modules/proxy-agent": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", - "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-8.0.2.tgz", + "integrity": "sha512-idLLRewuemWd7GH/BDJzGiB0dWGfT2SQs3jy6NtZtGWU9uPTTSdeC1/cdbqLwgzhfv027daGFuXX426e2Eg20A==", + "license": "MIT", "dependencies": { - "agent-base": "^7.1.2", + "agent-base": "9.0.0", "debug": "^4.3.4", - "http-proxy-agent": "^7.0.1", - "https-proxy-agent": "^7.0.6", + "http-proxy-agent": "9.1.0", + "https-proxy-agent": "9.1.0", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.1.0", - "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.5" + "pac-proxy-agent": "9.1.0", + "proxy-from-env": "^2.0.0", + "socks-proxy-agent": "10.1.0" }, "engines": { - "node": ">= 14" + "node": ">= 20" + } + }, + "node_modules/proxy-agent-negotiate": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-agent-negotiate/-/proxy-agent-negotiate-1.1.0.tgz", + "integrity": "sha512-N8IBcM3UgCVzz2L2Lqv8DVntDnnC8/hiV4nEDUPkqq72TPUgYWjQc+bdZlBPZK9LzPAvOY//gAt0S0DApoOXWQ==", + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "kerberos": "^2.0.0" + }, + "peerDependenciesMeta": { + "kerberos": { + "optional": true + } + } + }, + "node_modules/proxy-agent/node_modules/agent-base": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-9.0.0.tgz", + "integrity": "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==", + "license": "MIT", + "engines": { + "node": ">= 20" + } + }, + "node_modules/proxy-agent/node_modules/https-proxy-agent": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-9.1.0.tgz", + "integrity": "sha512-ag87y7cJJ9/3+GxFr8Oy4O5faDsGRGnBGsJj/YjOSsSx/5eadKLYTMPlzuR6obgoCDDm0abAAZitXXQkMOPSpA==", + "license": "MIT", + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "proxy-agent-negotiate": "1.1.0" + }, + "engines": { + "node": ">= 20" } }, "node_modules/proxy-agent/node_modules/lru-cache": { "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/quickjs-wasi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/quickjs-wasi/-/quickjs-wasi-2.2.0.tgz", + "integrity": "sha512-zQxXmQMrEoD3S+jQdYsloq4qAuaxKFHZj6hHqOYGwB2iQZH+q9e/lf5zQPXCKOk0WJuAjzRFbO4KwHIp2D05Iw==", + "license": "MIT" }, "node_modules/reflect-metadata": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==" }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/run-async": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", @@ -1281,9 +1463,10 @@ } }, "node_modules/shell-quote": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", - "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.9.0.tgz", + "integrity": "sha512-Iov+JwFv/2HcTpcwNMKd8+IWNb8tboQJNQTkAY/LLVK7gGH9jy+LGkVqPxfekHl+yMmiqXszdGWXgkfml7hjqA==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -1306,17 +1489,19 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" } }, "node_modules/socks": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz", - "integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.9.tgz", + "integrity": "sha512-LJhUYUvItdQ0LkJTmPeaEObWXAqFyfmP85x0tch/ez9cahmhlBBLbIqDFnvBnUJGagb0JbIQrkBs1wJ+yRYpEw==", + "license": "MIT", "dependencies": { - "ip-address": "^9.0.5", + "ip-address": "^10.1.1", "smart-buffer": "^4.2.0" }, "engines": { @@ -1325,32 +1510,38 @@ } }, "node_modules/socks-proxy-agent": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", - "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-10.1.0.tgz", + "integrity": "sha512-WlMj/67cEJ6MDI1OcsnjuYKDNDoyPCCYZ249kuuXPiMDw9F8PXkVaQ7YWu3siTydfQ/4BEZcvGzu+aYvz7dDCQ==", + "license": "MIT", "dependencies": { - "agent-base": "^7.1.2", + "agent-base": "9.0.0", "debug": "^4.3.4", "socks": "^2.8.3" }, "engines": { - "node": ">= 14" + "node": ">= 20" + } + }, + "node_modules/socks-proxy-agent/node_modules/agent-base": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-9.0.0.tgz", + "integrity": "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==", + "license": "MIT", + "engines": { + "node": ">= 20" } }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", "optional": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -1379,6 +1570,7 @@ "version": "10.3.5", "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.3.5.tgz", "integrity": "sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA==", + "license": "MIT", "dependencies": { "@tokenizer/token": "^0.3.0" }, @@ -1405,6 +1597,7 @@ "version": "6.1.2", "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.1.2.tgz", "integrity": "sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==", + "license": "MIT", "dependencies": { "@borewit/text-codec": "^0.2.1", "@tokenizer/token": "^0.3.0", @@ -1427,6 +1620,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "license": "MIT", "bin": { "tree-kill": "cli.js" } @@ -1462,6 +1656,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.5.0.tgz", "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", + "license": "MIT", "engines": { "node": ">=18" }, @@ -1478,6 +1673,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "license": "MIT", "engines": { "node": ">= 10.0.0" } @@ -1522,33 +1718,85 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", + "license": "MIT", "dependencies": { - "cliui": "^8.0.1", + "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", + "string-width": "^7.2.0", "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "yargs-parser": "^22.0.0" }, "engines": { - "node": ">=12" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } } }, @@ -1608,11 +1856,11 @@ "requires": {} }, "@nestjs/common": { - "version": "11.1.17", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.17.tgz", - "integrity": "sha512-hLODw5Abp8OQgA+mUO4tHou4krKgDtUcM9j5Ihxncst9XeyxYBTt2bwZm4e4EQr5E352S4Fyy6V3iFx9ggxKAg==", + "version": "11.1.28", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.28.tgz", + "integrity": "sha512-bRImsxibie+AM7xjdwcrm/gr5YeacI65kSBNzTufa1Ib5iwziaY/lqMtRh9THq6pbV4e1HP9aI2ZxGUumnmaoQ==", "requires": { - "file-type": "21.3.2", + "file-type": "21.3.4", "iterare": "1.2.1", "load-esm": "1.0.3", "tslib": "2.8.1", @@ -1620,11 +1868,10 @@ } }, "@nestjs/core": { - "version": "11.1.18", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-11.1.18.tgz", - "integrity": "sha512-wR3DtGyk/LUAiPtbXDuWJJwVkWElKBY0sqnTzf9d4uM3+X18FRZhK7WFc47czsIGOdWuRsMeLYV+1Z9dO4zDEQ==", + "version": "11.1.28", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-11.1.28.tgz", + "integrity": "sha512-06m63xIRj8+l8uOeh/8LnYupGubkyu4f+bPKIadaSui6vK9KpXgoz7HveT1yOVLcEt0M0oCOEW5EuEXZkEmBBQ==", "requires": { - "@nuxt/opencollective": "0.4.1", "fast-safe-stringify": "2.1.1", "iterare": "1.2.1", "path-to-regexp": "8.4.2", @@ -1632,14 +1879,6 @@ "uid": "2.0.2" } }, - "@nuxt/opencollective": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@nuxt/opencollective/-/opencollective-0.4.1.tgz", - "integrity": "sha512-GXD3wy50qYbxCJ652bDrDzgMr3NFEkIS374+IgFQKkCvk9yiYcLvX2XDYr7UyQxf4wK0e+yqDYRubZ0DtOxnmQ==", - "requires": { - "consola": "^3.2.3" - } - }, "@nuxtjs/opencollective": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", @@ -1658,24 +1897,24 @@ } }, "@openapitools/openapi-generator-cli": { - "version": "2.32.0", - "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.32.0.tgz", - "integrity": "sha512-9HZ3fp3cankdUC89UNsnW+HZFmRUadjjtqOvIIo6/D+bAVs+VJRqyhDy4rT4/cxqcLhXw40njs/vJLj21r60JA==", + "version": "2.40.1", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.40.1.tgz", + "integrity": "sha512-cZsMY3DhFduUlTL9a0L0h4MKNGBvIutxuZSTGTyeUgKbmYeAdrfyRYdGaPtdO3lCcuu3pDs6v9stuZFGkYbe9w==", "requires": { "@inquirer/select": "1.3.3", "@nestjs/axios": "4.0.1", - "@nestjs/common": "11.1.17", - "@nestjs/core": "11.1.18", + "@nestjs/common": "11.1.28", + "@nestjs/core": "11.1.28", "@nuxtjs/opencollective": "0.3.2", - "axios": "^1.15.0", + "axios": "^1.18.1", "chalk": "4.1.2", "commander": "8.3.0", "compare-versions": "6.1.1", - "concurrently": "9.2.1", + "concurrently": "^10.0.3", "console.table": "0.10.0", - "fs-extra": "11.3.4", + "fs-extra": "11.4.0", "glob": "13.0.6", - "proxy-agent": "6.5.0", + "proxy-agent": "8.0.2", "reflect-metadata": "0.2.2", "rxjs": "7.8.2", "tslib": "2.8.1" @@ -1695,11 +1934,6 @@ "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" }, - "@tootallnate/quickjs-emscripten": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", - "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==" - }, "@types/mute-stream": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.4.tgz", @@ -1722,9 +1956,12 @@ "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==" }, "agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==" + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } }, "ansi-escapes": { "version": "4.3.2", @@ -1761,20 +1998,14 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.15.2.tgz", - "integrity": "sha512-wLrXxPtcrPTsNlJmKjkPnNPK2Ihe0hn0wGSaTEiHRPxwjvJwT3hKmXF4dpqxmPO9SoNb2FsYXj/xEo0gHN+D5A==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.19.0.tgz", + "integrity": "sha512-ht/iuYZXEjFxLH/Hkezgd7m6JKlHHXEUSneaDz8uZe1Gj5QZtCnpyDsckvAiEnT89OEbCLmnte4R4sn7P0EKFw==", "requires": { - "follow-redirects": "^1.15.11", - "form-data": "^4.0.5", + "follow-redirects": "^1.16.0", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" - }, - "dependencies": { - "proxy-from-env": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", - "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==" - } } }, "balanced-match": { @@ -1783,9 +2014,9 @@ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==" }, "basic-ftp": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", - "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==" + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.3.1.tgz", + "integrity": "sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==" }, "brace-expansion": { "version": "5.0.5", @@ -1824,23 +2055,56 @@ "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==" }, "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "dependencies": { + "ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==" + }, + "ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==" + }, + "emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==" + }, + "string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "requires": { + "ansi-regex": "^6.2.2" + } + }, "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" } } } @@ -1883,33 +2147,30 @@ "integrity": "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==" }, "concurrently": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz", - "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-10.0.4.tgz", + "integrity": "sha512-trZql+7l/0+WRAsAnEdctr4+iiOS6ZrViI6H8QWcCF9MFS/LT0dKpe8vluB1to6it+OxSI4VospFTIFMW8DJRw==", "requires": { - "chalk": "4.1.2", + "chalk": "5.6.2", "rxjs": "7.8.2", - "shell-quote": "1.8.3", - "supports-color": "8.1.1", + "shell-quote": "1.9.0", + "supports-color": "10.2.2", "tree-kill": "1.2.2", - "yargs": "17.7.2" + "yargs": "18.0.0" }, "dependencies": { + "chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==" + }, "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "requires": { - "has-flag": "^4.0.0" - } + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==" } } }, - "consola": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", - "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==" - }, "console.table": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", @@ -1919,9 +2180,9 @@ } }, "data-uri-to-buffer": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", - "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-8.0.0.tgz", + "integrity": "sha512-6UHfyCux51b8PTGDgveqtz1tvphBku5DrMKKJbFAZAJOI2zsjDpDoYE1+QGj7FOMS4BdTFNJsJiR3zEB0xH0yQ==" }, "debug": { "version": "4.4.3", @@ -1941,9 +2202,9 @@ } }, "degenerator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", - "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-7.0.1.tgz", + "integrity": "sha512-ABErK0IefDSyHjlPH7WUEenIAX2rPPnrDcDM+TS3z3+zu9TfyKKi07BQM+8rmxpdE2y1v5fjjdoAS/x4D2U60w==", "requires": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", @@ -1989,9 +2250,9 @@ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" }, "es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", "requires": { "es-errors": "^1.3.0" } @@ -2057,9 +2318,9 @@ } }, "file-type": { - "version": "21.3.2", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.2.tgz", - "integrity": "sha512-DLkUvGwep3poOV2wpzbHCOnSKGk1LzyXTv+aHFgN2VFl96wnp8YA9YjO2qPzg5PuL8q/SW9Pdi6WTkYOIh995w==", + "version": "21.3.4", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.4.tgz", + "integrity": "sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==", "requires": { "@tokenizer/inflate": "^0.4.1", "strtok3": "^10.3.4", @@ -2068,26 +2329,26 @@ } }, "follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==" + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==" }, "form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" + "hasown": "^2.0.4", + "mime-types": "^2.1.35" } }, "fs-extra": { - "version": "11.3.4", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.4.tgz", - "integrity": "sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.4.0.tgz", + "integrity": "sha512-EQsFzMUJkCKGr1ePqlYADkIUmHW1s3ZXr5Yqy6wbGrfUCphpl2maM/kyOIRA2HpP3AaFQTZXD4ldjek+nccddA==", "requires": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -2104,6 +2365,11 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, + "get-east-asian-width": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", + "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==" + }, "get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -2131,12 +2397,12 @@ } }, "get-uri": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz", - "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-8.0.1.tgz", + "integrity": "sha512-/5N/P4Lrh0p/mDwlDRi7Y1+P2o/OyzZI3l6Iz1Ov6XXwwm1y3RlZLuo3gVgML99djrEDtV980bBxSuOeHLk8ww==", "requires": { - "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^6.0.2", + "basic-ftp": "^5.3.1", + "data-uri-to-buffer": "8.0.0", "debug": "^4.3.4" } }, @@ -2179,28 +2445,36 @@ } }, "hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", "requires": { "function-bind": "^1.1.2" } }, "http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-9.1.0.tgz", + "integrity": "sha512-2NxoveTT58mjYT4n3RPTEfCZGLMbidoO8XEieXfpSYxu+PQJ1qpx4ypwH6N+uF9twBPIvRRgvkvW5HUTYWENig==", "requires": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" + "agent-base": "9.0.0", + "debug": "^4.3.4", + "proxy-agent-negotiate": "1.1.0" + }, + "dependencies": { + "agent-base": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-9.0.0.tgz", + "integrity": "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==" + } } }, "https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "requires": { - "agent-base": "^7.1.2", + "agent-base": "6", "debug": "4" } }, @@ -2210,13 +2484,9 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", - "requires": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - } + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.3.1.tgz", + "integrity": "sha512-1e9d3kb97NHJTIJDZW9rKqW2h6+dFa50Dy0fpPSMQp2ADje5gvKsXmdiK6dwY5t76TaTt5+P5N1Y/LoToIxP6g==" }, "is-fullwidth-code-point": { "version": "3.0.0", @@ -2228,15 +2498,10 @@ "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==" }, - "jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" - }, "jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz", + "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==", "requires": { "graceful-fs": "^4.1.6", "universalify": "^2.0.0" @@ -2294,9 +2559,9 @@ "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==" }, "netmask": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", - "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.1.tgz", + "integrity": "sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==" }, "node-fetch": { "version": "2.7.0", @@ -2307,26 +2572,43 @@ } }, "pac-proxy-agent": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", - "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-9.1.0.tgz", + "integrity": "sha512-1aU+1mpj3DrQPfo3gh+3Gap3G5x+axnMx1P/y0ZF2ch7kb2meyOCAH8K2k9d27ROsTE7TnAerzxqF9aon2jqnA==", "requires": { - "@tootallnate/quickjs-emscripten": "^0.23.0", - "agent-base": "^7.1.2", + "agent-base": "9.0.0", "debug": "^4.3.4", - "get-uri": "^6.0.1", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.6", - "pac-resolver": "^7.0.1", - "socks-proxy-agent": "^8.0.5" + "get-uri": "8.0.1", + "http-proxy-agent": "9.1.0", + "https-proxy-agent": "9.1.0", + "pac-resolver": "9.0.1", + "quickjs-wasi": "^2.2.0", + "socks-proxy-agent": "10.1.0" + }, + "dependencies": { + "agent-base": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-9.0.0.tgz", + "integrity": "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==" + }, + "https-proxy-agent": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-9.1.0.tgz", + "integrity": "sha512-ag87y7cJJ9/3+GxFr8Oy4O5faDsGRGnBGsJj/YjOSsSx/5eadKLYTMPlzuR6obgoCDDm0abAAZitXXQkMOPSpA==", + "requires": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "proxy-agent-negotiate": "1.1.0" + } + } } }, "pac-resolver": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", - "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-9.0.1.tgz", + "integrity": "sha512-lJbS008tmkj08VhoM8Hzuv/VE5tK9MS0OIQ/7+s0lIF+BYhiQWFYzkSpML7lXs9iBu2jfmzBTLzhe9n6BX+dYw==", "requires": { - "degenerator": "^5.0.0", + "degenerator": "7.0.1", "netmask": "^2.0.2" } }, @@ -2345,20 +2627,35 @@ "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==" }, "proxy-agent": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", - "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-8.0.2.tgz", + "integrity": "sha512-idLLRewuemWd7GH/BDJzGiB0dWGfT2SQs3jy6NtZtGWU9uPTTSdeC1/cdbqLwgzhfv027daGFuXX426e2Eg20A==", "requires": { - "agent-base": "^7.1.2", + "agent-base": "9.0.0", "debug": "^4.3.4", - "http-proxy-agent": "^7.0.1", - "https-proxy-agent": "^7.0.6", + "http-proxy-agent": "9.1.0", + "https-proxy-agent": "9.1.0", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.1.0", - "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.5" + "pac-proxy-agent": "9.1.0", + "proxy-from-env": "^2.0.0", + "socks-proxy-agent": "10.1.0" }, "dependencies": { + "agent-base": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-9.0.0.tgz", + "integrity": "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==" + }, + "https-proxy-agent": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-9.1.0.tgz", + "integrity": "sha512-ag87y7cJJ9/3+GxFr8Oy4O5faDsGRGnBGsJj/YjOSsSx/5eadKLYTMPlzuR6obgoCDDm0abAAZitXXQkMOPSpA==", + "requires": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "proxy-agent-negotiate": "1.1.0" + } + }, "lru-cache": { "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", @@ -2366,21 +2663,27 @@ } } }, - "proxy-from-env": { + "proxy-agent-negotiate": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + "resolved": "https://registry.npmjs.org/proxy-agent-negotiate/-/proxy-agent-negotiate-1.1.0.tgz", + "integrity": "sha512-N8IBcM3UgCVzz2L2Lqv8DVntDnnC8/hiV4nEDUPkqq72TPUgYWjQc+bdZlBPZK9LzPAvOY//gAt0S0DApoOXWQ==", + "requires": {} + }, + "proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==" + }, + "quickjs-wasi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/quickjs-wasi/-/quickjs-wasi-2.2.0.tgz", + "integrity": "sha512-zQxXmQMrEoD3S+jQdYsloq4qAuaxKFHZj6hHqOYGwB2iQZH+q9e/lf5zQPXCKOk0WJuAjzRFbO4KwHIp2D05Iw==" }, "reflect-metadata": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==" }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" - }, "run-async": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", @@ -2395,9 +2698,9 @@ } }, "shell-quote": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", - "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.9.0.tgz", + "integrity": "sha512-Iov+JwFv/2HcTpcwNMKd8+IWNb8tboQJNQTkAY/LLVK7gGH9jy+LGkVqPxfekHl+yMmiqXszdGWXgkfml7hjqA==" }, "signal-exit": { "version": "4.1.0", @@ -2410,22 +2713,29 @@ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" }, "socks": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz", - "integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.9.tgz", + "integrity": "sha512-LJhUYUvItdQ0LkJTmPeaEObWXAqFyfmP85x0tch/ez9cahmhlBBLbIqDFnvBnUJGagb0JbIQrkBs1wJ+yRYpEw==", "requires": { - "ip-address": "^9.0.5", + "ip-address": "^10.1.1", "smart-buffer": "^4.2.0" } }, "socks-proxy-agent": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", - "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-10.1.0.tgz", + "integrity": "sha512-WlMj/67cEJ6MDI1OcsnjuYKDNDoyPCCYZ249kuuXPiMDw9F8PXkVaQ7YWu3siTydfQ/4BEZcvGzu+aYvz7dDCQ==", "requires": { - "agent-base": "^7.1.2", + "agent-base": "9.0.0", "debug": "^4.3.4", "socks": "^2.8.3" + }, + "dependencies": { + "agent-base": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-9.0.0.tgz", + "integrity": "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA==" + } } }, "source-map": { @@ -2434,11 +2744,6 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "optional": true }, - "sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" - }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -2565,23 +2870,52 @@ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" }, "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", "requires": { - "cliui": "^8.0.1", + "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", + "string-width": "^7.2.0", "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "yargs-parser": "^22.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==" + }, + "emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==" + }, + "string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "requires": { + "ansi-regex": "^6.2.2" + } + } } }, "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==" } } } diff --git a/package.json b/package.json index cc432e00..b439f751 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "@openapitools/openapi-generator-cli": "^2.32.0" + "@openapitools/openapi-generator-cli": "^2.40.1" } } diff --git a/pom.xml b/pom.xml index 4bd86412..c1eabdd0 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ vrchatapi jar vrchatapi - 1.20.7 + 1.20.8-nightly.20 https://github.com/openapitools/openapi-generator OpenAPI Java @@ -50,7 +50,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.1.0 + 3.4.1 enforce-maven @@ -72,12 +72,12 @@ maven-surefire-plugin 2.22.2 - + loggerPath conf/log4j.properties - + -Xms512m -Xmx1500m methods 10 @@ -93,7 +93,7 @@ maven-dependency-plugin - 3.3.0 + 3.6.1 package @@ -124,7 +124,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.5.0 add_sources @@ -155,7 +155,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + 3.6.3 attach-javadocs @@ -178,7 +178,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.3.0 attach-sources @@ -241,7 +241,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.2.1 sign-artifacts @@ -258,11 +258,6 @@ - - io.swagger - swagger-annotations - ${swagger-core-version} - com.google.code.findbugs @@ -306,14 +301,9 @@ ${jackson-databind-nullable-version} - javax.ws.rs - jsr311-api - ${jsr311-api-version} - - - javax.ws.rs - javax.ws.rs-api - ${javax.ws.rs-api-version} + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs-api-version} @@ -328,30 +318,23 @@ ${junit-platform-runner.version} test - - org.mockito - mockito-core - ${mockito-core-version} - test - 1.8 ${java.version} ${java.version} - 1.8.5 - 1.6.5 - 4.10.0 - 2.9.1 - 3.12.0 - 0.2.4 + 1.9.0 + 4.12.0 + 2.10.1 + 3.18.0 + 0.2.10 1.3.5 - 5.9.1 - 1.9.1 - 3.12.4 - 2.1.1 + 2.0.2 + 5.10.3 + 1.10.0 + 2.1.6 1.1.1 UTF-8 - 2.27.2 + 2.43.0 diff --git a/src/main/java/io/github/vrchatapi/ApiCallback.java b/src/main/java/io/github/vrchatapi/ApiCallback.java index 03bd779d..7025a1a4 100644 --- a/src/main/java/io/github/vrchatapi/ApiCallback.java +++ b/src/main/java/io/github/vrchatapi/ApiCallback.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/io/github/vrchatapi/ApiClient.java b/src/main/java/io/github/vrchatapi/ApiClient.java index cf562585..b5527cf9 100644 --- a/src/main/java/io/github/vrchatapi/ApiClient.java +++ b/src/main/java/io/github/vrchatapi/ApiClient.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -46,6 +46,7 @@ import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -59,27 +60,37 @@ */ public class ApiClient { - private String basePath = "https://api.vrchat.cloud/api/1"; - private boolean debugging = false; - private Map defaultHeaderMap = new HashMap(); - private Map defaultCookieMap = new HashMap(); - private String tempFolderPath = null; - - private Map authentications; - - private DateFormat dateFormat; - private DateFormat datetimeFormat; - private boolean lenientDatetimeFormat; - private int dateLength; - - private InputStream sslCaCert; - private boolean verifyingSsl; - private KeyManager[] keyManagers; - - private OkHttpClient httpClient; - private JSON json; - - private HttpLoggingInterceptor loggingInterceptor; + protected String basePath = "https://api.vrchat.cloud/api/1"; + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "https://api.vrchat.cloud/api/1", + "No description provided", + new HashMap() + ) + )); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + protected boolean debugging = false; + protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); + protected String tempFolderPath = null; + + protected Map authentications; + + protected DateFormat dateFormat; + protected DateFormat datetimeFormat; + protected boolean lenientDatetimeFormat; + protected int dateLength; + + protected InputStream sslCaCert; + protected boolean verifyingSsl; + protected KeyManager[] keyManagers; + protected String tlsServerName; + + protected OkHttpClient httpClient; + protected JSON json; + + protected HttpLoggingInterceptor loggingInterceptor; /** * Basic constructor for ApiClient @@ -114,11 +125,11 @@ public ApiClient(OkHttpClient client) { authentications = Collections.unmodifiableMap(authentications); } - private void initHttpClient() { + protected void initHttpClient() { initHttpClient(Collections.emptyList()); } - private void initHttpClient(List interceptors) { + protected void initHttpClient(List interceptors) { OkHttpClient.Builder builder = new OkHttpClient.Builder(); builder.addNetworkInterceptor(getProgressInterceptor()); builder.cookieJar(new io.github.vrchatapi.util.SimpleOkHttpCookieJar()); @@ -129,7 +140,7 @@ private void initHttpClient(List interceptors) { httpClient = builder.build(); } - private void init() { + protected void init() { verifyingSsl = true; json = new JSON(); @@ -152,11 +163,39 @@ public String getBasePath() { /** * Set base path * - * @param basePath Base path of the URL (e.g https://api.vrchat.cloud/api/1 - * @return An instance of OkHttpClient + * @param basePath Base path of the URL (e.g https://api.vrchat.cloud/api/1) + * @return An instance of ApiClient */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; + this.serverIndex = null; + return this; + } + + public List getServers() { + return servers; + } + + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; return this; } @@ -173,7 +212,7 @@ public OkHttpClient getHttpClient() { * Set HTTP client, which must never be null. * * @param newHttpClient An instance of OkHttpClient - * @return Api Client + * @return ApiClient * @throws java.lang.NullPointerException when newHttpClient is null */ public ApiClient setHttpClient(OkHttpClient newHttpClient) { @@ -268,6 +307,29 @@ public ApiClient setKeyManagers(KeyManager[] managers) { return this; } + /** + * Get TLS server name for SNI (Server Name Indication). + * + * @return The TLS server name + */ + public String getTlsServerName() { + return tlsServerName; + } + + /** + * Set TLS server name for SNI (Server Name Indication). + * This is used to verify the server certificate against a specific hostname + * instead of the hostname in the URL. + * + * @param tlsServerName The TLS server name to use for certificate verification + * @return ApiClient + */ + public ApiClient setTlsServerName(String tlsServerName) { + this.tlsServerName = tlsServerName; + applySslSettings(); + return this; + } + /** *

Getter for the field dateFormat.

* @@ -421,6 +483,31 @@ public void setAccessToken(String accessToken) { throw new RuntimeException("No OAuth2 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * @@ -636,7 +723,7 @@ public List parameterToPair(String name, Object value) { * @param value The value of the parameter. * @return A list of {@code Pair} objects. */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { + public List parameterToPairs(String collectionFormat, String name, Collection value) { List params = new ArrayList(); // preconditions @@ -676,6 +763,31 @@ public List parameterToPairs(String collectionFormat, String name, Collect return params; } + /** + * Formats the specified free-form query parameters to a list of {@code Pair} objects. + * + * @param value The free-form query parameters. + * @return A list of {@code Pair} objects. + */ + public List freeFormParameterToPairs(Object value) { + List params = new ArrayList<>(); + + // preconditions + if (value == null || !(value instanceof Map )) { + return params; + } + + @SuppressWarnings("unchecked") + final Map valuesMap = (Map) value; + + for (Map.Entry entry : valuesMap.entrySet()) { + params.add(new Pair(entry.getKey(), parameterToString(entry.getValue()))); + } + + return params; + } + + /** * Formats the specified collection path parameter to a string value. * @@ -718,7 +830,7 @@ public String collectionPathParameterToString(String collectionFormat, Collectio * @return The sanitized filename */ public String sanitizeFilename(String filename) { - return filename.replaceAll(".*[/\\\\]", ""); + return filename.replaceFirst("^.*[/\\\\]", ""); } /** @@ -828,17 +940,8 @@ public T deserialize(Response response, Type returnType) throws ApiException return (T) downloadFileFromResponse(response); } - String respBody; - try { - if (response.body() != null) - respBody = response.body().string(); - else - respBody = null; - } catch (IOException e) { - throw new ApiException(e); - } - - if (respBody == null || "".equals(respBody)) { + ResponseBody respBody = response.body(); + if (respBody == null) { return null; } @@ -847,17 +950,35 @@ public T deserialize(Response response, Type returnType) throws ApiException // ensuring a default content type contentType = "application/json"; } - if (isJsonMime(contentType)) { - return JSON.deserialize(respBody, returnType); - } else if (returnType.equals(String.class)) { - // Expecting string, return the raw response body. - return (T) respBody; - } else { - throw new ApiException( + try { + if (isJsonMime(contentType)) { + if (returnType.equals(String.class)) { + String respBodyString = respBody.string(); + if (respBodyString.isEmpty()) { + return null; + } + // Use String-based deserialize for String return type with fallback + return JSON.deserialize(respBodyString, returnType); + } else { + // Use InputStream-based deserialize which supports responses > 2GB + return JSON.deserialize(respBody.byteStream(), returnType); + } + } else if (returnType.equals(String.class)) { + String respBodyString = respBody.string(); + if (respBodyString.isEmpty()) { + return null; + } + // Expecting string, return the raw response body. + return (T) respBodyString; + } else { + throw new ApiException( "Content type \"" + contentType + "\" is not supported for type: " + returnType, response.code(), response.headers().toMultimap(), - respBody); + response.body().string()); + } + } catch (IOException e) { + throw new ApiException(e); } } @@ -1114,21 +1235,20 @@ public Call buildCall(String baseUrl, String path, String method, List que * @throws io.github.vrchatapi.ApiException If fail to serialize the request body object */ 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 { - // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams - List allQueryParams = new ArrayList(queryParams); - allQueryParams.addAll(collectionQueryParams); - 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)) { @@ -1142,10 +1262,12 @@ public Request buildRequest(String baseUrl, String path, String method, List updatedQueryParams = new ArrayList<>(queryParams); + // update parameters with authentication settings - updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); + updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); - final Request.Builder reqBuilder = new Request.Builder().url(url); + final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams)); processHeaderParams(headerParams, reqBuilder); processCookieParams(cookieParams, reqBuilder); @@ -1179,7 +1301,19 @@ public String buildUrl(String baseUrl, String path, List queryParams, List if (baseUrl != null) { url.append(baseUrl).append(path); } else { - url.append(basePath).append(path); + 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()) { @@ -1244,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())); } } } @@ -1341,7 +1475,7 @@ public String guessContentTypeFromFile(File file) { * @param key The key of the Header element * @param file The file to add to the Header */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + 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)); @@ -1354,7 +1488,7 @@ private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String k * @param key The key of the Header element * @param obj The complex object to add to the Header */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { + 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")); @@ -1376,7 +1510,7 @@ private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String k * 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 { @@ -1397,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; @@ -1445,7 +1579,17 @@ public boolean verify(String hostname, SSLSession session) { 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"); @@ -1459,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); @@ -1476,7 +1620,7 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti * @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 */ - private String requestBodyToString(RequestBody requestBody) throws ApiException { + protected String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { try { final Buffer buffer = new Buffer(); diff --git a/src/main/java/io/github/vrchatapi/ApiException.java b/src/main/java/io/github/vrchatapi/ApiException.java index 40f86055..47ba0d94 100644 --- a/src/main/java/io/github/vrchatapi/ApiException.java +++ b/src/main/java/io/github/vrchatapi/ApiException.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,18 +15,19 @@ import java.util.Map; import java.util.List; -import javax.ws.rs.core.GenericType; /** *

ApiException class.

*/ @SuppressWarnings("serial") -@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 ApiException extends Exception { + private static final long serialVersionUID = 1L; + private int code = 0; private Map> responseHeaders = null; private String responseBody = null; - + /** *

Constructor for ApiException.

*/ @@ -98,7 +99,7 @@ public ApiException(String message, Throwable throwable, 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); } /** @@ -159,7 +160,7 @@ public String getResponseBody() { * @return The exception message */ public String getMessage() { - return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + 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 30da78eb..fb102fd6 100644 --- a/src/main/java/io/github/vrchatapi/ApiResponse.java +++ b/src/main/java/io/github/vrchatapi/ApiResponse.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/io/github/vrchatapi/Configuration.java b/src/main/java/io/github/vrchatapi/Configuration.java index d893d4b9..57f5c0b6 100644 --- a/src/main/java/io/github/vrchatapi/Configuration.java +++ b/src/main/java/io/github/vrchatapi/Configuration.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (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-nightly.20"; + + 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 592a6d8a..e5ea048f 100644 --- a/src/main/java/io/github/vrchatapi/GzipRequestInterceptor.java +++ b/src/main/java/io/github/vrchatapi/GzipRequestInterceptor.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (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 534c2f2a..2452c01c 100644 --- a/src/main/java/io/github/vrchatapi/JSON.java +++ b/src/main/java/io/github/vrchatapi/JSON.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,8 +26,11 @@ 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; @@ -85,7 +88,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri return clazz; } - { + static { GsonBuilder gsonBuilder = createGson(); gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); @@ -219,8 +222,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri 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.InventoryDefaultAttributes1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryDefaultAttributes1Validator.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()); @@ -251,12 +254,20 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri 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.NotificationDetailBoop.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.NotificationV2Data.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2DataBadgeEarned.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2DataBoop.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2DataEventAnnouncement.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2DataGroupAnnouncement.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2DataGroupInformative.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2DataGroupTransfer.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()); @@ -273,6 +284,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri 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()); @@ -281,17 +294,21 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri 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.RegisterUserAccount200Response.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.RequiresTwoFactorAuth.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()); @@ -304,6 +321,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri 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.SentNotificationDetails.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()); @@ -430,6 +448,28 @@ public static 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 */ diff --git a/src/main/java/io/github/vrchatapi/Pair.java b/src/main/java/io/github/vrchatapi/Pair.java index a138fb1d..82ece0e8 100644 --- a/src/main/java/io/github/vrchatapi/Pair.java +++ b/src/main/java/io/github/vrchatapi/Pair.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,45 +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; - } - - 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 06214782..1970e3e7 100644 --- a/src/main/java/io/github/vrchatapi/ProgressRequestBody.java +++ b/src/main/java/io/github/vrchatapi/ProgressRequestBody.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (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 4ef2e201..3d1e95ed 100644 --- a/src/main/java/io/github/vrchatapi/ProgressResponseBody.java +++ b/src/main/java/io/github/vrchatapi/ProgressResponseBody.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (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 9d904d3c..312a67d5 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-nightly.20 + * 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; diff --git a/src/main/java/io/github/vrchatapi/ServerVariable.java b/src/main/java/io/github/vrchatapi/ServerVariable.java index 35c71a91..59cd8d5f 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-nightly.20 + * 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 d5f270dd..f038abd6 100644 --- a/src/main/java/io/github/vrchatapi/StringUtil.java +++ b/src/main/java/io/github/vrchatapi/StringUtil.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (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 343060aa..c72b8095 100644 --- a/src/main/java/io/github/vrchatapi/api/AuthenticationApi.java +++ b/src/main/java/io/github/vrchatapi/api/AuthenticationApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -37,6 +37,7 @@ import io.github.vrchatapi.model.OkStatus2; import io.github.vrchatapi.model.PaginatedModerationReportList; import io.github.vrchatapi.model.Pending2FAResult; +import io.github.vrchatapi.model.RegisterUserAccount200Response; import io.github.vrchatapi.model.RegisterUserAccountRequest; import io.github.vrchatapi.model.SubmitModerationReportRequest; import io.github.vrchatapi.model.Success; @@ -54,7 +55,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class AuthenticationApi { private ApiClient localVarApiClient; @@ -99,7 +99,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -161,7 +162,8 @@ private okhttp3.Call cancelPending2FAValidateBeforeCall(final ApiCallback _callb * @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. -
+
+ @@ -178,7 +180,8 @@ public Disable2FAResult cancelPending2FA() throws ApiException { * @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. -
+
+ @@ -197,7 +200,8 @@ public ApiResponse cancelPending2FAWithHttpInfo() throws ApiEx * @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. -
+
+ @@ -220,13 +224,14 @@ public okhttp3.Call cancelPending2FAAsync(final ApiCallback _c * @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. -
+
+
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 username, 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[] { }; @@ -287,7 +292,7 @@ public okhttp3.Call checkUserExistsCall(String email, String displayName, String } @SuppressWarnings("rawtypes") - private okhttp3.Call checkUserExistsValidateBeforeCall(String email, String displayName, String username, String excludeUserId, final ApiCallback _callback) throws ApiException { + 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); } @@ -302,13 +307,14 @@ private okhttp3.Call checkUserExistsValidateBeforeCall(String email, String disp * @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 username, String excludeUserId) throws ApiException { + 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(); } @@ -323,13 +329,14 @@ public UserExists checkUserExists(String email, String displayName, String usern * @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 username, String excludeUserId) throws ApiException { + 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); @@ -346,13 +353,14 @@ public ApiResponse checkUserExistsWithHttpInfo(String email, String * @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 username, 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, username, excludeUserId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -367,12 +375,13 @@ public okhttp3.Call checkUserExistsAsync(String email, String displayName, Strin * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+
Response Details
Status Code Description Response Headers
302 OK -
*/ - public okhttp3.Call confirmEmailCall(String id, String verifyEmail, 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[] { }; @@ -424,7 +433,7 @@ public okhttp3.Call confirmEmailCall(String id, String verifyEmail, final ApiCal } @SuppressWarnings("rawtypes") - private okhttp3.Call confirmEmailValidateBeforeCall(String id, String verifyEmail, final ApiCallback _callback) throws ApiException { + 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)"); @@ -446,12 +455,13 @@ private okhttp3.Call confirmEmailValidateBeforeCall(String id, String verifyEmai * @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
302 OK -
*/ - public void confirmEmail(String id, String verifyEmail) throws ApiException { + public void confirmEmail(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull String verifyEmail) throws ApiException { confirmEmailWithHttpInfo(id, verifyEmail); } @@ -463,12 +473,13 @@ public void confirmEmail(String id, String verifyEmail) throws ApiException { * @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
302 OK -
*/ - public ApiResponse confirmEmailWithHttpInfo(String id, String verifyEmail) throws ApiException { + 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); } @@ -482,12 +493,13 @@ public ApiResponse confirmEmailWithHttpInfo(String id, String verifyEmail) * @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
302 OK -
*/ - public okhttp3.Call confirmEmailAsync(String id, String verifyEmail, 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 = confirmEmailValidateBeforeCall(id, verifyEmail, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -500,13 +512,14 @@ public okhttp3.Call confirmEmailAsync(String id, String verifyEmail, final ApiCa * @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 single AvatarModerationCreated object -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createGlobalAvatarModerationCall(CreateAvatarModerationRequest createAvatarModerationRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGlobalAvatarModerationCall(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -552,7 +565,7 @@ public okhttp3.Call createGlobalAvatarModerationCall(CreateAvatarModerationReque } @SuppressWarnings("rawtypes") - private okhttp3.Call createGlobalAvatarModerationValidateBeforeCall(CreateAvatarModerationRequest createAvatarModerationRequest, 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)"); @@ -569,13 +582,14 @@ private okhttp3.Call createGlobalAvatarModerationValidateBeforeCall(CreateAvatar * @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 Returns a single AvatarModerationCreated object -
401 Error response due to missing auth cookie. -
*/ - public AvatarModerationCreated createGlobalAvatarModeration(CreateAvatarModerationRequest createAvatarModerationRequest) throws ApiException { + public AvatarModerationCreated createGlobalAvatarModeration(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest) throws ApiException { ApiResponse localVarResp = createGlobalAvatarModerationWithHttpInfo(createAvatarModerationRequest); return localVarResp.getData(); } @@ -587,13 +601,14 @@ public AvatarModerationCreated createGlobalAvatarModeration(CreateAvatarModerati * @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 Returns a single AvatarModerationCreated object -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse createGlobalAvatarModerationWithHttpInfo(CreateAvatarModerationRequest createAvatarModerationRequest) throws ApiException { + 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); @@ -607,13 +622,14 @@ public ApiResponse createGlobalAvatarModerationWithHttp * @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 single AvatarModerationCreated object -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createGlobalAvatarModerationAsync(CreateAvatarModerationRequest createAvatarModerationRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGlobalAvatarModerationAsync(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createGlobalAvatarModerationValidateBeforeCall(createAvatarModerationRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -628,13 +644,14 @@ public okhttp3.Call createGlobalAvatarModerationAsync(CreateAvatarModerationRequ * @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 single OkStatus2 object -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteGlobalAvatarModerationCall(String targetAvatarId, AvatarModerationType avatarModerationType, 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[] { }; @@ -687,7 +704,7 @@ public okhttp3.Call deleteGlobalAvatarModerationCall(String targetAvatarId, Avat } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteGlobalAvatarModerationValidateBeforeCall(String targetAvatarId, AvatarModerationType avatarModerationType, 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)"); @@ -710,13 +727,14 @@ private okhttp3.Call deleteGlobalAvatarModerationValidateBeforeCall(String targe * @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 Returns a single OkStatus2 object -
401 Error response due to missing auth cookie. -
*/ - public OkStatus2 deleteGlobalAvatarModeration(String targetAvatarId, AvatarModerationType avatarModerationType) throws ApiException { + public OkStatus2 deleteGlobalAvatarModeration(@javax.annotation.Nonnull String targetAvatarId, @javax.annotation.Nonnull AvatarModerationType avatarModerationType) throws ApiException { ApiResponse localVarResp = deleteGlobalAvatarModerationWithHttpInfo(targetAvatarId, avatarModerationType); return localVarResp.getData(); } @@ -729,13 +747,14 @@ public OkStatus2 deleteGlobalAvatarModeration(String targetAvatarId, AvatarModer * @return ApiResponse<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 Returns a single OkStatus2 object -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse deleteGlobalAvatarModerationWithHttpInfo(String targetAvatarId, AvatarModerationType avatarModerationType) throws ApiException { + public ApiResponse deleteGlobalAvatarModerationWithHttpInfo(@javax.annotation.Nonnull String targetAvatarId, @javax.annotation.Nonnull AvatarModerationType avatarModerationType) throws ApiException { okhttp3.Call localVarCall = deleteGlobalAvatarModerationValidateBeforeCall(targetAvatarId, avatarModerationType, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -750,13 +769,14 @@ public ApiResponse deleteGlobalAvatarModerationWithHttpInfo(String ta * @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 single OkStatus2 object -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteGlobalAvatarModerationAsync(String targetAvatarId, AvatarModerationType avatarModerationType, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGlobalAvatarModerationAsync(@javax.annotation.Nonnull String targetAvatarId, @javax.annotation.Nonnull AvatarModerationType avatarModerationType, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteGlobalAvatarModerationValidateBeforeCall(targetAvatarId, avatarModerationType, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -770,14 +790,15 @@ public okhttp3.Call deleteGlobalAvatarModerationAsync(String targetAvatarId, Ava * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public okhttp3.Call deleteModerationReportCall(String moderationReportId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteModerationReportCall(@javax.annotation.Nonnull String moderationReportId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -823,7 +844,7 @@ public okhttp3.Call deleteModerationReportCall(String moderationReportId, final } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteModerationReportValidateBeforeCall(String moderationReportId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteModerationReportValidateBeforeCall(@javax.annotation.Nonnull String moderationReportId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moderationReportId' is set if (moderationReportId == null) { throw new ApiException("Missing the required parameter 'moderationReportId' when calling deleteModerationReport(Async)"); @@ -840,14 +861,15 @@ private okhttp3.Call deleteModerationReportValidateBeforeCall(String moderationR * @return SuccessFlag * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public SuccessFlag deleteModerationReport(String moderationReportId) throws ApiException { + public SuccessFlag deleteModerationReport(@javax.annotation.Nonnull String moderationReportId) throws ApiException { ApiResponse localVarResp = deleteModerationReportWithHttpInfo(moderationReportId); return localVarResp.getData(); } @@ -859,14 +881,15 @@ public SuccessFlag deleteModerationReport(String moderationReportId) throws ApiE * @return ApiResponse<SuccessFlag> * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public ApiResponse deleteModerationReportWithHttpInfo(String moderationReportId) throws ApiException { + public ApiResponse deleteModerationReportWithHttpInfo(@javax.annotation.Nonnull String moderationReportId) throws ApiException { okhttp3.Call localVarCall = deleteModerationReportValidateBeforeCall(moderationReportId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -880,14 +903,15 @@ public ApiResponse deleteModerationReportWithHttpInfo(String modera * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public okhttp3.Call deleteModerationReportAsync(String moderationReportId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteModerationReportAsync(@javax.annotation.Nonnull String moderationReportId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteModerationReportValidateBeforeCall(moderationReportId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -901,13 +925,14 @@ public okhttp3.Call deleteModerationReportAsync(String moderationReportId, final * @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 deleteUserCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteUserCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -953,7 +978,7 @@ public okhttp3.Call deleteUserCall(String userId, final ApiCallback _callback) t } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteUserValidateBeforeCall(@javax.annotation.Nonnull 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)"); @@ -970,13 +995,14 @@ private okhttp3.Call deleteUserValidateBeforeCall(String userId, final ApiCallba * @return CurrentUser * @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 CurrentUser deleteUser(String userId) throws ApiException { + public CurrentUser deleteUser(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = deleteUserWithHttpInfo(userId); return localVarResp.getData(); } @@ -988,13 +1014,14 @@ public CurrentUser deleteUser(String userId) throws ApiException { * @return ApiResponse<CurrentUser> * @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 deleteUserWithHttpInfo(String userId) throws ApiException { + public ApiResponse deleteUserWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1008,13 +1035,14 @@ public ApiResponse deleteUserWithHttpInfo(String userId) throws Api * @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 deleteUserAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteUserAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1027,7 +1055,8 @@ public okhttp3.Call deleteUserAsync(String userId, final ApiCallback + + @@ -1089,7 +1118,8 @@ private okhttp3.Call disable2FAValidateBeforeCall(final ApiCallback _callback) t * @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. -
+
+ @@ -1106,7 +1136,8 @@ public Disable2FAResult disable2FA() throws ApiException { * @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. -
+
+ @@ -1125,7 +1156,8 @@ public ApiResponse disable2FAWithHttpInfo() throws ApiExceptio * @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. -
+
+ @@ -1144,7 +1176,8 @@ public okhttp3.Call disable2FAAsync(final ApiCallback _callbac * @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. -
+
+ @@ -1206,7 +1239,8 @@ private okhttp3.Call enable2FAValidateBeforeCall(final ApiCallback _callback) th * @return Pending2FAResult * @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. -
+
+ @@ -1223,7 +1257,8 @@ public Pending2FAResult enable2FA() throws ApiException { * @return ApiResponse<Pending2FAResult> * @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. -
+
+ @@ -1242,7 +1277,8 @@ public ApiResponse enable2FAWithHttpInfo() throws ApiException * @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. -
+
+ @@ -1261,7 +1297,8 @@ public okhttp3.Call enable2FAAsync(final ApiCallback _callback * @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. -
+
+ @@ -1307,7 +1344,7 @@ public okhttp3.Call getCurrentUserCall(final ApiCallback _callback) throws ApiEx localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "authCookie", "authHeader", "twoFactorAuthCookie" }; + String[] localVarAuthNames = new String[] { "authHeader", "twoFactorAuthCookie", "authCookie" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -1320,35 +1357,37 @@ private okhttp3.Call getCurrentUserValidateBeforeCall(final ApiCallback _callbac /** * 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. The auth string after `Authorization: Basic {string}` is a base64-encoded string of the username and password, both individually url-encoded, and then joined with a colon. > base64(urlencode(username):urlencode(password)) **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 + * @return RegisterUserAccount200Response * @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.
401 Error response due to missing auth cookie. -
+
+
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Successful authentication returns an `auth` cookie.
401 Error response due to missing auth cookie. -
*/ - public CurrentUser getCurrentUser() throws ApiException { - ApiResponse localVarResp = getCurrentUserWithHttpInfo(); + public RegisterUserAccount200Response getCurrentUser() throws ApiException { + ApiResponse localVarResp = getCurrentUserWithHttpInfo(); 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. The auth string after `Authorization: Basic {string}` is a base64-encoded string of the username and password, both individually url-encoded, and then joined with a colon. > base64(urlencode(username):urlencode(password)) **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> + * @return ApiResponse<RegisterUserAccount200Response> * @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.
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getCurrentUserWithHttpInfo() throws ApiException { + public ApiResponse getCurrentUserWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getCurrentUserValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1359,16 +1398,17 @@ public ApiResponse getCurrentUserWithHttpInfo() throws ApiException * @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.
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getCurrentUserAsync(final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCurrentUserAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCurrentUserValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1378,7 +1418,8 @@ public okhttp3.Call getCurrentUserAsync(final ApiCallback _callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1440,7 +1481,8 @@ private okhttp3.Call getGlobalAvatarModerationsValidateBeforeCall(final ApiCallb * @return List<AvatarModeration> * @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 list of globally blocked avatars with timestamps -
401 Error response due to missing auth cookie. -
+
+ @@ -1457,7 +1499,8 @@ public List getGlobalAvatarModerations() throws ApiException { * @return ApiResponse<List<AvatarModeration>> * @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 list of globally blocked avatars with timestamps -
401 Error response due to missing auth cookie. -
+
+ @@ -1476,7 +1519,8 @@ public ApiResponse> getGlobalAvatarModerationsWithHttpInf * @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 list of globally blocked avatars with timestamps -
401 Error response due to missing auth cookie. -
+
+ @@ -1500,14 +1544,15 @@ public okhttp3.Call getGlobalAvatarModerationsAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns list of globally blocked avatars with timestamps -
401 Error response due to missing auth cookie. -
+
Response Details
Status Code Description Response Headers
200 Returns a list of ModerationReport objects, wrapped in new pagination format. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public okhttp3.Call getModerationReportsCall(Integer offset, Integer n, String reportingUserId, String status, String type, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getModerationReportsCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable String reportingUserId, @javax.annotation.Nullable String status, @javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1572,7 +1617,7 @@ public okhttp3.Call getModerationReportsCall(Integer offset, Integer n, String r } @SuppressWarnings("rawtypes") - private okhttp3.Call getModerationReportsValidateBeforeCall(Integer offset, Integer n, String reportingUserId, String status, String type, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getModerationReportsValidateBeforeCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable String reportingUserId, @javax.annotation.Nullable String status, @javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { return getModerationReportsCall(offset, n, reportingUserId, status, type, _callback); } @@ -1588,14 +1633,15 @@ private okhttp3.Call getModerationReportsValidateBeforeCall(Integer offset, Inte * @return PaginatedModerationReportList * @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 list of ModerationReport objects, wrapped in new pagination format. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public PaginatedModerationReportList getModerationReports(Integer offset, Integer n, String reportingUserId, String status, String type) throws ApiException { + public PaginatedModerationReportList getModerationReports(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable String reportingUserId, @javax.annotation.Nullable String status, @javax.annotation.Nullable String type) throws ApiException { ApiResponse localVarResp = getModerationReportsWithHttpInfo(offset, n, reportingUserId, status, type); return localVarResp.getData(); } @@ -1611,14 +1657,15 @@ public PaginatedModerationReportList getModerationReports(Integer offset, Intege * @return ApiResponse<PaginatedModerationReportList> * @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 list of ModerationReport objects, wrapped in new pagination format. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public ApiResponse getModerationReportsWithHttpInfo(Integer offset, Integer n, String reportingUserId, String status, String type) throws ApiException { + public ApiResponse getModerationReportsWithHttpInfo(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable String reportingUserId, @javax.annotation.Nullable String status, @javax.annotation.Nullable String type) throws ApiException { okhttp3.Call localVarCall = getModerationReportsValidateBeforeCall(offset, n, reportingUserId, status, type, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1636,14 +1683,15 @@ public ApiResponse getModerationReportsWithHttpIn * @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 list of ModerationReport objects, wrapped in new pagination format. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public okhttp3.Call getModerationReportsAsync(Integer offset, Integer n, String reportingUserId, String status, String type, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getModerationReportsAsync(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable String reportingUserId, @javax.annotation.Nullable String status, @javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getModerationReportsValidateBeforeCall(offset, n, reportingUserId, status, type, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1656,7 +1704,8 @@ public okhttp3.Call getModerationReportsAsync(Integer offset, Integer n, String * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1718,7 +1767,8 @@ private okhttp3.Call getRecoveryCodesValidateBeforeCall(final ApiCallback _callb * @return TwoFactorRecoveryCodes * @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 the two factor recovery codes -
401 Error response due to missing auth cookie. -
+
+ @@ -1735,7 +1785,8 @@ public TwoFactorRecoveryCodes getRecoveryCodes() throws ApiException { * @return ApiResponse<TwoFactorRecoveryCodes> * @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 the two factor recovery codes -
401 Error response due to missing auth cookie. -
+
+ @@ -1754,7 +1805,8 @@ public ApiResponse getRecoveryCodesWithHttpInfo() throws * @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 the two factor recovery codes -
401 Error response due to missing auth cookie. -
+
+ @@ -1773,7 +1825,8 @@ public okhttp3.Call getRecoveryCodesAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns the two factor recovery codes -
401 Error response due to missing auth cookie. -
+ @@ -1835,7 +1888,8 @@ private okhttp3.Call logoutValidateBeforeCall(final ApiCallback _callback) throw * @return Success * @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 auth cookie. -
+
+ @@ -1852,7 +1906,8 @@ public Success logout() throws ApiException { * @return ApiResponse<Success> * @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 auth cookie. -
+
+ @@ -1871,7 +1926,8 @@ public ApiResponse logoutWithHttpInfo() throws ApiException { * @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 - Clears the `auth` cookie.
* \0Set-Cookie - Clears the `age` cookie.
* \0\0Set-Cookie - Clears the `tos` cookie.
401 Error response due to missing auth cookie. -
+
+ @@ -1891,7 +1947,8 @@ public okhttp3.Call logoutAsync(final ApiCallback _callback) throws Api * @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 auth cookie. -
+
+ @@ -1899,7 +1956,7 @@ public okhttp3.Call logoutAsync(final ApiCallback _callback) throws Api * @deprecated */ @Deprecated - public okhttp3.Call registerUserAccountCall(RegisterUserAccountRequest registerUserAccountRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call registerUserAccountCall(@javax.annotation.Nonnull RegisterUserAccountRequest registerUserAccountRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1946,7 +2003,7 @@ public okhttp3.Call registerUserAccountCall(RegisterUserAccountRequest registerU @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call registerUserAccountValidateBeforeCall(RegisterUserAccountRequest registerUserAccountRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call registerUserAccountValidateBeforeCall(@javax.annotation.Nonnull RegisterUserAccountRequest registerUserAccountRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'registerUserAccountRequest' is set if (registerUserAccountRequest == null) { throw new ApiException("Missing the required parameter 'registerUserAccountRequest' when calling registerUserAccount(Async)"); @@ -1960,10 +2017,11 @@ private okhttp3.Call registerUserAccountValidateBeforeCall(RegisterUserAccountRe * Register User Account * ~~Register a new user account.~~ **DEPRECATED:** Automated creation of accounts has no legitimate public third-party use case, and would be in violation of ToS §13.2: *By using the Platform, you agree not to: i. [...] use the Platform in a manner inconsistent with individual human usage* This endpoint is documented in the interest of completeness * @param registerUserAccountRequest (required) - * @return CurrentUser + * @return RegisterUserAccount200Response * @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.
401 Error response due to missing auth cookie. -
+
+ @@ -1971,8 +2029,8 @@ private okhttp3.Call registerUserAccountValidateBeforeCall(RegisterUserAccountRe * @deprecated */ @Deprecated - public CurrentUser registerUserAccount(RegisterUserAccountRequest registerUserAccountRequest) throws ApiException { - ApiResponse localVarResp = registerUserAccountWithHttpInfo(registerUserAccountRequest); + public RegisterUserAccount200Response registerUserAccount(@javax.annotation.Nonnull RegisterUserAccountRequest registerUserAccountRequest) throws ApiException { + ApiResponse localVarResp = registerUserAccountWithHttpInfo(registerUserAccountRequest); return localVarResp.getData(); } @@ -1980,10 +2038,11 @@ public CurrentUser registerUserAccount(RegisterUserAccountRequest registerUserAc * Register User Account * ~~Register a new user account.~~ **DEPRECATED:** Automated creation of accounts has no legitimate public third-party use case, and would be in violation of ToS §13.2: *By using the Platform, you agree not to: i. [...] use the Platform in a manner inconsistent with individual human usage* This endpoint is documented in the interest of completeness * @param registerUserAccountRequest (required) - * @return ApiResponse<CurrentUser> + * @return ApiResponse<RegisterUserAccount200Response> * @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.
401 Error response due to missing auth cookie. -
+
+ @@ -1991,9 +2050,9 @@ public CurrentUser registerUserAccount(RegisterUserAccountRequest registerUserAc * @deprecated */ @Deprecated - public ApiResponse registerUserAccountWithHttpInfo(RegisterUserAccountRequest registerUserAccountRequest) throws ApiException { + public ApiResponse registerUserAccountWithHttpInfo(@javax.annotation.Nonnull RegisterUserAccountRequest registerUserAccountRequest) throws ApiException { okhttp3.Call localVarCall = registerUserAccountValidateBeforeCall(registerUserAccountRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -2005,7 +2064,8 @@ public ApiResponse registerUserAccountWithHttpInfo(RegisterUserAcco * @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.
401 Error response due to missing auth cookie. -
+
+ @@ -2013,10 +2073,10 @@ public ApiResponse registerUserAccountWithHttpInfo(RegisterUserAcco * @deprecated */ @Deprecated - public okhttp3.Call registerUserAccountAsync(RegisterUserAccountRequest registerUserAccountRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call registerUserAccountAsync(@javax.annotation.Nonnull RegisterUserAccountRequest registerUserAccountRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = registerUserAccountValidateBeforeCall(registerUserAccountRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -2026,7 +2086,8 @@ public okhttp3.Call registerUserAccountAsync(RegisterUserAccountRequest register * @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.
401 Error response due to missing auth cookie. -
+
+ @@ -2088,7 +2149,8 @@ private okhttp3.Call resendEmailConfirmationValidateBeforeCall(final ApiCallback * @return Success * @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. -
+
+ @@ -2105,7 +2167,8 @@ public Success resendEmailConfirmation() throws ApiException { * @return ApiResponse<Success> * @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. -
+
+ @@ -2124,7 +2187,8 @@ public ApiResponse resendEmailConfirmationWithHttpInfo() throws ApiExce * @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. -
+
+ @@ -2144,13 +2208,14 @@ public okhttp3.Call resendEmailConfirmationAsync(final ApiCallback _cal * @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. -
+
+
Response Details
Status Code Description Response Headers
200 Returns a single ModerationReport object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call submitModerationReportCall(SubmitModerationReportRequest submitModerationReportRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call submitModerationReportCall(@javax.annotation.Nonnull SubmitModerationReportRequest submitModerationReportRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2196,7 +2261,7 @@ public okhttp3.Call submitModerationReportCall(SubmitModerationReportRequest sub } @SuppressWarnings("rawtypes") - private okhttp3.Call submitModerationReportValidateBeforeCall(SubmitModerationReportRequest submitModerationReportRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call submitModerationReportValidateBeforeCall(@javax.annotation.Nonnull SubmitModerationReportRequest submitModerationReportRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'submitModerationReportRequest' is set if (submitModerationReportRequest == null) { throw new ApiException("Missing the required parameter 'submitModerationReportRequest' when calling submitModerationReport(Async)"); @@ -2213,13 +2278,14 @@ private okhttp3.Call submitModerationReportValidateBeforeCall(SubmitModerationRe * @return ModerationReport * @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 single ModerationReport object. -
401 Error response due to missing auth cookie. -
*/ - public ModerationReport submitModerationReport(SubmitModerationReportRequest submitModerationReportRequest) throws ApiException { + public ModerationReport submitModerationReport(@javax.annotation.Nonnull SubmitModerationReportRequest submitModerationReportRequest) throws ApiException { ApiResponse localVarResp = submitModerationReportWithHttpInfo(submitModerationReportRequest); return localVarResp.getData(); } @@ -2231,13 +2297,14 @@ public ModerationReport submitModerationReport(SubmitModerationReportRequest sub * @return ApiResponse<ModerationReport> * @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 single ModerationReport object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse submitModerationReportWithHttpInfo(SubmitModerationReportRequest submitModerationReportRequest) throws ApiException { + public ApiResponse submitModerationReportWithHttpInfo(@javax.annotation.Nonnull SubmitModerationReportRequest submitModerationReportRequest) throws ApiException { okhttp3.Call localVarCall = submitModerationReportValidateBeforeCall(submitModerationReportRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2251,13 +2318,14 @@ public ApiResponse submitModerationReportWithHttpInfo(SubmitMo * @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 single ModerationReport object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call submitModerationReportAsync(SubmitModerationReportRequest submitModerationReportRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call submitModerationReportAsync(@javax.annotation.Nonnull SubmitModerationReportRequest submitModerationReportRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = submitModerationReportValidateBeforeCall(submitModerationReportRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2271,13 +2339,14 @@ public okhttp3.Call submitModerationReportAsync(SubmitModerationReportRequest su * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call verify2FACall(TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verify2FACall(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2323,7 +2392,7 @@ public okhttp3.Call verify2FACall(TwoFactorAuthCode twoFactorAuthCode, final Api } @SuppressWarnings("rawtypes") - private okhttp3.Call verify2FAValidateBeforeCall(TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + private okhttp3.Call verify2FAValidateBeforeCall(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { // verify the required parameter 'twoFactorAuthCode' is set if (twoFactorAuthCode == null) { throw new ApiException("Missing the required parameter 'twoFactorAuthCode' when calling verify2FA(Async)"); @@ -2340,13 +2409,14 @@ private okhttp3.Call verify2FAValidateBeforeCall(TwoFactorAuthCode twoFactorAuth * @return Verify2FAResult * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public Verify2FAResult verify2FA(TwoFactorAuthCode twoFactorAuthCode) throws ApiException { + public Verify2FAResult verify2FA(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode) throws ApiException { ApiResponse localVarResp = verify2FAWithHttpInfo(twoFactorAuthCode); return localVarResp.getData(); } @@ -2358,13 +2428,14 @@ public Verify2FAResult verify2FA(TwoFactorAuthCode twoFactorAuthCode) throws Api * @return ApiResponse<Verify2FAResult> * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public ApiResponse verify2FAWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode) throws ApiException { + public ApiResponse verify2FAWithHttpInfo(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode) throws ApiException { okhttp3.Call localVarCall = verify2FAValidateBeforeCall(twoFactorAuthCode, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2378,13 +2449,14 @@ public ApiResponse verify2FAWithHttpInfo(TwoFactorAuthCode twoF * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call verify2FAAsync(TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verify2FAAsync(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = verify2FAValidateBeforeCall(twoFactorAuthCode, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2398,13 +2470,14 @@ public okhttp3.Call verify2FAAsync(TwoFactorAuthCode twoFactorAuthCode, final Ap * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call verify2FAEmailCodeCall(TwoFactorEmailCode twoFactorEmailCode, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verify2FAEmailCodeCall(@javax.annotation.Nonnull TwoFactorEmailCode twoFactorEmailCode, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2450,7 +2523,7 @@ public okhttp3.Call verify2FAEmailCodeCall(TwoFactorEmailCode twoFactorEmailCode } @SuppressWarnings("rawtypes") - private okhttp3.Call verify2FAEmailCodeValidateBeforeCall(TwoFactorEmailCode twoFactorEmailCode, final ApiCallback _callback) throws ApiException { + private okhttp3.Call verify2FAEmailCodeValidateBeforeCall(@javax.annotation.Nonnull TwoFactorEmailCode twoFactorEmailCode, final ApiCallback _callback) throws ApiException { // verify the required parameter 'twoFactorEmailCode' is set if (twoFactorEmailCode == null) { throw new ApiException("Missing the required parameter 'twoFactorEmailCode' when calling verify2FAEmailCode(Async)"); @@ -2467,13 +2540,14 @@ private okhttp3.Call verify2FAEmailCodeValidateBeforeCall(TwoFactorEmailCode two * @return Verify2FAEmailCodeResult * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public Verify2FAEmailCodeResult verify2FAEmailCode(TwoFactorEmailCode twoFactorEmailCode) throws ApiException { + public Verify2FAEmailCodeResult verify2FAEmailCode(@javax.annotation.Nonnull TwoFactorEmailCode twoFactorEmailCode) throws ApiException { ApiResponse localVarResp = verify2FAEmailCodeWithHttpInfo(twoFactorEmailCode); return localVarResp.getData(); } @@ -2485,13 +2559,14 @@ public Verify2FAEmailCodeResult verify2FAEmailCode(TwoFactorEmailCode twoFactorE * @return ApiResponse<Verify2FAEmailCodeResult> * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public ApiResponse verify2FAEmailCodeWithHttpInfo(TwoFactorEmailCode twoFactorEmailCode) throws ApiException { + public ApiResponse verify2FAEmailCodeWithHttpInfo(@javax.annotation.Nonnull TwoFactorEmailCode twoFactorEmailCode) throws ApiException { okhttp3.Call localVarCall = verify2FAEmailCodeValidateBeforeCall(twoFactorEmailCode, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2505,13 +2580,14 @@ public ApiResponse verify2FAEmailCodeWithHttpInfo(TwoF * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call verify2FAEmailCodeAsync(TwoFactorEmailCode twoFactorEmailCode, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verify2FAEmailCodeAsync(@javax.annotation.Nonnull TwoFactorEmailCode twoFactorEmailCode, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = verify2FAEmailCodeValidateBeforeCall(twoFactorEmailCode, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2524,7 +2600,8 @@ public okhttp3.Call verify2FAEmailCodeAsync(TwoFactorEmailCode twoFactorEmailCod * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -2586,7 +2663,8 @@ private okhttp3.Call verifyAuthTokenValidateBeforeCall(final ApiCallback _callba * @return VerifyAuthTokenResult * @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 wether a provided auth token is valid or not. -
401 Error response due to missing auth cookie. -
+
+ @@ -2603,7 +2681,8 @@ public VerifyAuthTokenResult verifyAuthToken() throws ApiException { * @return ApiResponse<VerifyAuthTokenResult> * @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 wether a provided auth token is valid or not. -
401 Error response due to missing auth cookie. -
+
+ @@ -2622,7 +2701,8 @@ public ApiResponse verifyAuthTokenWithHttpInfo() throws A * @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 wether a provided auth token is valid or not. -
401 Error response due to missing auth cookie. -
+
+ @@ -2643,12 +2723,13 @@ public okhttp3.Call verifyAuthTokenAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns wether a provided auth token is valid or not. -
401 Error response due to missing auth cookie. -
+
Response Details
Status Code Description Response Headers
302 OK -
*/ - public okhttp3.Call verifyLoginPlaceCall(String token, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyLoginPlaceCall(@javax.annotation.Nonnull String token, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2700,7 +2781,7 @@ public okhttp3.Call verifyLoginPlaceCall(String token, String userId, final ApiC } @SuppressWarnings("rawtypes") - private okhttp3.Call verifyLoginPlaceValidateBeforeCall(String token, String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call verifyLoginPlaceValidateBeforeCall(@javax.annotation.Nonnull String token, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'token' is set if (token == null) { throw new ApiException("Missing the required parameter 'token' when calling verifyLoginPlace(Async)"); @@ -2717,12 +2798,13 @@ private okhttp3.Call verifyLoginPlaceValidateBeforeCall(String token, String use * @param userId Filter by UserID. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
302 OK -
*/ - public void verifyLoginPlace(String token, String userId) throws ApiException { + public void verifyLoginPlace(@javax.annotation.Nonnull String token, @javax.annotation.Nullable String userId) throws ApiException { verifyLoginPlaceWithHttpInfo(token, userId); } @@ -2734,12 +2816,13 @@ public void verifyLoginPlace(String token, String userId) throws ApiException { * @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
302 OK -
*/ - public ApiResponse verifyLoginPlaceWithHttpInfo(String token, String userId) throws ApiException { + public ApiResponse verifyLoginPlaceWithHttpInfo(@javax.annotation.Nonnull String token, @javax.annotation.Nullable String userId) throws ApiException { okhttp3.Call localVarCall = verifyLoginPlaceValidateBeforeCall(token, userId, null); return localVarApiClient.execute(localVarCall); } @@ -2753,12 +2836,13 @@ public ApiResponse verifyLoginPlaceWithHttpInfo(String token, String userI * @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
302 OK -
*/ - public okhttp3.Call verifyLoginPlaceAsync(String token, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyLoginPlaceAsync(@javax.annotation.Nonnull String token, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = verifyLoginPlaceValidateBeforeCall(token, userId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -2771,13 +2855,14 @@ public okhttp3.Call verifyLoginPlaceAsync(String token, String userId, final Api * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call verifyPending2FACall(TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyPending2FACall(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2823,7 +2908,7 @@ public okhttp3.Call verifyPending2FACall(TwoFactorAuthCode twoFactorAuthCode, fi } @SuppressWarnings("rawtypes") - private okhttp3.Call verifyPending2FAValidateBeforeCall(TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + private okhttp3.Call verifyPending2FAValidateBeforeCall(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { // verify the required parameter 'twoFactorAuthCode' is set if (twoFactorAuthCode == null) { throw new ApiException("Missing the required parameter 'twoFactorAuthCode' when calling verifyPending2FA(Async)"); @@ -2840,13 +2925,14 @@ private okhttp3.Call verifyPending2FAValidateBeforeCall(TwoFactorAuthCode twoFac * @return Verify2FAResult * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public Verify2FAResult verifyPending2FA(TwoFactorAuthCode twoFactorAuthCode) throws ApiException { + public Verify2FAResult verifyPending2FA(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode) throws ApiException { ApiResponse localVarResp = verifyPending2FAWithHttpInfo(twoFactorAuthCode); return localVarResp.getData(); } @@ -2858,13 +2944,14 @@ public Verify2FAResult verifyPending2FA(TwoFactorAuthCode twoFactorAuthCode) thr * @return ApiResponse<Verify2FAResult> * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public ApiResponse verifyPending2FAWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode) throws ApiException { + public ApiResponse verifyPending2FAWithHttpInfo(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode) throws ApiException { okhttp3.Call localVarCall = verifyPending2FAValidateBeforeCall(twoFactorAuthCode, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2878,13 +2965,14 @@ public ApiResponse verifyPending2FAWithHttpInfo(TwoFactorAuthCo * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call verifyPending2FAAsync(TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyPending2FAAsync(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = verifyPending2FAValidateBeforeCall(twoFactorAuthCode, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2898,13 +2986,14 @@ public okhttp3.Call verifyPending2FAAsync(TwoFactorAuthCode twoFactorAuthCode, f * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call verifyRecoveryCodeCall(TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyRecoveryCodeCall(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2950,7 +3039,7 @@ public okhttp3.Call verifyRecoveryCodeCall(TwoFactorAuthCode twoFactorAuthCode, } @SuppressWarnings("rawtypes") - private okhttp3.Call verifyRecoveryCodeValidateBeforeCall(TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + private okhttp3.Call verifyRecoveryCodeValidateBeforeCall(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { // verify the required parameter 'twoFactorAuthCode' is set if (twoFactorAuthCode == null) { throw new ApiException("Missing the required parameter 'twoFactorAuthCode' when calling verifyRecoveryCode(Async)"); @@ -2967,13 +3056,14 @@ private okhttp3.Call verifyRecoveryCodeValidateBeforeCall(TwoFactorAuthCode twoF * @return Verify2FAResult * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public Verify2FAResult verifyRecoveryCode(TwoFactorAuthCode twoFactorAuthCode) throws ApiException { + public Verify2FAResult verifyRecoveryCode(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode) throws ApiException { ApiResponse localVarResp = verifyRecoveryCodeWithHttpInfo(twoFactorAuthCode); return localVarResp.getData(); } @@ -2985,13 +3075,14 @@ public Verify2FAResult verifyRecoveryCode(TwoFactorAuthCode twoFactorAuthCode) t * @return ApiResponse<Verify2FAResult> * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public ApiResponse verifyRecoveryCodeWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode) throws ApiException { + public ApiResponse verifyRecoveryCodeWithHttpInfo(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode) throws ApiException { okhttp3.Call localVarCall = verifyRecoveryCodeValidateBeforeCall(twoFactorAuthCode, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3005,13 +3096,14 @@ public ApiResponse verifyRecoveryCodeWithHttpInfo(TwoFactorAuth * @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 - Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device.
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call verifyRecoveryCodeAsync(TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyRecoveryCodeAsync(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = verifyRecoveryCodeValidateBeforeCall(twoFactorAuthCode, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/AvatarsApi.java b/src/main/java/io/github/vrchatapi/api/AvatarsApi.java index b0f5f3de..565c06c4 100644 --- a/src/main/java/io/github/vrchatapi/api/AvatarsApi.java +++ b/src/main/java/io/github/vrchatapi/api/AvatarsApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -43,7 +43,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class AvatarsApi { private ApiClient localVarApiClient; @@ -89,14 +88,15 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 single Avatar object. -
400 Error response due to missing permissions. -
401 Error response when set featured to true without being an admin. -
*/ - public okhttp3.Call createAvatarCall(CreateAvatarRequest createAvatarRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAvatarCall(@javax.annotation.Nullable CreateAvatarRequest createAvatarRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -142,7 +142,7 @@ public okhttp3.Call createAvatarCall(CreateAvatarRequest createAvatarRequest, fi } @SuppressWarnings("rawtypes") - private okhttp3.Call createAvatarValidateBeforeCall(CreateAvatarRequest createAvatarRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createAvatarValidateBeforeCall(@javax.annotation.Nullable CreateAvatarRequest createAvatarRequest, final ApiCallback _callback) throws ApiException { return createAvatarCall(createAvatarRequest, _callback); } @@ -154,14 +154,15 @@ private okhttp3.Call createAvatarValidateBeforeCall(CreateAvatarRequest createAv * @return Avatar * @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 single Avatar object. -
400 Error response due to missing permissions. -
401 Error response when set featured to true without being an admin. -
*/ - public Avatar createAvatar(CreateAvatarRequest createAvatarRequest) throws ApiException { + public Avatar createAvatar(@javax.annotation.Nullable CreateAvatarRequest createAvatarRequest) throws ApiException { ApiResponse localVarResp = createAvatarWithHttpInfo(createAvatarRequest); return localVarResp.getData(); } @@ -173,14 +174,15 @@ public Avatar createAvatar(CreateAvatarRequest createAvatarRequest) throws ApiEx * @return ApiResponse<Avatar> * @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 single Avatar object. -
400 Error response due to missing permissions. -
401 Error response when set featured to true without being an admin. -
*/ - public ApiResponse createAvatarWithHttpInfo(CreateAvatarRequest createAvatarRequest) throws ApiException { + public ApiResponse createAvatarWithHttpInfo(@javax.annotation.Nullable CreateAvatarRequest createAvatarRequest) throws ApiException { okhttp3.Call localVarCall = createAvatarValidateBeforeCall(createAvatarRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -194,14 +196,15 @@ public ApiResponse createAvatarWithHttpInfo(CreateAvatarRequest createAv * @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 single Avatar object. -
400 Error response due to missing permissions. -
401 Error response when set featured to true without being an admin. -
*/ - public okhttp3.Call createAvatarAsync(CreateAvatarRequest createAvatarRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAvatarAsync(@javax.annotation.Nullable CreateAvatarRequest createAvatarRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createAvatarValidateBeforeCall(createAvatarRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -215,14 +218,15 @@ public okhttp3.Call createAvatarAsync(CreateAvatarRequest createAvatarRequest, f * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call deleteAvatarCall(String avatarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAvatarCall(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -268,7 +272,7 @@ public okhttp3.Call deleteAvatarCall(String avatarId, final ApiCallback _callbac } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteAvatarValidateBeforeCall(String avatarId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteAvatarValidateBeforeCall(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'avatarId' is set if (avatarId == null) { throw new ApiException("Missing the required parameter 'avatarId' when calling deleteAvatar(Async)"); @@ -285,14 +289,15 @@ private okhttp3.Call deleteAvatarValidateBeforeCall(String avatarId, final ApiCa * @return Avatar * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public Avatar deleteAvatar(String avatarId) throws ApiException { + public Avatar deleteAvatar(@javax.annotation.Nonnull String avatarId) throws ApiException { ApiResponse localVarResp = deleteAvatarWithHttpInfo(avatarId); return localVarResp.getData(); } @@ -304,14 +309,15 @@ public Avatar deleteAvatar(String avatarId) throws ApiException { * @return ApiResponse<Avatar> * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public ApiResponse deleteAvatarWithHttpInfo(String avatarId) throws ApiException { + public ApiResponse deleteAvatarWithHttpInfo(@javax.annotation.Nonnull String avatarId) throws ApiException { okhttp3.Call localVarCall = deleteAvatarValidateBeforeCall(avatarId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -325,14 +331,15 @@ public ApiResponse deleteAvatarWithHttpInfo(String avatarId) throws ApiE * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call deleteAvatarAsync(String avatarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAvatarAsync(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteAvatarValidateBeforeCall(avatarId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -346,14 +353,15 @@ public okhttp3.Call deleteAvatarAsync(String avatarId, final ApiCallback * @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 The Impostors generated for that avatar are deleted. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call deleteImpostorCall(String avatarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteImpostorCall(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -399,7 +407,7 @@ public okhttp3.Call deleteImpostorCall(String avatarId, final ApiCallback _callb } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteImpostorValidateBeforeCall(String avatarId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteImpostorValidateBeforeCall(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'avatarId' is set if (avatarId == null) { throw new ApiException("Missing the required parameter 'avatarId' when calling deleteImpostor(Async)"); @@ -415,14 +423,15 @@ private okhttp3.Call deleteImpostorValidateBeforeCall(String avatarId, final Api * @param avatarId Must be a valid avatar ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 The Impostors generated for that avatar are deleted. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public void deleteImpostor(String avatarId) throws ApiException { + public void deleteImpostor(@javax.annotation.Nonnull String avatarId) throws ApiException { deleteImpostorWithHttpInfo(avatarId); } @@ -433,14 +442,15 @@ public void deleteImpostor(String avatarId) throws ApiException { * @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 The Impostors generated for that avatar are deleted. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public ApiResponse deleteImpostorWithHttpInfo(String avatarId) throws ApiException { + public ApiResponse deleteImpostorWithHttpInfo(@javax.annotation.Nonnull String avatarId) throws ApiException { okhttp3.Call localVarCall = deleteImpostorValidateBeforeCall(avatarId, null); return localVarApiClient.execute(localVarCall); } @@ -453,14 +463,15 @@ public ApiResponse deleteImpostorWithHttpInfo(String avatarId) throws ApiE * @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 The Impostors generated for that avatar are deleted. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call deleteImpostorAsync(String avatarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteImpostorAsync(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteImpostorValidateBeforeCall(avatarId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -473,14 +484,15 @@ public okhttp3.Call deleteImpostorAsync(String avatarId, final ApiCallback * @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 Service Status. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call enqueueImpostorCall(String avatarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call enqueueImpostorCall(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -526,7 +538,7 @@ public okhttp3.Call enqueueImpostorCall(String avatarId, final ApiCallback _call } @SuppressWarnings("rawtypes") - private okhttp3.Call enqueueImpostorValidateBeforeCall(String avatarId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call enqueueImpostorValidateBeforeCall(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'avatarId' is set if (avatarId == null) { throw new ApiException("Missing the required parameter 'avatarId' when calling enqueueImpostor(Async)"); @@ -543,14 +555,15 @@ private okhttp3.Call enqueueImpostorValidateBeforeCall(String avatarId, final Ap * @return ServiceStatus * @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 Service Status. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public ServiceStatus enqueueImpostor(String avatarId) throws ApiException { + public ServiceStatus enqueueImpostor(@javax.annotation.Nonnull String avatarId) throws ApiException { ApiResponse localVarResp = enqueueImpostorWithHttpInfo(avatarId); return localVarResp.getData(); } @@ -562,14 +575,15 @@ public ServiceStatus enqueueImpostor(String avatarId) throws ApiException { * @return ApiResponse<ServiceStatus> * @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 Service Status. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public ApiResponse enqueueImpostorWithHttpInfo(String avatarId) throws ApiException { + public ApiResponse enqueueImpostorWithHttpInfo(@javax.annotation.Nonnull String avatarId) throws ApiException { okhttp3.Call localVarCall = enqueueImpostorValidateBeforeCall(avatarId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -583,14 +597,15 @@ public ApiResponse enqueueImpostorWithHttpInfo(String avatarId) t * @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 Service Status. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call enqueueImpostorAsync(String avatarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call enqueueImpostorAsync(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = enqueueImpostorValidateBeforeCall(avatarId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -604,14 +619,15 @@ public okhttp3.Call enqueueImpostorAsync(String avatarId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call getAvatarCall(String avatarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAvatarCall(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -657,7 +673,7 @@ public okhttp3.Call getAvatarCall(String avatarId, final ApiCallback _callback) } @SuppressWarnings("rawtypes") - private okhttp3.Call getAvatarValidateBeforeCall(String avatarId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAvatarValidateBeforeCall(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'avatarId' is set if (avatarId == null) { throw new ApiException("Missing the required parameter 'avatarId' when calling getAvatar(Async)"); @@ -674,14 +690,15 @@ private okhttp3.Call getAvatarValidateBeforeCall(String avatarId, final ApiCallb * @return Avatar * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public Avatar getAvatar(String avatarId) throws ApiException { + public Avatar getAvatar(@javax.annotation.Nonnull String avatarId) throws ApiException { ApiResponse localVarResp = getAvatarWithHttpInfo(avatarId); return localVarResp.getData(); } @@ -693,14 +710,15 @@ public Avatar getAvatar(String avatarId) throws ApiException { * @return ApiResponse<Avatar> * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public ApiResponse getAvatarWithHttpInfo(String avatarId) throws ApiException { + public ApiResponse getAvatarWithHttpInfo(@javax.annotation.Nonnull String avatarId) throws ApiException { okhttp3.Call localVarCall = getAvatarValidateBeforeCall(avatarId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -714,14 +732,15 @@ public ApiResponse getAvatarWithHttpInfo(String avatarId) throws ApiExce * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call getAvatarAsync(String avatarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAvatarAsync(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAvatarValidateBeforeCall(avatarId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -734,7 +753,8 @@ public okhttp3.Call getAvatarAsync(String avatarId, final ApiCallback _c * @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 list of AvatarStyle objects. -
@@ -795,7 +815,8 @@ private okhttp3.Call getAvatarStylesValidateBeforeCall(final ApiCallback _callba * @return List<AvatarStyle> * @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 list of AvatarStyle objects. -
@@ -811,7 +832,8 @@ public List getAvatarStyles() throws ApiException { * @return ApiResponse<List<AvatarStyle>> * @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 list of AvatarStyle objects. -
@@ -829,7 +851,8 @@ public ApiResponse> getAvatarStylesWithHttpInfo() throws ApiEx * @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 list of AvatarStyle objects. -
@@ -860,14 +883,15 @@ public okhttp3.Call getAvatarStylesAsync(final ApiCallback> _c * @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 list of Avatar objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favourited avatars of another user without sufficient admin permissions. -
403 Error response when trying to see favorited avatars of another user without sufficient admin permissions. -
*/ - public okhttp3.Call getFavoritedAvatarsCall(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFavoritedAvatarsCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -964,7 +988,7 @@ public okhttp3.Call getFavoritedAvatarsCall(Boolean featured, SortOption sort, I } @SuppressWarnings("rawtypes") - private okhttp3.Call getFavoritedAvatarsValidateBeforeCall(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFavoritedAvatarsValidateBeforeCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { return getFavoritedAvatarsCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, _callback); } @@ -988,14 +1012,15 @@ private okhttp3.Call getFavoritedAvatarsValidateBeforeCall(Boolean featured, Sor * @return List<Avatar> * @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 list of Avatar objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favourited avatars of another user without sufficient admin permissions. -
403 Error response when trying to see favorited avatars of another user without sufficient admin permissions. -
*/ - public List getFavoritedAvatars(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId) throws ApiException { + public List getFavoritedAvatars(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId) throws ApiException { ApiResponse> localVarResp = getFavoritedAvatarsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); return localVarResp.getData(); } @@ -1019,14 +1044,15 @@ public List getFavoritedAvatars(Boolean featured, SortOption sort, Integ * @return ApiResponse<List<Avatar>> * @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 list of Avatar objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favourited avatars of another user without sufficient admin permissions. -
403 Error response when trying to see favorited avatars of another user without sufficient admin permissions. -
*/ - public ApiResponse> getFavoritedAvatarsWithHttpInfo(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId) throws ApiException { + public ApiResponse> getFavoritedAvatarsWithHttpInfo(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId) throws ApiException { okhttp3.Call localVarCall = getFavoritedAvatarsValidateBeforeCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1052,14 +1078,15 @@ public ApiResponse> getFavoritedAvatarsWithHttpInfo(Boolean feature * @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 list of Avatar objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favourited avatars of another user without sufficient admin permissions. -
403 Error response when trying to see favorited avatars of another user without sufficient admin permissions. -
*/ - public okhttp3.Call getFavoritedAvatarsAsync(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getFavoritedAvatarsAsync(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getFavoritedAvatarsValidateBeforeCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1072,7 +1099,8 @@ public okhttp3.Call getFavoritedAvatarsAsync(Boolean featured, SortOption sort, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1134,7 +1162,8 @@ private okhttp3.Call getImpostorQueueStatsValidateBeforeCall(final ApiCallback _ * @return ServiceQueueStats * @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 Service Queue Stats. -
401 Error response due to missing auth cookie. -
+
+ @@ -1151,7 +1180,8 @@ public ServiceQueueStats getImpostorQueueStats() throws ApiException { * @return ApiResponse<ServiceQueueStats> * @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 Service Queue Stats. -
401 Error response due to missing auth cookie. -
+
+ @@ -1170,7 +1200,8 @@ public ApiResponse getImpostorQueueStatsWithHttpInfo() throws * @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 Service Queue Stats. -
401 Error response due to missing auth cookie. -
+
+ @@ -1191,13 +1222,14 @@ public okhttp3.Call getImpostorQueueStatsAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns a Service Queue Stats. -
401 Error response due to missing auth cookie. -
+
Response Details
Status Code Description Response Headers
200 Returns a list of Avatar objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getLicensedAvatarsCall(Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLicensedAvatarsCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1250,7 +1282,7 @@ public okhttp3.Call getLicensedAvatarsCall(Integer n, Integer offset, final ApiC } @SuppressWarnings("rawtypes") - private okhttp3.Call getLicensedAvatarsValidateBeforeCall(Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getLicensedAvatarsValidateBeforeCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { return getLicensedAvatarsCall(n, offset, _callback); } @@ -1263,13 +1295,14 @@ private okhttp3.Call getLicensedAvatarsValidateBeforeCall(Integer n, Integer off * @return List<Avatar> * @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 list of Avatar objects. -
401 Error response due to missing auth cookie. -
*/ - public List getLicensedAvatars(Integer n, Integer offset) throws ApiException { + public List getLicensedAvatars(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = getLicensedAvatarsWithHttpInfo(n, offset); return localVarResp.getData(); } @@ -1282,13 +1315,14 @@ public List getLicensedAvatars(Integer n, Integer offset) throws ApiExce * @return ApiResponse<List<Avatar>> * @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 list of Avatar objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getLicensedAvatarsWithHttpInfo(Integer n, Integer offset) throws ApiException { + public ApiResponse> getLicensedAvatarsWithHttpInfo(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getLicensedAvatarsValidateBeforeCall(n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1303,13 +1337,14 @@ public ApiResponse> getLicensedAvatarsWithHttpInfo(Integer n, Integ * @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 list of Avatar objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getLicensedAvatarsAsync(Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getLicensedAvatarsAsync(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getLicensedAvatarsValidateBeforeCall(n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1323,14 +1358,15 @@ public okhttp3.Call getLicensedAvatarsAsync(Integer n, Integer offset, final Api * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see another users current avatar without sufficient admin permissions. -
*/ - public okhttp3.Call getOwnAvatarCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getOwnAvatarCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1376,7 +1412,7 @@ public okhttp3.Call getOwnAvatarCall(String userId, final ApiCallback _callback) } @SuppressWarnings("rawtypes") - private okhttp3.Call getOwnAvatarValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getOwnAvatarValidateBeforeCall(@javax.annotation.Nonnull 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 getOwnAvatar(Async)"); @@ -1393,14 +1429,15 @@ private okhttp3.Call getOwnAvatarValidateBeforeCall(String userId, final ApiCall * @return Avatar * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see another users current avatar without sufficient admin permissions. -
*/ - public Avatar getOwnAvatar(String userId) throws ApiException { + public Avatar getOwnAvatar(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getOwnAvatarWithHttpInfo(userId); return localVarResp.getData(); } @@ -1412,14 +1449,15 @@ public Avatar getOwnAvatar(String userId) throws ApiException { * @return ApiResponse<Avatar> * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see another users current avatar without sufficient admin permissions. -
*/ - public ApiResponse getOwnAvatarWithHttpInfo(String userId) throws ApiException { + public ApiResponse getOwnAvatarWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getOwnAvatarValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1433,14 +1471,15 @@ public ApiResponse getOwnAvatarWithHttpInfo(String userId) throws ApiExc * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see another users current avatar without sufficient admin permissions. -
*/ - public okhttp3.Call getOwnAvatarAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getOwnAvatarAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getOwnAvatarValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1467,13 +1506,14 @@ public okhttp3.Call getOwnAvatarAsync(String userId, final ApiCallback _ * @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 list of Avatar objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchAvatarsCall(Boolean featured, SortOption sort, String user, String userId, Integer n, OrderOption order, Integer offset, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchAvatarsCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable String user, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1574,7 +1614,7 @@ public okhttp3.Call searchAvatarsCall(Boolean featured, SortOption sort, String } @SuppressWarnings("rawtypes") - private okhttp3.Call searchAvatarsValidateBeforeCall(Boolean featured, SortOption sort, String user, String userId, Integer n, OrderOption order, Integer offset, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchAvatarsValidateBeforeCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable String user, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { return searchAvatarsCall(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, isInternalVariant, _callback); } @@ -1599,13 +1639,14 @@ private okhttp3.Call searchAvatarsValidateBeforeCall(Boolean featured, SortOptio * @return List<Avatar> * @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 list of Avatar objects. -
401 Error response due to missing auth cookie. -
*/ - public List searchAvatars(Boolean featured, SortOption sort, String user, String userId, Integer n, OrderOption order, Integer offset, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, Boolean isInternalVariant) throws ApiException { + public List searchAvatars(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable String user, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable Boolean isInternalVariant) throws ApiException { ApiResponse> localVarResp = searchAvatarsWithHttpInfo(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, isInternalVariant); return localVarResp.getData(); } @@ -1630,13 +1671,14 @@ public List searchAvatars(Boolean featured, SortOption sort, String user * @return ApiResponse<List<Avatar>> * @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 list of Avatar objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> searchAvatarsWithHttpInfo(Boolean featured, SortOption sort, String user, String userId, Integer n, OrderOption order, Integer offset, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, Boolean isInternalVariant) throws ApiException { + public ApiResponse> searchAvatarsWithHttpInfo(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable String user, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable Boolean isInternalVariant) throws ApiException { okhttp3.Call localVarCall = searchAvatarsValidateBeforeCall(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, isInternalVariant, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1663,13 +1705,14 @@ public ApiResponse> searchAvatarsWithHttpInfo(Boolean featured, Sor * @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 list of Avatar objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchAvatarsAsync(Boolean featured, SortOption sort, String user, String userId, Integer n, OrderOption order, Integer offset, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, Boolean isInternalVariant, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call searchAvatarsAsync(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable String user, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable Boolean isInternalVariant, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchAvatarsValidateBeforeCall(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, isInternalVariant, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1683,14 +1726,15 @@ public okhttp3.Call searchAvatarsAsync(Boolean featured, SortOption sort, String * @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 single CurrentUser object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call selectAvatarCall(String avatarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call selectAvatarCall(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1736,7 +1780,7 @@ public okhttp3.Call selectAvatarCall(String avatarId, final ApiCallback _callbac } @SuppressWarnings("rawtypes") - private okhttp3.Call selectAvatarValidateBeforeCall(String avatarId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call selectAvatarValidateBeforeCall(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'avatarId' is set if (avatarId == null) { throw new ApiException("Missing the required parameter 'avatarId' when calling selectAvatar(Async)"); @@ -1753,14 +1797,15 @@ private okhttp3.Call selectAvatarValidateBeforeCall(String avatarId, final ApiCa * @return CurrentUser * @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 single CurrentUser object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public CurrentUser selectAvatar(String avatarId) throws ApiException { + public CurrentUser selectAvatar(@javax.annotation.Nonnull String avatarId) throws ApiException { ApiResponse localVarResp = selectAvatarWithHttpInfo(avatarId); return localVarResp.getData(); } @@ -1772,14 +1817,15 @@ public CurrentUser selectAvatar(String avatarId) throws ApiException { * @return ApiResponse<CurrentUser> * @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 single CurrentUser object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public ApiResponse selectAvatarWithHttpInfo(String avatarId) throws ApiException { + public ApiResponse selectAvatarWithHttpInfo(@javax.annotation.Nonnull String avatarId) throws ApiException { okhttp3.Call localVarCall = selectAvatarValidateBeforeCall(avatarId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1793,14 +1839,15 @@ public ApiResponse selectAvatarWithHttpInfo(String avatarId) throws * @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 single CurrentUser object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call selectAvatarAsync(String avatarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call selectAvatarAsync(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = selectAvatarValidateBeforeCall(avatarId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1814,7 +1861,8 @@ public okhttp3.Call selectAvatarAsync(String avatarId, final ApiCallback + + @@ -1824,7 +1872,7 @@ public okhttp3.Call selectAvatarAsync(String avatarId, final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns a single CurrentUser object. -
401 Error response due to missing auth cookie. -
+ @@ -1898,7 +1947,7 @@ private okhttp3.Call selectFallbackAvatarValidateBeforeCall(String avatarId, fin * @deprecated */ @Deprecated - public CurrentUser selectFallbackAvatar(String avatarId) throws ApiException { + public CurrentUser selectFallbackAvatar(@javax.annotation.Nonnull String avatarId) throws ApiException { ApiResponse localVarResp = selectFallbackAvatarWithHttpInfo(avatarId); return localVarResp.getData(); } @@ -1910,7 +1959,8 @@ public CurrentUser selectFallbackAvatar(String avatarId) throws ApiException { * @return ApiResponse<CurrentUser> * @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 single CurrentUser object. -
401 Error response due to missing auth cookie. -
+
+ @@ -1920,7 +1970,7 @@ public CurrentUser selectFallbackAvatar(String avatarId) throws ApiException { * @deprecated */ @Deprecated - public ApiResponse selectFallbackAvatarWithHttpInfo(String avatarId) throws ApiException { + public ApiResponse selectFallbackAvatarWithHttpInfo(@javax.annotation.Nonnull String avatarId) throws ApiException { okhttp3.Call localVarCall = selectFallbackAvatarValidateBeforeCall(avatarId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1934,7 +1984,8 @@ public ApiResponse selectFallbackAvatarWithHttpInfo(String avatarId * @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 single CurrentUser object. -
401 Error response due to missing auth cookie. -
+
+ @@ -1944,7 +1995,7 @@ public ApiResponse selectFallbackAvatarWithHttpInfo(String avatarId * @deprecated */ @Deprecated - public okhttp3.Call selectFallbackAvatarAsync(String avatarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call selectFallbackAvatarAsync(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = selectFallbackAvatarValidateBeforeCall(avatarId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1959,14 +2010,15 @@ public okhttp3.Call selectFallbackAvatarAsync(String avatarId, final ApiCallback * @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 single CurrentUser object. -
401 Error response due to missing auth cookie. -
+
+
Response Details
Status Code Description Response Headers
200 Returns a single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call updateAvatarCall(String avatarId, UpdateAvatarRequest updateAvatarRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAvatarCall(@javax.annotation.Nonnull String avatarId, @javax.annotation.Nullable UpdateAvatarRequest updateAvatarRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2013,7 +2065,7 @@ public okhttp3.Call updateAvatarCall(String avatarId, UpdateAvatarRequest update } @SuppressWarnings("rawtypes") - private okhttp3.Call updateAvatarValidateBeforeCall(String avatarId, UpdateAvatarRequest updateAvatarRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateAvatarValidateBeforeCall(@javax.annotation.Nonnull String avatarId, @javax.annotation.Nullable UpdateAvatarRequest updateAvatarRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'avatarId' is set if (avatarId == null) { throw new ApiException("Missing the required parameter 'avatarId' when calling updateAvatar(Async)"); @@ -2031,14 +2083,15 @@ private okhttp3.Call updateAvatarValidateBeforeCall(String avatarId, UpdateAvata * @return Avatar * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public Avatar updateAvatar(String avatarId, UpdateAvatarRequest updateAvatarRequest) throws ApiException { + public Avatar updateAvatar(@javax.annotation.Nonnull String avatarId, @javax.annotation.Nullable UpdateAvatarRequest updateAvatarRequest) throws ApiException { ApiResponse localVarResp = updateAvatarWithHttpInfo(avatarId, updateAvatarRequest); return localVarResp.getData(); } @@ -2051,14 +2104,15 @@ public Avatar updateAvatar(String avatarId, UpdateAvatarRequest updateAvatarRequ * @return ApiResponse<Avatar> * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public ApiResponse updateAvatarWithHttpInfo(String avatarId, UpdateAvatarRequest updateAvatarRequest) throws ApiException { + public ApiResponse updateAvatarWithHttpInfo(@javax.annotation.Nonnull String avatarId, @javax.annotation.Nullable UpdateAvatarRequest updateAvatarRequest) throws ApiException { okhttp3.Call localVarCall = updateAvatarValidateBeforeCall(avatarId, updateAvatarRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2073,14 +2127,15 @@ public ApiResponse updateAvatarWithHttpInfo(String avatarId, UpdateAvata * @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 single Avatar object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent avatar. -
*/ - public okhttp3.Call updateAvatarAsync(String avatarId, UpdateAvatarRequest updateAvatarRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAvatarAsync(@javax.annotation.Nonnull String avatarId, @javax.annotation.Nullable UpdateAvatarRequest updateAvatarRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateAvatarValidateBeforeCall(avatarId, updateAvatarRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/CalendarApi.java b/src/main/java/io/github/vrchatapi/api/CalendarApi.java index 52fe4659..942f59cf 100644 --- a/src/main/java/io/github/vrchatapi/api/CalendarApi.java +++ b/src/main/java/io/github/vrchatapi/api/CalendarApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -44,7 +44,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class CalendarApi { private ApiClient localVarApiClient; @@ -91,7 +90,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -99,7 +99,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
Response Details
Status Code Description Response Headers
200 Returns a single CalendarEvent object. -
400 Error response due to an invalid or illegal calendar request. -
403 Error response due to an invalid or illegal calendar request. -
*/ - public okhttp3.Call createGroupCalendarEventCall(String groupId, CreateCalendarEventRequest createCalendarEventRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupCalendarEventCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateCalendarEventRequest createCalendarEventRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -146,7 +146,7 @@ public okhttp3.Call createGroupCalendarEventCall(String groupId, CreateCalendarE } @SuppressWarnings("rawtypes") - private okhttp3.Call createGroupCalendarEventValidateBeforeCall(String groupId, CreateCalendarEventRequest createCalendarEventRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createGroupCalendarEventValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateCalendarEventRequest createCalendarEventRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling createGroupCalendarEvent(Async)"); @@ -169,7 +169,8 @@ private okhttp3.Call createGroupCalendarEventValidateBeforeCall(String groupId, * @return CalendarEvent * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -177,7 +178,7 @@ private okhttp3.Call createGroupCalendarEventValidateBeforeCall(String groupId,
Response Details
Status Code Description Response Headers
200 Returns a single CalendarEvent object. -
400 Error response due to an invalid or illegal calendar request. -
403 Error response due to an invalid or illegal calendar request. -
*/ - public CalendarEvent createGroupCalendarEvent(String groupId, CreateCalendarEventRequest createCalendarEventRequest) throws ApiException { + public CalendarEvent createGroupCalendarEvent(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateCalendarEventRequest createCalendarEventRequest) throws ApiException { ApiResponse localVarResp = createGroupCalendarEventWithHttpInfo(groupId, createCalendarEventRequest); return localVarResp.getData(); } @@ -190,7 +191,8 @@ public CalendarEvent createGroupCalendarEvent(String groupId, CreateCalendarEven * @return ApiResponse<CalendarEvent> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -198,7 +200,7 @@ public CalendarEvent createGroupCalendarEvent(String groupId, CreateCalendarEven
Response Details
Status Code Description Response Headers
200 Returns a single CalendarEvent object. -
400 Error response due to an invalid or illegal calendar request. -
403 Error response due to an invalid or illegal calendar request. -
*/ - public ApiResponse createGroupCalendarEventWithHttpInfo(String groupId, CreateCalendarEventRequest createCalendarEventRequest) throws ApiException { + public ApiResponse createGroupCalendarEventWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateCalendarEventRequest createCalendarEventRequest) throws ApiException { okhttp3.Call localVarCall = createGroupCalendarEventValidateBeforeCall(groupId, createCalendarEventRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -213,7 +215,8 @@ public ApiResponse createGroupCalendarEventWithHttpInfo(String gr * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -221,7 +224,7 @@ public ApiResponse createGroupCalendarEventWithHttpInfo(String gr
Response Details
Status Code Description Response Headers
200 Returns a single CalendarEvent object. -
400 Error response due to an invalid or illegal calendar request. -
403 Error response due to an invalid or illegal calendar request. -
*/ - public okhttp3.Call createGroupCalendarEventAsync(String groupId, CreateCalendarEventRequest createCalendarEventRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupCalendarEventAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateCalendarEventRequest createCalendarEventRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createGroupCalendarEventValidateBeforeCall(groupId, createCalendarEventRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -236,14 +239,15 @@ public okhttp3.Call createGroupCalendarEventAsync(String groupId, CreateCalendar * @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 Successful response after deleting a calendar event. -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public okhttp3.Call deleteGroupCalendarEventCall(String groupId, String calendarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupCalendarEventCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -290,7 +294,7 @@ public okhttp3.Call deleteGroupCalendarEventCall(String groupId, String calendar } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteGroupCalendarEventValidateBeforeCall(String groupId, String calendarId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteGroupCalendarEventValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling deleteGroupCalendarEvent(Async)"); @@ -313,14 +317,15 @@ private okhttp3.Call deleteGroupCalendarEventValidateBeforeCall(String groupId, * @return Success * @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 Successful response after deleting a calendar event. -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public Success deleteGroupCalendarEvent(String groupId, String calendarId) throws ApiException { + public Success deleteGroupCalendarEvent(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId) throws ApiException { ApiResponse localVarResp = deleteGroupCalendarEventWithHttpInfo(groupId, calendarId); return localVarResp.getData(); } @@ -333,14 +338,15 @@ public Success deleteGroupCalendarEvent(String groupId, String calendarId) throw * @return ApiResponse<Success> * @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 Successful response after deleting a calendar event. -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public ApiResponse deleteGroupCalendarEventWithHttpInfo(String groupId, String calendarId) throws ApiException { + public ApiResponse deleteGroupCalendarEventWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId) throws ApiException { okhttp3.Call localVarCall = deleteGroupCalendarEventValidateBeforeCall(groupId, calendarId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -355,14 +361,15 @@ public ApiResponse deleteGroupCalendarEventWithHttpInfo(String groupId, * @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 Successful response after deleting a calendar event. -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public okhttp3.Call deleteGroupCalendarEventAsync(String groupId, String calendarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupCalendarEventAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteGroupCalendarEventValidateBeforeCall(groupId, calendarId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -386,13 +393,14 @@ public okhttp3.Call deleteGroupCalendarEventAsync(String groupId, String calenda * @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 CalendarEventDiscovery objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call discoverCalendarEventsCall(CalendarEventDiscoveryScope scope, String categories, String tags, CalendarEventDiscoveryInclusion featuredResults, CalendarEventDiscoveryInclusion nonFeaturedResults, CalendarEventDiscoveryInclusion personalizedResults, Integer minimumInterestCount, Integer minimumRemainingMinutes, Integer upcomingOffsetMinutes, Integer n, String nextCursor, final ApiCallback _callback) throws ApiException { + public okhttp3.Call discoverCalendarEventsCall(@javax.annotation.Nullable CalendarEventDiscoveryScope scope, @javax.annotation.Nullable String categories, @javax.annotation.Nullable String tags, @javax.annotation.Nullable CalendarEventDiscoveryInclusion featuredResults, @javax.annotation.Nullable CalendarEventDiscoveryInclusion nonFeaturedResults, @javax.annotation.Nullable CalendarEventDiscoveryInclusion personalizedResults, @javax.annotation.Nullable Integer minimumInterestCount, @javax.annotation.Nullable Integer minimumRemainingMinutes, @javax.annotation.Nullable Integer upcomingOffsetMinutes, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable String nextCursor, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -481,7 +489,7 @@ public okhttp3.Call discoverCalendarEventsCall(CalendarEventDiscoveryScope scope } @SuppressWarnings("rawtypes") - private okhttp3.Call discoverCalendarEventsValidateBeforeCall(CalendarEventDiscoveryScope scope, String categories, String tags, CalendarEventDiscoveryInclusion featuredResults, CalendarEventDiscoveryInclusion nonFeaturedResults, CalendarEventDiscoveryInclusion personalizedResults, Integer minimumInterestCount, Integer minimumRemainingMinutes, Integer upcomingOffsetMinutes, Integer n, String nextCursor, final ApiCallback _callback) throws ApiException { + private okhttp3.Call discoverCalendarEventsValidateBeforeCall(@javax.annotation.Nullable CalendarEventDiscoveryScope scope, @javax.annotation.Nullable String categories, @javax.annotation.Nullable String tags, @javax.annotation.Nullable CalendarEventDiscoveryInclusion featuredResults, @javax.annotation.Nullable CalendarEventDiscoveryInclusion nonFeaturedResults, @javax.annotation.Nullable CalendarEventDiscoveryInclusion personalizedResults, @javax.annotation.Nullable Integer minimumInterestCount, @javax.annotation.Nullable Integer minimumRemainingMinutes, @javax.annotation.Nullable Integer upcomingOffsetMinutes, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable String nextCursor, final ApiCallback _callback) throws ApiException { return discoverCalendarEventsCall(scope, categories, tags, featuredResults, nonFeaturedResults, personalizedResults, minimumInterestCount, minimumRemainingMinutes, upcomingOffsetMinutes, n, nextCursor, _callback); } @@ -503,13 +511,14 @@ private okhttp3.Call discoverCalendarEventsValidateBeforeCall(CalendarEventDisco * @return CalendarEventDiscovery * @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 CalendarEventDiscovery objects. -
401 Error response due to missing auth cookie. -
*/ - public CalendarEventDiscovery discoverCalendarEvents(CalendarEventDiscoveryScope scope, String categories, String tags, CalendarEventDiscoveryInclusion featuredResults, CalendarEventDiscoveryInclusion nonFeaturedResults, CalendarEventDiscoveryInclusion personalizedResults, Integer minimumInterestCount, Integer minimumRemainingMinutes, Integer upcomingOffsetMinutes, Integer n, String nextCursor) throws ApiException { + public CalendarEventDiscovery discoverCalendarEvents(@javax.annotation.Nullable CalendarEventDiscoveryScope scope, @javax.annotation.Nullable String categories, @javax.annotation.Nullable String tags, @javax.annotation.Nullable CalendarEventDiscoveryInclusion featuredResults, @javax.annotation.Nullable CalendarEventDiscoveryInclusion nonFeaturedResults, @javax.annotation.Nullable CalendarEventDiscoveryInclusion personalizedResults, @javax.annotation.Nullable Integer minimumInterestCount, @javax.annotation.Nullable Integer minimumRemainingMinutes, @javax.annotation.Nullable Integer upcomingOffsetMinutes, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable String nextCursor) throws ApiException { ApiResponse localVarResp = discoverCalendarEventsWithHttpInfo(scope, categories, tags, featuredResults, nonFeaturedResults, personalizedResults, minimumInterestCount, minimumRemainingMinutes, upcomingOffsetMinutes, n, nextCursor); return localVarResp.getData(); } @@ -531,13 +540,14 @@ public CalendarEventDiscovery discoverCalendarEvents(CalendarEventDiscoveryScope * @return ApiResponse<CalendarEventDiscovery> * @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 CalendarEventDiscovery objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse discoverCalendarEventsWithHttpInfo(CalendarEventDiscoveryScope scope, String categories, String tags, CalendarEventDiscoveryInclusion featuredResults, CalendarEventDiscoveryInclusion nonFeaturedResults, CalendarEventDiscoveryInclusion personalizedResults, Integer minimumInterestCount, Integer minimumRemainingMinutes, Integer upcomingOffsetMinutes, Integer n, String nextCursor) throws ApiException { + public ApiResponse discoverCalendarEventsWithHttpInfo(@javax.annotation.Nullable CalendarEventDiscoveryScope scope, @javax.annotation.Nullable String categories, @javax.annotation.Nullable String tags, @javax.annotation.Nullable CalendarEventDiscoveryInclusion featuredResults, @javax.annotation.Nullable CalendarEventDiscoveryInclusion nonFeaturedResults, @javax.annotation.Nullable CalendarEventDiscoveryInclusion personalizedResults, @javax.annotation.Nullable Integer minimumInterestCount, @javax.annotation.Nullable Integer minimumRemainingMinutes, @javax.annotation.Nullable Integer upcomingOffsetMinutes, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable String nextCursor) throws ApiException { okhttp3.Call localVarCall = discoverCalendarEventsValidateBeforeCall(scope, categories, tags, featuredResults, nonFeaturedResults, personalizedResults, minimumInterestCount, minimumRemainingMinutes, upcomingOffsetMinutes, n, nextCursor, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -561,13 +571,14 @@ public ApiResponse discoverCalendarEventsWithHttpInfo(Ca * @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 CalendarEventDiscovery objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call discoverCalendarEventsAsync(CalendarEventDiscoveryScope scope, String categories, String tags, CalendarEventDiscoveryInclusion featuredResults, CalendarEventDiscoveryInclusion nonFeaturedResults, CalendarEventDiscoveryInclusion personalizedResults, Integer minimumInterestCount, Integer minimumRemainingMinutes, Integer upcomingOffsetMinutes, Integer n, String nextCursor, final ApiCallback _callback) throws ApiException { + public okhttp3.Call discoverCalendarEventsAsync(@javax.annotation.Nullable CalendarEventDiscoveryScope scope, @javax.annotation.Nullable String categories, @javax.annotation.Nullable String tags, @javax.annotation.Nullable CalendarEventDiscoveryInclusion featuredResults, @javax.annotation.Nullable CalendarEventDiscoveryInclusion nonFeaturedResults, @javax.annotation.Nullable CalendarEventDiscoveryInclusion personalizedResults, @javax.annotation.Nullable Integer minimumInterestCount, @javax.annotation.Nullable Integer minimumRemainingMinutes, @javax.annotation.Nullable Integer upcomingOffsetMinutes, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable String nextCursor, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = discoverCalendarEventsValidateBeforeCall(scope, categories, tags, featuredResults, nonFeaturedResults, personalizedResults, minimumInterestCount, minimumRemainingMinutes, upcomingOffsetMinutes, n, nextCursor, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -583,13 +594,14 @@ public okhttp3.Call discoverCalendarEventsAsync(CalendarEventDiscoveryScope scop * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call followGroupCalendarEventCall(String groupId, String calendarId, FollowCalendarEventRequest followCalendarEventRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call followGroupCalendarEventCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, @javax.annotation.Nonnull FollowCalendarEventRequest followCalendarEventRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -637,7 +649,7 @@ public okhttp3.Call followGroupCalendarEventCall(String groupId, String calendar } @SuppressWarnings("rawtypes") - private okhttp3.Call followGroupCalendarEventValidateBeforeCall(String groupId, String calendarId, FollowCalendarEventRequest followCalendarEventRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call followGroupCalendarEventValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, @javax.annotation.Nonnull FollowCalendarEventRequest followCalendarEventRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling followGroupCalendarEvent(Async)"); @@ -666,13 +678,14 @@ private okhttp3.Call followGroupCalendarEventValidateBeforeCall(String groupId, * @return CalendarEvent * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public CalendarEvent followGroupCalendarEvent(String groupId, String calendarId, FollowCalendarEventRequest followCalendarEventRequest) throws ApiException { + public CalendarEvent followGroupCalendarEvent(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, @javax.annotation.Nonnull FollowCalendarEventRequest followCalendarEventRequest) throws ApiException { ApiResponse localVarResp = followGroupCalendarEventWithHttpInfo(groupId, calendarId, followCalendarEventRequest); return localVarResp.getData(); } @@ -686,13 +699,14 @@ public CalendarEvent followGroupCalendarEvent(String groupId, String calendarId, * @return ApiResponse<CalendarEvent> * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse followGroupCalendarEventWithHttpInfo(String groupId, String calendarId, FollowCalendarEventRequest followCalendarEventRequest) throws ApiException { + public ApiResponse followGroupCalendarEventWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, @javax.annotation.Nonnull FollowCalendarEventRequest followCalendarEventRequest) throws ApiException { okhttp3.Call localVarCall = followGroupCalendarEventValidateBeforeCall(groupId, calendarId, followCalendarEventRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -708,13 +722,14 @@ public ApiResponse followGroupCalendarEventWithHttpInfo(String gr * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call followGroupCalendarEventAsync(String groupId, String calendarId, FollowCalendarEventRequest followCalendarEventRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call followGroupCalendarEventAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, @javax.annotation.Nonnull FollowCalendarEventRequest followCalendarEventRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = followGroupCalendarEventValidateBeforeCall(groupId, calendarId, followCalendarEventRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -730,13 +745,14 @@ public okhttp3.Call followGroupCalendarEventAsync(String groupId, String calenda * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getCalendarEventsCall(OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCalendarEventsCall(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -793,7 +809,7 @@ public okhttp3.Call getCalendarEventsCall(OffsetDateTime date, Integer n, Intege } @SuppressWarnings("rawtypes") - private okhttp3.Call getCalendarEventsValidateBeforeCall(OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCalendarEventsValidateBeforeCall(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { return getCalendarEventsCall(date, n, offset, _callback); } @@ -807,13 +823,14 @@ private okhttp3.Call getCalendarEventsValidateBeforeCall(OffsetDateTime date, In * @return PaginatedCalendarEventList * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public PaginatedCalendarEventList getCalendarEvents(OffsetDateTime date, Integer n, Integer offset) throws ApiException { + public PaginatedCalendarEventList getCalendarEvents(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse localVarResp = getCalendarEventsWithHttpInfo(date, n, offset); return localVarResp.getData(); } @@ -827,13 +844,14 @@ public PaginatedCalendarEventList getCalendarEvents(OffsetDateTime date, Integer * @return ApiResponse<PaginatedCalendarEventList> * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getCalendarEventsWithHttpInfo(OffsetDateTime date, Integer n, Integer offset) throws ApiException { + public ApiResponse getCalendarEventsWithHttpInfo(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getCalendarEventsValidateBeforeCall(date, n, offset, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -849,13 +867,14 @@ public ApiResponse getCalendarEventsWithHttpInfo(Off * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getCalendarEventsAsync(OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCalendarEventsAsync(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCalendarEventsValidateBeforeCall(date, n, offset, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -871,13 +890,14 @@ public okhttp3.Call getCalendarEventsAsync(OffsetDateTime date, Integer n, Integ * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFeaturedCalendarEventsCall(OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFeaturedCalendarEventsCall(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -934,7 +954,7 @@ public okhttp3.Call getFeaturedCalendarEventsCall(OffsetDateTime date, Integer n } @SuppressWarnings("rawtypes") - private okhttp3.Call getFeaturedCalendarEventsValidateBeforeCall(OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFeaturedCalendarEventsValidateBeforeCall(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { return getFeaturedCalendarEventsCall(date, n, offset, _callback); } @@ -948,13 +968,14 @@ private okhttp3.Call getFeaturedCalendarEventsValidateBeforeCall(OffsetDateTime * @return PaginatedCalendarEventList * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public PaginatedCalendarEventList getFeaturedCalendarEvents(OffsetDateTime date, Integer n, Integer offset) throws ApiException { + public PaginatedCalendarEventList getFeaturedCalendarEvents(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse localVarResp = getFeaturedCalendarEventsWithHttpInfo(date, n, offset); return localVarResp.getData(); } @@ -968,13 +989,14 @@ public PaginatedCalendarEventList getFeaturedCalendarEvents(OffsetDateTime date, * @return ApiResponse<PaginatedCalendarEventList> * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getFeaturedCalendarEventsWithHttpInfo(OffsetDateTime date, Integer n, Integer offset) throws ApiException { + public ApiResponse getFeaturedCalendarEventsWithHttpInfo(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getFeaturedCalendarEventsValidateBeforeCall(date, n, offset, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -990,13 +1012,14 @@ public ApiResponse getFeaturedCalendarEventsWithHttp * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFeaturedCalendarEventsAsync(OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFeaturedCalendarEventsAsync(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFeaturedCalendarEventsValidateBeforeCall(date, n, offset, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1012,13 +1035,14 @@ public okhttp3.Call getFeaturedCalendarEventsAsync(OffsetDateTime date, Integer * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFollowedCalendarEventsCall(OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFollowedCalendarEventsCall(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1075,7 +1099,7 @@ public okhttp3.Call getFollowedCalendarEventsCall(OffsetDateTime date, Integer n } @SuppressWarnings("rawtypes") - private okhttp3.Call getFollowedCalendarEventsValidateBeforeCall(OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFollowedCalendarEventsValidateBeforeCall(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { return getFollowedCalendarEventsCall(date, n, offset, _callback); } @@ -1089,13 +1113,14 @@ private okhttp3.Call getFollowedCalendarEventsValidateBeforeCall(OffsetDateTime * @return PaginatedCalendarEventList * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public PaginatedCalendarEventList getFollowedCalendarEvents(OffsetDateTime date, Integer n, Integer offset) throws ApiException { + public PaginatedCalendarEventList getFollowedCalendarEvents(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse localVarResp = getFollowedCalendarEventsWithHttpInfo(date, n, offset); return localVarResp.getData(); } @@ -1109,13 +1134,14 @@ public PaginatedCalendarEventList getFollowedCalendarEvents(OffsetDateTime date, * @return ApiResponse<PaginatedCalendarEventList> * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getFollowedCalendarEventsWithHttpInfo(OffsetDateTime date, Integer n, Integer offset) throws ApiException { + public ApiResponse getFollowedCalendarEventsWithHttpInfo(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getFollowedCalendarEventsValidateBeforeCall(date, n, offset, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1131,13 +1157,14 @@ public ApiResponse getFollowedCalendarEventsWithHttp * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFollowedCalendarEventsAsync(OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFollowedCalendarEventsAsync(@javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFollowedCalendarEventsValidateBeforeCall(date, n, offset, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1152,13 +1179,14 @@ public okhttp3.Call getFollowedCalendarEventsAsync(OffsetDateTime date, Integer * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getGroupCalendarEventCall(String groupId, String calendarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupCalendarEventCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1205,7 +1233,7 @@ public okhttp3.Call getGroupCalendarEventCall(String groupId, String calendarId, } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupCalendarEventValidateBeforeCall(String groupId, String calendarId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupCalendarEventValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupCalendarEvent(Async)"); @@ -1228,13 +1256,14 @@ private okhttp3.Call getGroupCalendarEventValidateBeforeCall(String groupId, Str * @return CalendarEvent * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public CalendarEvent getGroupCalendarEvent(String groupId, String calendarId) throws ApiException { + public CalendarEvent getGroupCalendarEvent(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId) throws ApiException { ApiResponse localVarResp = getGroupCalendarEventWithHttpInfo(groupId, calendarId); return localVarResp.getData(); } @@ -1247,13 +1276,14 @@ public CalendarEvent getGroupCalendarEvent(String groupId, String calendarId) th * @return ApiResponse<CalendarEvent> * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getGroupCalendarEventWithHttpInfo(String groupId, String calendarId) throws ApiException { + public ApiResponse getGroupCalendarEventWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId) throws ApiException { okhttp3.Call localVarCall = getGroupCalendarEventValidateBeforeCall(groupId, calendarId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1268,13 +1298,14 @@ public ApiResponse getGroupCalendarEventWithHttpInfo(String group * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getGroupCalendarEventAsync(String groupId, String calendarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupCalendarEventAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupCalendarEventValidateBeforeCall(groupId, calendarId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1289,14 +1320,15 @@ public okhttp3.Call getGroupCalendarEventAsync(String groupId, String calendarId * @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 iCalendar file download -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public okhttp3.Call getGroupCalendarEventICSCall(String groupId, String calendarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupCalendarEventICSCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1344,7 +1376,7 @@ public okhttp3.Call getGroupCalendarEventICSCall(String groupId, String calendar } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupCalendarEventICSValidateBeforeCall(String groupId, String calendarId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupCalendarEventICSValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupCalendarEventICS(Async)"); @@ -1367,14 +1399,15 @@ private okhttp3.Call getGroupCalendarEventICSValidateBeforeCall(String groupId, * @return File * @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 iCalendar file download -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public File getGroupCalendarEventICS(String groupId, String calendarId) throws ApiException { + public File getGroupCalendarEventICS(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId) throws ApiException { ApiResponse localVarResp = getGroupCalendarEventICSWithHttpInfo(groupId, calendarId); return localVarResp.getData(); } @@ -1387,14 +1420,15 @@ public File getGroupCalendarEventICS(String groupId, String calendarId) throws A * @return ApiResponse<File> * @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 iCalendar file download -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public ApiResponse getGroupCalendarEventICSWithHttpInfo(String groupId, String calendarId) throws ApiException { + public ApiResponse getGroupCalendarEventICSWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId) throws ApiException { okhttp3.Call localVarCall = getGroupCalendarEventICSValidateBeforeCall(groupId, calendarId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1409,14 +1443,15 @@ public ApiResponse getGroupCalendarEventICSWithHttpInfo(String groupId, St * @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 iCalendar file download -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public okhttp3.Call getGroupCalendarEventICSAsync(String groupId, String calendarId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupCalendarEventICSAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupCalendarEventICSValidateBeforeCall(groupId, calendarId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1433,13 +1468,14 @@ public okhttp3.Call getGroupCalendarEventICSAsync(String groupId, String calenda * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getGroupCalendarEventsCall(String groupId, OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupCalendarEventsCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1497,7 +1533,7 @@ public okhttp3.Call getGroupCalendarEventsCall(String groupId, OffsetDateTime da } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupCalendarEventsValidateBeforeCall(String groupId, OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupCalendarEventsValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupCalendarEvents(Async)"); @@ -1517,13 +1553,14 @@ private okhttp3.Call getGroupCalendarEventsValidateBeforeCall(String groupId, Of * @return PaginatedCalendarEventList * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public PaginatedCalendarEventList getGroupCalendarEvents(String groupId, OffsetDateTime date, Integer n, Integer offset) throws ApiException { + public PaginatedCalendarEventList getGroupCalendarEvents(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse localVarResp = getGroupCalendarEventsWithHttpInfo(groupId, date, n, offset); return localVarResp.getData(); } @@ -1538,13 +1575,14 @@ public PaginatedCalendarEventList getGroupCalendarEvents(String groupId, OffsetD * @return ApiResponse<PaginatedCalendarEventList> * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getGroupCalendarEventsWithHttpInfo(String groupId, OffsetDateTime date, Integer n, Integer offset) throws ApiException { + public ApiResponse getGroupCalendarEventsWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getGroupCalendarEventsValidateBeforeCall(groupId, date, n, offset, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1561,13 +1599,14 @@ public ApiResponse getGroupCalendarEventsWithHttpInf * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getGroupCalendarEventsAsync(String groupId, OffsetDateTime date, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupCalendarEventsAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable OffsetDateTime date, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupCalendarEventsValidateBeforeCall(groupId, date, n, offset, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1581,14 +1620,15 @@ public okhttp3.Call getGroupCalendarEventsAsync(String groupId, OffsetDateTime d * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public okhttp3.Call getGroupNextCalendarEventCall(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupNextCalendarEventCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1634,7 +1674,7 @@ public okhttp3.Call getGroupNextCalendarEventCall(String groupId, final ApiCallb } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupNextCalendarEventValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupNextCalendarEventValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupNextCalendarEvent(Async)"); @@ -1651,14 +1691,15 @@ private okhttp3.Call getGroupNextCalendarEventValidateBeforeCall(String groupId, * @return CalendarEvent * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public CalendarEvent getGroupNextCalendarEvent(String groupId) throws ApiException { + public CalendarEvent getGroupNextCalendarEvent(@javax.annotation.Nonnull String groupId) throws ApiException { ApiResponse localVarResp = getGroupNextCalendarEventWithHttpInfo(groupId); return localVarResp.getData(); } @@ -1670,14 +1711,15 @@ public CalendarEvent getGroupNextCalendarEvent(String groupId) throws ApiExcepti * @return ApiResponse<CalendarEvent> * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public ApiResponse getGroupNextCalendarEventWithHttpInfo(String groupId) throws ApiException { + public ApiResponse getGroupNextCalendarEventWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = getGroupNextCalendarEventValidateBeforeCall(groupId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1691,14 +1733,15 @@ public ApiResponse getGroupNextCalendarEventWithHttpInfo(String g * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to download ICS calendar of a non-existent calendar entry, get such a calendar entry, or get the next event for a group that lacks any future scheduled events. -
*/ - public okhttp3.Call getGroupNextCalendarEventAsync(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupNextCalendarEventAsync(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupNextCalendarEventValidateBeforeCall(groupId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1716,13 +1759,14 @@ public okhttp3.Call getGroupNextCalendarEventAsync(String groupId, final ApiCall * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchCalendarEventsCall(String searchTerm, Integer utcOffset, Integer n, Integer offset, Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchCalendarEventsCall(@javax.annotation.Nonnull String searchTerm, @javax.annotation.Nullable Integer utcOffset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1787,7 +1831,7 @@ public okhttp3.Call searchCalendarEventsCall(String searchTerm, Integer utcOffse } @SuppressWarnings("rawtypes") - private okhttp3.Call searchCalendarEventsValidateBeforeCall(String searchTerm, Integer utcOffset, Integer n, Integer offset, Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchCalendarEventsValidateBeforeCall(@javax.annotation.Nonnull String searchTerm, @javax.annotation.Nullable Integer utcOffset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchTerm' is set if (searchTerm == null) { throw new ApiException("Missing the required parameter 'searchTerm' when calling searchCalendarEvents(Async)"); @@ -1808,13 +1852,14 @@ private okhttp3.Call searchCalendarEventsValidateBeforeCall(String searchTerm, I * @return PaginatedCalendarEventList * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public PaginatedCalendarEventList searchCalendarEvents(String searchTerm, Integer utcOffset, Integer n, Integer offset, Boolean isInternalVariant) throws ApiException { + public PaginatedCalendarEventList searchCalendarEvents(@javax.annotation.Nonnull String searchTerm, @javax.annotation.Nullable Integer utcOffset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean isInternalVariant) throws ApiException { ApiResponse localVarResp = searchCalendarEventsWithHttpInfo(searchTerm, utcOffset, n, offset, isInternalVariant); return localVarResp.getData(); } @@ -1830,13 +1875,14 @@ public PaginatedCalendarEventList searchCalendarEvents(String searchTerm, Intege * @return ApiResponse<PaginatedCalendarEventList> * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse searchCalendarEventsWithHttpInfo(String searchTerm, Integer utcOffset, Integer n, Integer offset, Boolean isInternalVariant) throws ApiException { + public ApiResponse searchCalendarEventsWithHttpInfo(@javax.annotation.Nonnull String searchTerm, @javax.annotation.Nullable Integer utcOffset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean isInternalVariant) throws ApiException { okhttp3.Call localVarCall = searchCalendarEventsValidateBeforeCall(searchTerm, utcOffset, n, offset, isInternalVariant, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1854,13 +1900,14 @@ public ApiResponse searchCalendarEventsWithHttpInfo( * @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 list of CalendarEvent objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchCalendarEventsAsync(String searchTerm, Integer utcOffset, Integer n, Integer offset, Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchCalendarEventsAsync(@javax.annotation.Nonnull String searchTerm, @javax.annotation.Nullable Integer utcOffset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = searchCalendarEventsValidateBeforeCall(searchTerm, utcOffset, n, offset, isInternalVariant, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1876,13 +1923,14 @@ public okhttp3.Call searchCalendarEventsAsync(String searchTerm, Integer utcOffs * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateGroupCalendarEventCall(String groupId, String calendarId, UpdateCalendarEventRequest updateCalendarEventRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupCalendarEventCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, @javax.annotation.Nonnull UpdateCalendarEventRequest updateCalendarEventRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1930,7 +1978,7 @@ public okhttp3.Call updateGroupCalendarEventCall(String groupId, String calendar } @SuppressWarnings("rawtypes") - private okhttp3.Call updateGroupCalendarEventValidateBeforeCall(String groupId, String calendarId, UpdateCalendarEventRequest updateCalendarEventRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateGroupCalendarEventValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, @javax.annotation.Nonnull UpdateCalendarEventRequest updateCalendarEventRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling updateGroupCalendarEvent(Async)"); @@ -1959,13 +2007,14 @@ private okhttp3.Call updateGroupCalendarEventValidateBeforeCall(String groupId, * @return CalendarEvent * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public CalendarEvent updateGroupCalendarEvent(String groupId, String calendarId, UpdateCalendarEventRequest updateCalendarEventRequest) throws ApiException { + public CalendarEvent updateGroupCalendarEvent(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, @javax.annotation.Nonnull UpdateCalendarEventRequest updateCalendarEventRequest) throws ApiException { ApiResponse localVarResp = updateGroupCalendarEventWithHttpInfo(groupId, calendarId, updateCalendarEventRequest); return localVarResp.getData(); } @@ -1979,13 +2028,14 @@ public CalendarEvent updateGroupCalendarEvent(String groupId, String calendarId, * @return ApiResponse<CalendarEvent> * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse updateGroupCalendarEventWithHttpInfo(String groupId, String calendarId, UpdateCalendarEventRequest updateCalendarEventRequest) throws ApiException { + public ApiResponse updateGroupCalendarEventWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, @javax.annotation.Nonnull UpdateCalendarEventRequest updateCalendarEventRequest) throws ApiException { okhttp3.Call localVarCall = updateGroupCalendarEventValidateBeforeCall(groupId, calendarId, updateCalendarEventRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2001,13 +2051,14 @@ public ApiResponse updateGroupCalendarEventWithHttpInfo(String gr * @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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateGroupCalendarEventAsync(String groupId, String calendarId, UpdateCalendarEventRequest updateCalendarEventRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupCalendarEventAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, @javax.annotation.Nonnull UpdateCalendarEventRequest updateCalendarEventRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateGroupCalendarEventValidateBeforeCall(groupId, calendarId, updateCalendarEventRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/EconomyApi.java b/src/main/java/io/github/vrchatapi/api/EconomyApi.java index 2ed7d272..1fe29655 100644 --- a/src/main/java/io/github/vrchatapi/api/EconomyApi.java +++ b/src/main/java/io/github/vrchatapi/api/EconomyApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -68,7 +68,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class EconomyApi { private ApiClient localVarApiClient; @@ -114,13 +113,14 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 single Product object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createProductCall(CreateProductRequest createProductRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createProductCall(@javax.annotation.Nonnull CreateProductRequest createProductRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -166,7 +166,7 @@ public okhttp3.Call createProductCall(CreateProductRequest createProductRequest, } @SuppressWarnings("rawtypes") - private okhttp3.Call createProductValidateBeforeCall(CreateProductRequest createProductRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createProductValidateBeforeCall(@javax.annotation.Nonnull CreateProductRequest createProductRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createProductRequest' is set if (createProductRequest == null) { throw new ApiException("Missing the required parameter 'createProductRequest' when calling createProduct(Async)"); @@ -183,13 +183,14 @@ private okhttp3.Call createProductValidateBeforeCall(CreateProductRequest create * @return Product * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a single Product object. -
401 Error response due to missing auth cookie. -
*/ - public Product createProduct(CreateProductRequest createProductRequest) throws ApiException { + public Product createProduct(@javax.annotation.Nonnull CreateProductRequest createProductRequest) throws ApiException { ApiResponse localVarResp = createProductWithHttpInfo(createProductRequest); return localVarResp.getData(); } @@ -201,13 +202,14 @@ public Product createProduct(CreateProductRequest createProductRequest) throws A * @return ApiResponse<Product> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a single Product object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse createProductWithHttpInfo(CreateProductRequest createProductRequest) throws ApiException { + public ApiResponse createProductWithHttpInfo(@javax.annotation.Nonnull CreateProductRequest createProductRequest) throws ApiException { okhttp3.Call localVarCall = createProductValidateBeforeCall(createProductRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -221,13 +223,14 @@ public ApiResponse createProductWithHttpInfo(CreateProductRequest creat * @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 single Product object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createProductAsync(CreateProductRequest createProductRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createProductAsync(@javax.annotation.Nonnull CreateProductRequest createProductRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createProductValidateBeforeCall(createProductRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -241,13 +244,14 @@ public okhttp3.Call createProductAsync(CreateProductRequest createProductRequest * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createProductListingDirectCall(CreateListingRequest createListingRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createProductListingDirectCall(@javax.annotation.Nonnull CreateListingRequest createListingRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -293,7 +297,7 @@ public okhttp3.Call createProductListingDirectCall(CreateListingRequest createLi } @SuppressWarnings("rawtypes") - private okhttp3.Call createProductListingDirectValidateBeforeCall(CreateListingRequest createListingRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createProductListingDirectValidateBeforeCall(@javax.annotation.Nonnull CreateListingRequest createListingRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createListingRequest' is set if (createListingRequest == null) { throw new ApiException("Missing the required parameter 'createListingRequest' when calling createProductListingDirect(Async)"); @@ -310,13 +314,14 @@ private okhttp3.Call createProductListingDirectValidateBeforeCall(CreateListingR * @return ProductListing * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public ProductListing createProductListingDirect(CreateListingRequest createListingRequest) throws ApiException { + public ProductListing createProductListingDirect(@javax.annotation.Nonnull CreateListingRequest createListingRequest) throws ApiException { ApiResponse localVarResp = createProductListingDirectWithHttpInfo(createListingRequest); return localVarResp.getData(); } @@ -328,13 +333,14 @@ public ProductListing createProductListingDirect(CreateListingRequest createList * @return ApiResponse<ProductListing> * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse createProductListingDirectWithHttpInfo(CreateListingRequest createListingRequest) throws ApiException { + public ApiResponse createProductListingDirectWithHttpInfo(@javax.annotation.Nonnull CreateListingRequest createListingRequest) throws ApiException { okhttp3.Call localVarCall = createProductListingDirectValidateBeforeCall(createListingRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -348,13 +354,14 @@ public ApiResponse createProductListingDirectWithHttpInfo(Create * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createProductListingDirectAsync(CreateListingRequest createListingRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createProductListingDirectAsync(@javax.annotation.Nonnull CreateListingRequest createListingRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createProductListingDirectValidateBeforeCall(createListingRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -368,13 +375,14 @@ public okhttp3.Call createProductListingDirectAsync(CreateListingRequest createL * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteProductCall(String productId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteProductCall(@javax.annotation.Nonnull String productId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -420,7 +428,7 @@ public okhttp3.Call deleteProductCall(String productId, final ApiCallback _callb } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteProductValidateBeforeCall(String productId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteProductValidateBeforeCall(@javax.annotation.Nonnull String productId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'productId' is set if (productId == null) { throw new ApiException("Missing the required parameter 'productId' when calling deleteProduct(Async)"); @@ -437,13 +445,14 @@ private okhttp3.Call deleteProductValidateBeforeCall(String productId, final Api * @return SuccessFlag * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public SuccessFlag deleteProduct(String productId) throws ApiException { + public SuccessFlag deleteProduct(@javax.annotation.Nonnull String productId) throws ApiException { ApiResponse localVarResp = deleteProductWithHttpInfo(productId); return localVarResp.getData(); } @@ -455,13 +464,14 @@ public SuccessFlag deleteProduct(String productId) throws ApiException { * @return ApiResponse<SuccessFlag> * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse deleteProductWithHttpInfo(String productId) throws ApiException { + public ApiResponse deleteProductWithHttpInfo(@javax.annotation.Nonnull String productId) throws ApiException { okhttp3.Call localVarCall = deleteProductValidateBeforeCall(productId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -475,13 +485,14 @@ public ApiResponse deleteProductWithHttpInfo(String productId) thro * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteProductAsync(String productId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteProductAsync(@javax.annotation.Nonnull String productId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteProductValidateBeforeCall(productId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -496,13 +507,14 @@ public okhttp3.Call deleteProductAsync(String productId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteProductListingDirectCall(String productId, Boolean hydrate, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteProductListingDirectCall(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -552,7 +564,7 @@ public okhttp3.Call deleteProductListingDirectCall(String productId, Boolean hyd } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteProductListingDirectValidateBeforeCall(String productId, Boolean hydrate, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteProductListingDirectValidateBeforeCall(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate, final ApiCallback _callback) throws ApiException { // verify the required parameter 'productId' is set if (productId == null) { throw new ApiException("Missing the required parameter 'productId' when calling deleteProductListingDirect(Async)"); @@ -570,13 +582,14 @@ private okhttp3.Call deleteProductListingDirectValidateBeforeCall(String product * @return SuccessFlag * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public SuccessFlag deleteProductListingDirect(String productId, Boolean hydrate) throws ApiException { + public SuccessFlag deleteProductListingDirect(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate) throws ApiException { ApiResponse localVarResp = deleteProductListingDirectWithHttpInfo(productId, hydrate); return localVarResp.getData(); } @@ -589,13 +602,14 @@ public SuccessFlag deleteProductListingDirect(String productId, Boolean hydrate) * @return ApiResponse<SuccessFlag> * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse deleteProductListingDirectWithHttpInfo(String productId, Boolean hydrate) throws ApiException { + public ApiResponse deleteProductListingDirectWithHttpInfo(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate) throws ApiException { okhttp3.Call localVarCall = deleteProductListingDirectValidateBeforeCall(productId, hydrate, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -610,13 +624,14 @@ public ApiResponse deleteProductListingDirectWithHttpInfo(String pr * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteProductListingDirectAsync(String productId, Boolean hydrate, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteProductListingDirectAsync(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteProductListingDirectValidateBeforeCall(productId, hydrate, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -629,7 +644,8 @@ public okhttp3.Call deleteProductListingDirectAsync(String productId, Boolean hy * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -691,7 +707,8 @@ private okhttp3.Call getActiveLicensesValidateBeforeCall(final ApiCallback _call * @return List<License> * @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 list of License objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -708,7 +725,8 @@ public List getActiveLicenses() throws ApiException { * @return ApiResponse<List<License>> * @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 list of License objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -727,7 +745,8 @@ public ApiResponse> getActiveLicensesWithHttpInfo() throws ApiExce * @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 list of License objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -747,13 +766,14 @@ public okhttp3.Call getActiveLicensesAsync(final ApiCallback> _cal * @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 list of License objects. -
401 Error response due to missing auth cookie. -
+
+
Response Details
Status Code Description Response Headers
200 Returns a single Balance object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getBalanceCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getBalanceCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -799,7 +819,7 @@ public okhttp3.Call getBalanceCall(String userId, final ApiCallback _callback) t } @SuppressWarnings("rawtypes") - private okhttp3.Call getBalanceValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBalanceValidateBeforeCall(@javax.annotation.Nonnull 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 getBalance(Async)"); @@ -816,13 +836,14 @@ private okhttp3.Call getBalanceValidateBeforeCall(String userId, final ApiCallba * @return Balance * @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 single Balance object. -
401 Error response due to missing auth cookie. -
*/ - public Balance getBalance(String userId) throws ApiException { + public Balance getBalance(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getBalanceWithHttpInfo(userId); return localVarResp.getData(); } @@ -834,13 +855,14 @@ public Balance getBalance(String userId) throws ApiException { * @return ApiResponse<Balance> * @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 single Balance object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getBalanceWithHttpInfo(String userId) throws ApiException { + public ApiResponse getBalanceWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getBalanceValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -854,13 +876,14 @@ public ApiResponse getBalanceWithHttpInfo(String userId) throws ApiExce * @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 single Balance object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getBalanceAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getBalanceAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getBalanceValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -874,13 +897,14 @@ public okhttp3.Call getBalanceAsync(String userId, final ApiCallback _c * @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 single Balance object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getBalanceEarningsCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getBalanceEarningsCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -926,7 +950,7 @@ public okhttp3.Call getBalanceEarningsCall(String userId, final ApiCallback _cal } @SuppressWarnings("rawtypes") - private okhttp3.Call getBalanceEarningsValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBalanceEarningsValidateBeforeCall(@javax.annotation.Nonnull 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 getBalanceEarnings(Async)"); @@ -943,13 +967,14 @@ private okhttp3.Call getBalanceEarningsValidateBeforeCall(String userId, final A * @return Balance * @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 single Balance object. -
401 Error response due to missing auth cookie. -
*/ - public Balance getBalanceEarnings(String userId) throws ApiException { + public Balance getBalanceEarnings(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getBalanceEarningsWithHttpInfo(userId); return localVarResp.getData(); } @@ -961,13 +986,14 @@ public Balance getBalanceEarnings(String userId) throws ApiException { * @return ApiResponse<Balance> * @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 single Balance object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getBalanceEarningsWithHttpInfo(String userId) throws ApiException { + public ApiResponse getBalanceEarningsWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getBalanceEarningsValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -981,13 +1007,14 @@ public ApiResponse getBalanceEarningsWithHttpInfo(String userId) throws * @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 single Balance object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getBalanceEarningsAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getBalanceEarningsAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getBalanceEarningsValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1001,13 +1028,14 @@ public okhttp3.Call getBalanceEarningsAsync(String userId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a list of ??? objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getBulkGiftPurchasesCall(Boolean mostRecent, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getBulkGiftPurchasesCall(@javax.annotation.Nullable Boolean mostRecent, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1056,7 +1084,7 @@ public okhttp3.Call getBulkGiftPurchasesCall(Boolean mostRecent, final ApiCallba } @SuppressWarnings("rawtypes") - private okhttp3.Call getBulkGiftPurchasesValidateBeforeCall(Boolean mostRecent, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBulkGiftPurchasesValidateBeforeCall(@javax.annotation.Nullable Boolean mostRecent, final ApiCallback _callback) throws ApiException { return getBulkGiftPurchasesCall(mostRecent, _callback); } @@ -1068,13 +1096,14 @@ private okhttp3.Call getBulkGiftPurchasesValidateBeforeCall(Boolean mostRecent, * @return List<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a list of ??? objects. -
401 Error response due to missing auth cookie. -
*/ - public List getBulkGiftPurchases(Boolean mostRecent) throws ApiException { + public List getBulkGiftPurchases(@javax.annotation.Nullable Boolean mostRecent) throws ApiException { ApiResponse> localVarResp = getBulkGiftPurchasesWithHttpInfo(mostRecent); return localVarResp.getData(); } @@ -1086,13 +1115,14 @@ public List getBulkGiftPurchases(Boolean mostRecent) throws ApiException * @return ApiResponse<List<Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a list of ??? objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getBulkGiftPurchasesWithHttpInfo(Boolean mostRecent) throws ApiException { + public ApiResponse> getBulkGiftPurchasesWithHttpInfo(@javax.annotation.Nullable Boolean mostRecent) throws ApiException { okhttp3.Call localVarCall = getBulkGiftPurchasesValidateBeforeCall(mostRecent, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1106,13 +1136,14 @@ public ApiResponse> getBulkGiftPurchasesWithHttpInfo(Boolean mostRe * @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 list of ??? objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getBulkGiftPurchasesAsync(Boolean mostRecent, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getBulkGiftPurchasesAsync(@javax.annotation.Nullable Boolean mostRecent, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getBulkGiftPurchasesValidateBeforeCall(mostRecent, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1125,7 +1156,8 @@ public okhttp3.Call getBulkGiftPurchasesAsync(Boolean mostRecent, final ApiCallb * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1187,7 +1219,8 @@ private okhttp3.Call getCurrentSubscriptionsValidateBeforeCall(final ApiCallback * @return List<UserSubscription> * @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 list of UserSubscription objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -1204,7 +1237,8 @@ public List getCurrentSubscriptions() throws ApiException { * @return ApiResponse<List<UserSubscription>> * @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 list of UserSubscription objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -1223,7 +1257,8 @@ public ApiResponse> getCurrentSubscriptionsWithHttpInfo() * @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 list of UserSubscription objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -1246,13 +1281,14 @@ public okhttp3.Call getCurrentSubscriptionsAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns a list of UserSubscription objects. -
401 Error response due to missing auth cookie. -
+
Response Details
Status Code Description Response Headers
200 Returns a single EarningsMetrics object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getEarningsMetricsCall(String sellerId, String metricDateStart, String metricDateEnd, String groupByDuration, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEarningsMetricsCall(@javax.annotation.Nonnull String sellerId, @javax.annotation.Nullable String metricDateStart, @javax.annotation.Nullable String metricDateEnd, @javax.annotation.Nullable String groupByDuration, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1313,7 +1349,7 @@ public okhttp3.Call getEarningsMetricsCall(String sellerId, String metricDateSta } @SuppressWarnings("rawtypes") - private okhttp3.Call getEarningsMetricsValidateBeforeCall(String sellerId, String metricDateStart, String metricDateEnd, String groupByDuration, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getEarningsMetricsValidateBeforeCall(@javax.annotation.Nonnull String sellerId, @javax.annotation.Nullable String metricDateStart, @javax.annotation.Nullable String metricDateEnd, @javax.annotation.Nullable String groupByDuration, final ApiCallback _callback) throws ApiException { // verify the required parameter 'sellerId' is set if (sellerId == null) { throw new ApiException("Missing the required parameter 'sellerId' when calling getEarningsMetrics(Async)"); @@ -1333,13 +1369,14 @@ private okhttp3.Call getEarningsMetricsValidateBeforeCall(String sellerId, Strin * @return EarningsMetrics * @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 single EarningsMetrics object. -
401 Error response due to missing auth cookie. -
*/ - public EarningsMetrics getEarningsMetrics(String sellerId, String metricDateStart, String metricDateEnd, String groupByDuration) throws ApiException { + public EarningsMetrics getEarningsMetrics(@javax.annotation.Nonnull String sellerId, @javax.annotation.Nullable String metricDateStart, @javax.annotation.Nullable String metricDateEnd, @javax.annotation.Nullable String groupByDuration) throws ApiException { ApiResponse localVarResp = getEarningsMetricsWithHttpInfo(sellerId, metricDateStart, metricDateEnd, groupByDuration); return localVarResp.getData(); } @@ -1354,13 +1391,14 @@ public EarningsMetrics getEarningsMetrics(String sellerId, String metricDateStar * @return ApiResponse<EarningsMetrics> * @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 single EarningsMetrics object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getEarningsMetricsWithHttpInfo(String sellerId, String metricDateStart, String metricDateEnd, String groupByDuration) throws ApiException { + public ApiResponse getEarningsMetricsWithHttpInfo(@javax.annotation.Nonnull String sellerId, @javax.annotation.Nullable String metricDateStart, @javax.annotation.Nullable String metricDateEnd, @javax.annotation.Nullable String groupByDuration) throws ApiException { okhttp3.Call localVarCall = getEarningsMetricsValidateBeforeCall(sellerId, metricDateStart, metricDateEnd, groupByDuration, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1377,13 +1415,14 @@ public ApiResponse getEarningsMetricsWithHttpInfo(String seller * @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 single EarningsMetrics object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getEarningsMetricsAsync(String sellerId, String metricDateStart, String metricDateEnd, String groupByDuration, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEarningsMetricsAsync(@javax.annotation.Nonnull String sellerId, @javax.annotation.Nullable String metricDateStart, @javax.annotation.Nullable String metricDateEnd, @javax.annotation.Nullable String groupByDuration, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getEarningsMetricsValidateBeforeCall(sellerId, metricDateStart, metricDateEnd, groupByDuration, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1397,13 +1436,14 @@ public okhttp3.Call getEarningsMetricsAsync(String sellerId, String metricDateSt * @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 single EconomyAccount object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getEconomyAccountCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEconomyAccountCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1449,7 +1489,7 @@ public okhttp3.Call getEconomyAccountCall(String userId, final ApiCallback _call } @SuppressWarnings("rawtypes") - private okhttp3.Call getEconomyAccountValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getEconomyAccountValidateBeforeCall(@javax.annotation.Nonnull 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 getEconomyAccount(Async)"); @@ -1466,13 +1506,14 @@ private okhttp3.Call getEconomyAccountValidateBeforeCall(String userId, final Ap * @return EconomyAccount * @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 single EconomyAccount object. -
401 Error response due to missing auth cookie. -
*/ - public EconomyAccount getEconomyAccount(String userId) throws ApiException { + public EconomyAccount getEconomyAccount(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getEconomyAccountWithHttpInfo(userId); return localVarResp.getData(); } @@ -1484,13 +1525,14 @@ public EconomyAccount getEconomyAccount(String userId) throws ApiException { * @return ApiResponse<EconomyAccount> * @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 single EconomyAccount object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getEconomyAccountWithHttpInfo(String userId) throws ApiException { + public ApiResponse getEconomyAccountWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getEconomyAccountValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1504,13 +1546,14 @@ public ApiResponse getEconomyAccountWithHttpInfo(String userId) * @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 single EconomyAccount object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getEconomyAccountAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEconomyAccountAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getEconomyAccountValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1524,13 +1567,14 @@ public okhttp3.Call getEconomyAccountAsync(String userId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns an EconomyBalances object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getEconomyBalancesCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEconomyBalancesCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1576,7 +1620,7 @@ public okhttp3.Call getEconomyBalancesCall(String userId, final ApiCallback _cal } @SuppressWarnings("rawtypes") - private okhttp3.Call getEconomyBalancesValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getEconomyBalancesValidateBeforeCall(@javax.annotation.Nonnull 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 getEconomyBalances(Async)"); @@ -1593,13 +1637,14 @@ private okhttp3.Call getEconomyBalancesValidateBeforeCall(String userId, final A * @return EconomyBalances * @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 an EconomyBalances object. -
401 Error response due to missing auth cookie. -
*/ - public EconomyBalances getEconomyBalances(String userId) throws ApiException { + public EconomyBalances getEconomyBalances(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getEconomyBalancesWithHttpInfo(userId); return localVarResp.getData(); } @@ -1611,13 +1656,14 @@ public EconomyBalances getEconomyBalances(String userId) throws ApiException { * @return ApiResponse<EconomyBalances> * @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 an EconomyBalances object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getEconomyBalancesWithHttpInfo(String userId) throws ApiException { + public ApiResponse getEconomyBalancesWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getEconomyBalancesValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1631,13 +1677,14 @@ public ApiResponse getEconomyBalancesWithHttpInfo(String userId * @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 an EconomyBalances object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getEconomyBalancesAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEconomyBalancesAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getEconomyBalancesValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1651,13 +1698,14 @@ public okhttp3.Call getEconomyBalancesAsync(String userId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns an EconomyPayoutStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getEconomyPayoutStatusCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEconomyPayoutStatusCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1703,7 +1751,7 @@ public okhttp3.Call getEconomyPayoutStatusCall(String userId, final ApiCallback } @SuppressWarnings("rawtypes") - private okhttp3.Call getEconomyPayoutStatusValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getEconomyPayoutStatusValidateBeforeCall(@javax.annotation.Nonnull 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 getEconomyPayoutStatus(Async)"); @@ -1720,13 +1768,14 @@ private okhttp3.Call getEconomyPayoutStatusValidateBeforeCall(String userId, fin * @return EconomyPayoutStatus * @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 an EconomyPayoutStatus object. -
401 Error response due to missing auth cookie. -
*/ - public EconomyPayoutStatus getEconomyPayoutStatus(String userId) throws ApiException { + public EconomyPayoutStatus getEconomyPayoutStatus(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getEconomyPayoutStatusWithHttpInfo(userId); return localVarResp.getData(); } @@ -1738,13 +1787,14 @@ public EconomyPayoutStatus getEconomyPayoutStatus(String userId) throws ApiExcep * @return ApiResponse<EconomyPayoutStatus> * @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 an EconomyPayoutStatus object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getEconomyPayoutStatusWithHttpInfo(String userId) throws ApiException { + public ApiResponse getEconomyPayoutStatusWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getEconomyPayoutStatusValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1758,13 +1808,14 @@ public ApiResponse getEconomyPayoutStatusWithHttpInfo(Strin * @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 an EconomyPayoutStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getEconomyPayoutStatusAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEconomyPayoutStatusAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getEconomyPayoutStatusValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1778,13 +1829,14 @@ public okhttp3.Call getEconomyPayoutStatusAsync(String userId, final ApiCallback * @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 an EconomyPayoutList object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getEconomyPayoutsCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEconomyPayoutsCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1830,7 +1882,7 @@ public okhttp3.Call getEconomyPayoutsCall(String userId, final ApiCallback _call } @SuppressWarnings("rawtypes") - private okhttp3.Call getEconomyPayoutsValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getEconomyPayoutsValidateBeforeCall(@javax.annotation.Nonnull 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 getEconomyPayouts(Async)"); @@ -1847,13 +1899,14 @@ private okhttp3.Call getEconomyPayoutsValidateBeforeCall(String userId, final Ap * @return EconomyPayoutList * @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 an EconomyPayoutList object. -
401 Error response due to missing auth cookie. -
*/ - public EconomyPayoutList getEconomyPayouts(String userId) throws ApiException { + public EconomyPayoutList getEconomyPayouts(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getEconomyPayoutsWithHttpInfo(userId); return localVarResp.getData(); } @@ -1865,13 +1918,14 @@ public EconomyPayoutList getEconomyPayouts(String userId) throws ApiException { * @return ApiResponse<EconomyPayoutList> * @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 an EconomyPayoutList object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getEconomyPayoutsWithHttpInfo(String userId) throws ApiException { + public ApiResponse getEconomyPayoutsWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getEconomyPayoutsValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1885,13 +1939,14 @@ public ApiResponse getEconomyPayoutsWithHttpInfo(String userI * @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 an EconomyPayoutList object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getEconomyPayoutsAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEconomyPayoutsAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getEconomyPayoutsValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1905,13 +1960,14 @@ public okhttp3.Call getEconomyPayoutsAsync(String userId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a single LicenseGroup object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getLicenseGroupCall(String licenseGroupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLicenseGroupCall(@javax.annotation.Nonnull String licenseGroupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1957,7 +2013,7 @@ public okhttp3.Call getLicenseGroupCall(String licenseGroupId, final ApiCallback } @SuppressWarnings("rawtypes") - private okhttp3.Call getLicenseGroupValidateBeforeCall(String licenseGroupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getLicenseGroupValidateBeforeCall(@javax.annotation.Nonnull String licenseGroupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'licenseGroupId' is set if (licenseGroupId == null) { throw new ApiException("Missing the required parameter 'licenseGroupId' when calling getLicenseGroup(Async)"); @@ -1974,13 +2030,14 @@ private okhttp3.Call getLicenseGroupValidateBeforeCall(String licenseGroupId, fi * @return LicenseGroup * @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 single LicenseGroup object. -
401 Error response due to missing auth cookie. -
*/ - public LicenseGroup getLicenseGroup(String licenseGroupId) throws ApiException { + public LicenseGroup getLicenseGroup(@javax.annotation.Nonnull String licenseGroupId) throws ApiException { ApiResponse localVarResp = getLicenseGroupWithHttpInfo(licenseGroupId); return localVarResp.getData(); } @@ -1992,13 +2049,14 @@ public LicenseGroup getLicenseGroup(String licenseGroupId) throws ApiException { * @return ApiResponse<LicenseGroup> * @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 single LicenseGroup object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getLicenseGroupWithHttpInfo(String licenseGroupId) throws ApiException { + public ApiResponse getLicenseGroupWithHttpInfo(@javax.annotation.Nonnull String licenseGroupId) throws ApiException { okhttp3.Call localVarCall = getLicenseGroupValidateBeforeCall(licenseGroupId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2012,13 +2070,14 @@ public ApiResponse getLicenseGroupWithHttpInfo(String licenseGroup * @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 single LicenseGroup object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getLicenseGroupAsync(String licenseGroupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLicenseGroupAsync(@javax.annotation.Nonnull String licenseGroupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getLicenseGroupValidateBeforeCall(licenseGroupId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2033,13 +2092,14 @@ public okhttp3.Call getLicenseGroupAsync(String licenseGroupId, final ApiCallbac * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductListingCall(String productId, Boolean hydrate, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProductListingCall(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2089,7 +2149,7 @@ public okhttp3.Call getProductListingCall(String productId, Boolean hydrate, fin } @SuppressWarnings("rawtypes") - private okhttp3.Call getProductListingValidateBeforeCall(String productId, Boolean hydrate, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getProductListingValidateBeforeCall(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate, final ApiCallback _callback) throws ApiException { // verify the required parameter 'productId' is set if (productId == null) { throw new ApiException("Missing the required parameter 'productId' when calling getProductListing(Async)"); @@ -2107,13 +2167,14 @@ private okhttp3.Call getProductListingValidateBeforeCall(String productId, Boole * @return ProductListing * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public ProductListing getProductListing(String productId, Boolean hydrate) throws ApiException { + public ProductListing getProductListing(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate) throws ApiException { ApiResponse localVarResp = getProductListingWithHttpInfo(productId, hydrate); return localVarResp.getData(); } @@ -2126,13 +2187,14 @@ public ProductListing getProductListing(String productId, Boolean hydrate) throw * @return ApiResponse<ProductListing> * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getProductListingWithHttpInfo(String productId, Boolean hydrate) throws ApiException { + public ApiResponse getProductListingWithHttpInfo(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate) throws ApiException { okhttp3.Call localVarCall = getProductListingValidateBeforeCall(productId, hydrate, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2147,13 +2209,14 @@ public ApiResponse getProductListingWithHttpInfo(String productI * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductListingAsync(String productId, Boolean hydrate, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProductListingAsync(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getProductListingValidateBeforeCall(productId, hydrate, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2167,7 +2230,8 @@ public okhttp3.Call getProductListingAsync(String productId, Boolean hydrate, fi * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -2175,7 +2239,7 @@ public okhttp3.Call getProductListingAsync(String productId, Boolean hydrate, fi * @deprecated */ @Deprecated - public okhttp3.Call getProductListingAlternateCall(String productId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProductListingAlternateCall(@javax.annotation.Nonnull String productId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2222,7 +2286,7 @@ public okhttp3.Call getProductListingAlternateCall(String productId, final ApiCa @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getProductListingAlternateValidateBeforeCall(String productId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getProductListingAlternateValidateBeforeCall(@javax.annotation.Nonnull String productId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'productId' is set if (productId == null) { throw new ApiException("Missing the required parameter 'productId' when calling getProductListingAlternate(Async)"); @@ -2239,7 +2303,8 @@ private okhttp3.Call getProductListingAlternateValidateBeforeCall(String product * @return ProductListing * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
+
+ @@ -2247,7 +2312,7 @@ private okhttp3.Call getProductListingAlternateValidateBeforeCall(String product * @deprecated */ @Deprecated - public ProductListing getProductListingAlternate(String productId) throws ApiException { + public ProductListing getProductListingAlternate(@javax.annotation.Nonnull String productId) throws ApiException { ApiResponse localVarResp = getProductListingAlternateWithHttpInfo(productId); return localVarResp.getData(); } @@ -2259,7 +2324,8 @@ public ProductListing getProductListingAlternate(String productId) throws ApiExc * @return ApiResponse<ProductListing> * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
+
+ @@ -2267,7 +2333,7 @@ public ProductListing getProductListingAlternate(String productId) throws ApiExc * @deprecated */ @Deprecated - public ApiResponse getProductListingAlternateWithHttpInfo(String productId) throws ApiException { + public ApiResponse getProductListingAlternateWithHttpInfo(@javax.annotation.Nonnull String productId) throws ApiException { okhttp3.Call localVarCall = getProductListingAlternateValidateBeforeCall(productId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2281,7 +2347,8 @@ public ApiResponse getProductListingAlternateWithHttpInfo(String * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
+
+ @@ -2289,7 +2356,7 @@ public ApiResponse getProductListingAlternateWithHttpInfo(String * @deprecated */ @Deprecated - public okhttp3.Call getProductListingAlternateAsync(String productId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProductListingAlternateAsync(@javax.annotation.Nonnull String productId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getProductListingAlternateValidateBeforeCall(productId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2309,13 +2376,14 @@ public okhttp3.Call getProductListingAlternateAsync(String productId, final ApiC * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
+
+
Response Details
Status Code Description Response Headers
200 Returns a list of ProductListing objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductListingsCall(String userId, Integer n, Integer offset, Boolean hydrate, String listingType, String groupId, Boolean active, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProductListingsCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean hydrate, @javax.annotation.Nullable String listingType, @javax.annotation.Nullable String groupId, @javax.annotation.Nullable Boolean active, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2385,7 +2453,7 @@ public okhttp3.Call getProductListingsCall(String userId, Integer n, Integer off } @SuppressWarnings("rawtypes") - private okhttp3.Call getProductListingsValidateBeforeCall(String userId, Integer n, Integer offset, Boolean hydrate, String listingType, String groupId, Boolean active, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getProductListingsValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean hydrate, @javax.annotation.Nullable String listingType, @javax.annotation.Nullable String groupId, @javax.annotation.Nullable Boolean active, 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 getProductListings(Async)"); @@ -2408,13 +2476,14 @@ private okhttp3.Call getProductListingsValidateBeforeCall(String userId, Integer * @return List<ProductListing> * @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 list of ProductListing objects. -
401 Error response due to missing auth cookie. -
*/ - public List getProductListings(String userId, Integer n, Integer offset, Boolean hydrate, String listingType, String groupId, Boolean active) throws ApiException { + public List getProductListings(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean hydrate, @javax.annotation.Nullable String listingType, @javax.annotation.Nullable String groupId, @javax.annotation.Nullable Boolean active) throws ApiException { ApiResponse> localVarResp = getProductListingsWithHttpInfo(userId, n, offset, hydrate, listingType, groupId, active); return localVarResp.getData(); } @@ -2432,13 +2501,14 @@ public List getProductListings(String userId, Integer n, Integer * @return ApiResponse<List<ProductListing>> * @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 list of ProductListing objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getProductListingsWithHttpInfo(String userId, Integer n, Integer offset, Boolean hydrate, String listingType, String groupId, Boolean active) throws ApiException { + public ApiResponse> getProductListingsWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean hydrate, @javax.annotation.Nullable String listingType, @javax.annotation.Nullable String groupId, @javax.annotation.Nullable Boolean active) throws ApiException { okhttp3.Call localVarCall = getProductListingsValidateBeforeCall(userId, n, offset, hydrate, listingType, groupId, active, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2458,13 +2528,14 @@ public ApiResponse> getProductListingsWithHttpInfo(String u * @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 list of ProductListing objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductListingsAsync(String userId, Integer n, Integer offset, Boolean hydrate, String listingType, String groupId, Boolean active, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getProductListingsAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean hydrate, @javax.annotation.Nullable String listingType, @javax.annotation.Nullable String groupId, @javax.annotation.Nullable Boolean active, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getProductListingsValidateBeforeCall(userId, n, offset, hydrate, listingType, groupId, active, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -2478,13 +2549,14 @@ public okhttp3.Call getProductListingsAsync(String userId, Integer n, Integer of * @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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductPurchaseCall(String productPurchaseId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProductPurchaseCall(@javax.annotation.Nonnull String productPurchaseId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2530,7 +2602,7 @@ public okhttp3.Call getProductPurchaseCall(String productPurchaseId, final ApiCa } @SuppressWarnings("rawtypes") - private okhttp3.Call getProductPurchaseValidateBeforeCall(String productPurchaseId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getProductPurchaseValidateBeforeCall(@javax.annotation.Nonnull String productPurchaseId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'productPurchaseId' is set if (productPurchaseId == null) { throw new ApiException("Missing the required parameter 'productPurchaseId' when calling getProductPurchase(Async)"); @@ -2547,13 +2619,14 @@ private okhttp3.Call getProductPurchaseValidateBeforeCall(String productPurchase * @return ProductPurchase * @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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
*/ - public ProductPurchase getProductPurchase(String productPurchaseId) throws ApiException { + public ProductPurchase getProductPurchase(@javax.annotation.Nonnull String productPurchaseId) throws ApiException { ApiResponse localVarResp = getProductPurchaseWithHttpInfo(productPurchaseId); return localVarResp.getData(); } @@ -2565,13 +2638,14 @@ public ProductPurchase getProductPurchase(String productPurchaseId) throws ApiEx * @return ApiResponse<ProductPurchase> * @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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getProductPurchaseWithHttpInfo(String productPurchaseId) throws ApiException { + public ApiResponse getProductPurchaseWithHttpInfo(@javax.annotation.Nonnull String productPurchaseId) throws ApiException { okhttp3.Call localVarCall = getProductPurchaseValidateBeforeCall(productPurchaseId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2585,13 +2659,14 @@ public ApiResponse getProductPurchaseWithHttpInfo(String produc * @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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductPurchaseAsync(String productPurchaseId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProductPurchaseAsync(@javax.annotation.Nonnull String productPurchaseId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getProductPurchaseValidateBeforeCall(productPurchaseId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2612,13 +2687,14 @@ public okhttp3.Call getProductPurchaseAsync(String productPurchaseId, final ApiC * @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 single ProductPurchaseHistory object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductPurchaseHistoryCall(String userId, Integer n, OffsetDateTime dateMin, OffsetDateTime dateMax, String fromUserId, String toUserId, SortOptionProductPurchase sort, OrderOptionShort order, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProductPurchaseHistoryCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OffsetDateTime dateMin, @javax.annotation.Nullable OffsetDateTime dateMax, @javax.annotation.Nullable String fromUserId, @javax.annotation.Nullable String toUserId, @javax.annotation.Nullable SortOptionProductPurchase sort, @javax.annotation.Nullable OrderOptionShort order, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2692,7 +2768,7 @@ public okhttp3.Call getProductPurchaseHistoryCall(String userId, Integer n, Offs } @SuppressWarnings("rawtypes") - private okhttp3.Call getProductPurchaseHistoryValidateBeforeCall(String userId, Integer n, OffsetDateTime dateMin, OffsetDateTime dateMax, String fromUserId, String toUserId, SortOptionProductPurchase sort, OrderOptionShort order, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getProductPurchaseHistoryValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OffsetDateTime dateMin, @javax.annotation.Nullable OffsetDateTime dateMax, @javax.annotation.Nullable String fromUserId, @javax.annotation.Nullable String toUserId, @javax.annotation.Nullable SortOptionProductPurchase sort, @javax.annotation.Nullable OrderOptionShort order, 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 getProductPurchaseHistory(Async)"); @@ -2716,13 +2792,14 @@ private okhttp3.Call getProductPurchaseHistoryValidateBeforeCall(String userId, * @return ProductPurchaseHistory * @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 single ProductPurchaseHistory object. -
401 Error response due to missing auth cookie. -
*/ - public ProductPurchaseHistory getProductPurchaseHistory(String userId, Integer n, OffsetDateTime dateMin, OffsetDateTime dateMax, String fromUserId, String toUserId, SortOptionProductPurchase sort, OrderOptionShort order) throws ApiException { + public ProductPurchaseHistory getProductPurchaseHistory(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OffsetDateTime dateMin, @javax.annotation.Nullable OffsetDateTime dateMax, @javax.annotation.Nullable String fromUserId, @javax.annotation.Nullable String toUserId, @javax.annotation.Nullable SortOptionProductPurchase sort, @javax.annotation.Nullable OrderOptionShort order) throws ApiException { ApiResponse localVarResp = getProductPurchaseHistoryWithHttpInfo(userId, n, dateMin, dateMax, fromUserId, toUserId, sort, order); return localVarResp.getData(); } @@ -2741,13 +2818,14 @@ public ProductPurchaseHistory getProductPurchaseHistory(String userId, Integer n * @return ApiResponse<ProductPurchaseHistory> * @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 single ProductPurchaseHistory object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getProductPurchaseHistoryWithHttpInfo(String userId, Integer n, OffsetDateTime dateMin, OffsetDateTime dateMax, String fromUserId, String toUserId, SortOptionProductPurchase sort, OrderOptionShort order) throws ApiException { + public ApiResponse getProductPurchaseHistoryWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OffsetDateTime dateMin, @javax.annotation.Nullable OffsetDateTime dateMax, @javax.annotation.Nullable String fromUserId, @javax.annotation.Nullable String toUserId, @javax.annotation.Nullable SortOptionProductPurchase sort, @javax.annotation.Nullable OrderOptionShort order) throws ApiException { okhttp3.Call localVarCall = getProductPurchaseHistoryValidateBeforeCall(userId, n, dateMin, dateMax, fromUserId, toUserId, sort, order, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2768,13 +2846,14 @@ public ApiResponse getProductPurchaseHistoryWithHttpInfo * @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 single ProductPurchaseHistory object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductPurchaseHistoryAsync(String userId, Integer n, OffsetDateTime dateMin, OffsetDateTime dateMax, String fromUserId, String toUserId, SortOptionProductPurchase sort, OrderOptionShort order, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProductPurchaseHistoryAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OffsetDateTime dateMin, @javax.annotation.Nullable OffsetDateTime dateMax, @javax.annotation.Nullable String fromUserId, @javax.annotation.Nullable String toUserId, @javax.annotation.Nullable SortOptionProductPurchase sort, @javax.annotation.Nullable OrderOptionShort order, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getProductPurchaseHistoryValidateBeforeCall(userId, n, dateMin, dateMax, fromUserId, toUserId, sort, order, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2788,13 +2867,14 @@ public okhttp3.Call getProductPurchaseHistoryAsync(String userId, Integer n, Off * @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 list of stacks for a product purchase. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductPurchaseStacksCall(String productPurchaseId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProductPurchaseStacksCall(@javax.annotation.Nonnull String productPurchaseId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2840,7 +2920,7 @@ public okhttp3.Call getProductPurchaseStacksCall(String productPurchaseId, final } @SuppressWarnings("rawtypes") - private okhttp3.Call getProductPurchaseStacksValidateBeforeCall(String productPurchaseId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getProductPurchaseStacksValidateBeforeCall(@javax.annotation.Nonnull String productPurchaseId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'productPurchaseId' is set if (productPurchaseId == null) { throw new ApiException("Missing the required parameter 'productPurchaseId' when calling getProductPurchaseStacks(Async)"); @@ -2857,13 +2937,14 @@ private okhttp3.Call getProductPurchaseStacksValidateBeforeCall(String productPu * @return List<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a list of stacks for a product purchase. -
401 Error response due to missing auth cookie. -
*/ - public List getProductPurchaseStacks(String productPurchaseId) throws ApiException { + public List getProductPurchaseStacks(@javax.annotation.Nonnull String productPurchaseId) throws ApiException { ApiResponse> localVarResp = getProductPurchaseStacksWithHttpInfo(productPurchaseId); return localVarResp.getData(); } @@ -2875,13 +2956,14 @@ public List getProductPurchaseStacks(String productPurchaseId) throws Ap * @return ApiResponse<List<Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a list of stacks for a product purchase. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getProductPurchaseStacksWithHttpInfo(String productPurchaseId) throws ApiException { + public ApiResponse> getProductPurchaseStacksWithHttpInfo(@javax.annotation.Nonnull String productPurchaseId) throws ApiException { okhttp3.Call localVarCall = getProductPurchaseStacksValidateBeforeCall(productPurchaseId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2895,13 +2977,14 @@ public ApiResponse> getProductPurchaseStacksWithHttpInfo(String pro * @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 list of stacks for a product purchase. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductPurchaseStacksAsync(String productPurchaseId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getProductPurchaseStacksAsync(@javax.annotation.Nonnull String productPurchaseId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getProductPurchaseStacksValidateBeforeCall(productPurchaseId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -2921,13 +3004,14 @@ public okhttp3.Call getProductPurchaseStacksAsync(String productPurchaseId, fina * @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 list of ProductPurchase objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductPurchasesCall(String buyerId, String sellerId, Integer n, Integer offset, Boolean mostRecent, SortOptionProductPurchase sort, OrderOptionShort order, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getProductPurchasesCall(@javax.annotation.Nonnull String buyerId, @javax.annotation.Nullable String sellerId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean mostRecent, @javax.annotation.Nullable SortOptionProductPurchase sort, @javax.annotation.Nullable OrderOptionShort order, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3000,7 +3084,7 @@ public okhttp3.Call getProductPurchasesCall(String buyerId, String sellerId, Int } @SuppressWarnings("rawtypes") - private okhttp3.Call getProductPurchasesValidateBeforeCall(String buyerId, String sellerId, Integer n, Integer offset, Boolean mostRecent, SortOptionProductPurchase sort, OrderOptionShort order, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getProductPurchasesValidateBeforeCall(@javax.annotation.Nonnull String buyerId, @javax.annotation.Nullable String sellerId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean mostRecent, @javax.annotation.Nullable SortOptionProductPurchase sort, @javax.annotation.Nullable OrderOptionShort order, final ApiCallback _callback) throws ApiException { // verify the required parameter 'buyerId' is set if (buyerId == null) { throw new ApiException("Missing the required parameter 'buyerId' when calling getProductPurchases(Async)"); @@ -3023,13 +3107,14 @@ private okhttp3.Call getProductPurchasesValidateBeforeCall(String buyerId, Strin * @return List<ProductPurchase> * @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 list of ProductPurchase objects. -
401 Error response due to missing auth cookie. -
*/ - public List getProductPurchases(String buyerId, String sellerId, Integer n, Integer offset, Boolean mostRecent, SortOptionProductPurchase sort, OrderOptionShort order) throws ApiException { + public List getProductPurchases(@javax.annotation.Nonnull String buyerId, @javax.annotation.Nullable String sellerId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean mostRecent, @javax.annotation.Nullable SortOptionProductPurchase sort, @javax.annotation.Nullable OrderOptionShort order) throws ApiException { ApiResponse> localVarResp = getProductPurchasesWithHttpInfo(buyerId, sellerId, n, offset, mostRecent, sort, order); return localVarResp.getData(); } @@ -3047,13 +3132,14 @@ public List getProductPurchases(String buyerId, String sellerId * @return ApiResponse<List<ProductPurchase>> * @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 list of ProductPurchase objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getProductPurchasesWithHttpInfo(String buyerId, String sellerId, Integer n, Integer offset, Boolean mostRecent, SortOptionProductPurchase sort, OrderOptionShort order) throws ApiException { + public ApiResponse> getProductPurchasesWithHttpInfo(@javax.annotation.Nonnull String buyerId, @javax.annotation.Nullable String sellerId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean mostRecent, @javax.annotation.Nullable SortOptionProductPurchase sort, @javax.annotation.Nullable OrderOptionShort order) throws ApiException { okhttp3.Call localVarCall = getProductPurchasesValidateBeforeCall(buyerId, sellerId, n, offset, mostRecent, sort, order, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3073,13 +3159,14 @@ public ApiResponse> getProductPurchasesWithHttpInfo(String * @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 list of ProductPurchase objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getProductPurchasesAsync(String buyerId, String sellerId, Integer n, Integer offset, Boolean mostRecent, SortOptionProductPurchase sort, OrderOptionShort order, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getProductPurchasesAsync(@javax.annotation.Nonnull String buyerId, @javax.annotation.Nullable String sellerId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean mostRecent, @javax.annotation.Nullable SortOptionProductPurchase sort, @javax.annotation.Nullable OrderOptionShort order, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getProductPurchasesValidateBeforeCall(buyerId, sellerId, n, offset, mostRecent, sort, order, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -3092,7 +3179,8 @@ public okhttp3.Call getProductPurchasesAsync(String buyerId, String sellerId, In * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -3154,7 +3242,8 @@ private okhttp3.Call getRecentSubscriptionValidateBeforeCall(final ApiCallback _ * @return UserSubscription * @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 UserSubscription object. -
401 Error response due to missing auth cookie. -
+
+ @@ -3171,7 +3260,8 @@ public UserSubscription getRecentSubscription() throws ApiException { * @return ApiResponse<UserSubscription> * @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 UserSubscription object. -
401 Error response due to missing auth cookie. -
+
+ @@ -3190,7 +3280,8 @@ public ApiResponse getRecentSubscriptionWithHttpInfo() throws * @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 UserSubscription object. -
401 Error response due to missing auth cookie. -
+
+ @@ -3209,7 +3300,8 @@ public okhttp3.Call getRecentSubscriptionAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns a UserSubscription object. -
401 Error response due to missing auth cookie. -
+ @@ -3271,7 +3363,8 @@ private okhttp3.Call getSellerEligibilityValidateBeforeCall(final ApiCallback _c * @return SellerEligibility * @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 single SellerEligibility object. -
401 Error response due to missing auth cookie. -
+
+ @@ -3288,7 +3381,8 @@ public SellerEligibility getSellerEligibility() throws ApiException { * @return ApiResponse<SellerEligibility> * @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 single SellerEligibility object. -
401 Error response due to missing auth cookie. -
+
+ @@ -3307,7 +3401,8 @@ public ApiResponse getSellerEligibilityWithHttpInfo() throws * @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 single SellerEligibility object. -
401 Error response due to missing auth cookie. -
+
+ @@ -3327,7 +3422,8 @@ public okhttp3.Call getSellerEligibilityAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns a single SellerEligibility object. -
401 Error response due to missing auth cookie. -
+ @@ -3335,7 +3431,7 @@ public okhttp3.Call getSellerEligibilityAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns a single Transaction object. -
401 Error response due to missing auth cookie. -
+ @@ -3407,7 +3504,7 @@ private okhttp3.Call getSteamTransactionValidateBeforeCall(String transactionId, * @deprecated */ @Deprecated - public Transaction getSteamTransaction(String transactionId) throws ApiException { + public Transaction getSteamTransaction(@javax.annotation.Nonnull String transactionId) throws ApiException { ApiResponse localVarResp = getSteamTransactionWithHttpInfo(transactionId); return localVarResp.getData(); } @@ -3419,7 +3516,8 @@ public Transaction getSteamTransaction(String transactionId) throws ApiException * @return ApiResponse<Transaction> * @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 single Transaction object. -
401 Error response due to missing auth cookie. -
+
+ @@ -3427,7 +3525,7 @@ public Transaction getSteamTransaction(String transactionId) throws ApiException * @deprecated */ @Deprecated - public ApiResponse getSteamTransactionWithHttpInfo(String transactionId) throws ApiException { + public ApiResponse getSteamTransactionWithHttpInfo(@javax.annotation.Nonnull String transactionId) throws ApiException { okhttp3.Call localVarCall = getSteamTransactionValidateBeforeCall(transactionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3441,7 +3539,8 @@ public ApiResponse getSteamTransactionWithHttpInfo(String transacti * @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 single Transaction object. -
401 Error response due to missing auth cookie. -
+
+ @@ -3449,7 +3548,7 @@ public ApiResponse getSteamTransactionWithHttpInfo(String transacti * @deprecated */ @Deprecated - public okhttp3.Call getSteamTransactionAsync(String transactionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getSteamTransactionAsync(@javax.annotation.Nonnull String transactionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSteamTransactionValidateBeforeCall(transactionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -3462,7 +3561,8 @@ public okhttp3.Call getSteamTransactionAsync(String transactionId, final ApiCall * @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 single Transaction object. -
401 Error response due to missing auth cookie. -
+
+ @@ -3524,7 +3624,8 @@ private okhttp3.Call getSteamTransactionsValidateBeforeCall(final ApiCallback _c * @return List<Transaction> * @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 list of Transaction objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -3541,7 +3642,8 @@ public List getSteamTransactions() throws ApiException { * @return ApiResponse<List<Transaction>> * @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 list of Transaction objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -3560,7 +3662,8 @@ public ApiResponse> getSteamTransactionsWithHttpInfo() throws * @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 list of Transaction objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -3582,13 +3685,14 @@ public okhttp3.Call getSteamTransactionsAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns a list of Transaction objects. -
401 Error response due to missing auth cookie. -
+
Response Details
Status Code Description Response Headers
200 Returns a single Store object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getStoreCall(String storeId, Boolean hydrateListings, Boolean hydrateProducts, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getStoreCall(@javax.annotation.Nonnull String storeId, @javax.annotation.Nullable Boolean hydrateListings, @javax.annotation.Nullable Boolean hydrateProducts, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3645,7 +3749,7 @@ public okhttp3.Call getStoreCall(String storeId, Boolean hydrateListings, Boolea } @SuppressWarnings("rawtypes") - private okhttp3.Call getStoreValidateBeforeCall(String storeId, Boolean hydrateListings, Boolean hydrateProducts, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getStoreValidateBeforeCall(@javax.annotation.Nonnull String storeId, @javax.annotation.Nullable Boolean hydrateListings, @javax.annotation.Nullable Boolean hydrateProducts, final ApiCallback _callback) throws ApiException { // verify the required parameter 'storeId' is set if (storeId == null) { throw new ApiException("Missing the required parameter 'storeId' when calling getStore(Async)"); @@ -3664,13 +3768,14 @@ private okhttp3.Call getStoreValidateBeforeCall(String storeId, Boolean hydrateL * @return Store * @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 single Store object. -
401 Error response due to missing auth cookie. -
*/ - public Store getStore(String storeId, Boolean hydrateListings, Boolean hydrateProducts) throws ApiException { + public Store getStore(@javax.annotation.Nonnull String storeId, @javax.annotation.Nullable Boolean hydrateListings, @javax.annotation.Nullable Boolean hydrateProducts) throws ApiException { ApiResponse localVarResp = getStoreWithHttpInfo(storeId, hydrateListings, hydrateProducts); return localVarResp.getData(); } @@ -3684,13 +3789,14 @@ public Store getStore(String storeId, Boolean hydrateListings, Boolean hydratePr * @return ApiResponse<Store> * @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 single Store object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getStoreWithHttpInfo(String storeId, Boolean hydrateListings, Boolean hydrateProducts) throws ApiException { + public ApiResponse getStoreWithHttpInfo(@javax.annotation.Nonnull String storeId, @javax.annotation.Nullable Boolean hydrateListings, @javax.annotation.Nullable Boolean hydrateProducts) throws ApiException { okhttp3.Call localVarCall = getStoreValidateBeforeCall(storeId, hydrateListings, hydrateProducts, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3706,13 +3812,14 @@ public ApiResponse getStoreWithHttpInfo(String storeId, Boolean hydrateLi * @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 single Store object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getStoreAsync(String storeId, Boolean hydrateListings, Boolean hydrateProducts, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getStoreAsync(@javax.annotation.Nonnull String storeId, @javax.annotation.Nullable Boolean hydrateListings, @javax.annotation.Nullable Boolean hydrateProducts, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getStoreValidateBeforeCall(storeId, hydrateListings, hydrateProducts, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -3728,13 +3835,14 @@ public okhttp3.Call getStoreAsync(String storeId, Boolean hydrateListings, Boole * @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 list of StoreShelf objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getStoreShelvesCall(String storeId, Boolean hydrateListings, StoreView fetch, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getStoreShelvesCall(@javax.annotation.Nonnull String storeId, @javax.annotation.Nullable Boolean hydrateListings, @javax.annotation.Nullable StoreView fetch, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3791,7 +3899,7 @@ public okhttp3.Call getStoreShelvesCall(String storeId, Boolean hydrateListings, } @SuppressWarnings("rawtypes") - private okhttp3.Call getStoreShelvesValidateBeforeCall(String storeId, Boolean hydrateListings, StoreView fetch, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getStoreShelvesValidateBeforeCall(@javax.annotation.Nonnull String storeId, @javax.annotation.Nullable Boolean hydrateListings, @javax.annotation.Nullable StoreView fetch, final ApiCallback _callback) throws ApiException { // verify the required parameter 'storeId' is set if (storeId == null) { throw new ApiException("Missing the required parameter 'storeId' when calling getStoreShelves(Async)"); @@ -3810,13 +3918,14 @@ private okhttp3.Call getStoreShelvesValidateBeforeCall(String storeId, Boolean h * @return List<StoreShelf> * @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 list of StoreShelf objects. -
401 Error response due to missing auth cookie. -
*/ - public List getStoreShelves(String storeId, Boolean hydrateListings, StoreView fetch) throws ApiException { + public List getStoreShelves(@javax.annotation.Nonnull String storeId, @javax.annotation.Nullable Boolean hydrateListings, @javax.annotation.Nullable StoreView fetch) throws ApiException { ApiResponse> localVarResp = getStoreShelvesWithHttpInfo(storeId, hydrateListings, fetch); return localVarResp.getData(); } @@ -3830,13 +3939,14 @@ public List getStoreShelves(String storeId, Boolean hydrateListings, * @return ApiResponse<List<StoreShelf>> * @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 list of StoreShelf objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getStoreShelvesWithHttpInfo(String storeId, Boolean hydrateListings, StoreView fetch) throws ApiException { + public ApiResponse> getStoreShelvesWithHttpInfo(@javax.annotation.Nonnull String storeId, @javax.annotation.Nullable Boolean hydrateListings, @javax.annotation.Nullable StoreView fetch) throws ApiException { okhttp3.Call localVarCall = getStoreShelvesValidateBeforeCall(storeId, hydrateListings, fetch, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3852,13 +3962,14 @@ public ApiResponse> getStoreShelvesWithHttpInfo(String storeId, * @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 list of StoreShelf objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getStoreShelvesAsync(String storeId, Boolean hydrateListings, StoreView fetch, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getStoreShelvesAsync(@javax.annotation.Nonnull String storeId, @javax.annotation.Nullable Boolean hydrateListings, @javax.annotation.Nullable StoreView fetch, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getStoreShelvesValidateBeforeCall(storeId, hydrateListings, fetch, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -3871,7 +3982,8 @@ public okhttp3.Call getStoreShelvesAsync(String storeId, Boolean hydrateListings * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -3933,7 +4045,8 @@ private okhttp3.Call getSubscriptionsValidateBeforeCall(final ApiCallback _callb * @return List<Subscription> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Returns a list of Subscription objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -3950,7 +4063,8 @@ public List getSubscriptions() throws ApiException { * @return ApiResponse<List<Subscription>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Response Details
Status Code Description Response Headers
200 Returns a list of Subscription objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -3969,7 +4083,8 @@ public ApiResponse> getSubscriptionsWithHttpInfo() throws Api * @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 list of Subscription objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -3988,7 +4103,8 @@ public okhttp3.Call getSubscriptionsAsync(final ApiCallback> * @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 list of Subscription objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -4050,7 +4166,8 @@ private okhttp3.Call getTiliaStatusValidateBeforeCall(final ApiCallback _callbac * @return TiliaStatus * @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 single TiliaStatus object. -
401 Error response due to missing auth cookie. -
+
+ @@ -4067,7 +4184,8 @@ public TiliaStatus getTiliaStatus() throws ApiException { * @return ApiResponse<TiliaStatus> * @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 single TiliaStatus object. -
401 Error response due to missing auth cookie. -
+
+ @@ -4086,7 +4204,8 @@ public ApiResponse getTiliaStatusWithHttpInfo() throws ApiException * @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 single TiliaStatus object. -
401 Error response due to missing auth cookie. -
+
+ @@ -4106,13 +4225,14 @@ public okhttp3.Call getTiliaStatusAsync(final ApiCallback _callback * @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 single TiliaStatus object. -
401 Error response due to missing auth cookie. -
+
+
Response Details
Status Code Description Response Headers
200 Returns a single TiliaTOS object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getTiliaTosCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getTiliaTosCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4158,7 +4278,7 @@ public okhttp3.Call getTiliaTosCall(String userId, final ApiCallback _callback) } @SuppressWarnings("rawtypes") - private okhttp3.Call getTiliaTosValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTiliaTosValidateBeforeCall(@javax.annotation.Nonnull 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 getTiliaTos(Async)"); @@ -4175,13 +4295,14 @@ private okhttp3.Call getTiliaTosValidateBeforeCall(String userId, final ApiCallb * @return TiliaTOS * @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 single TiliaTOS object. -
401 Error response due to missing auth cookie. -
*/ - public TiliaTOS getTiliaTos(String userId) throws ApiException { + public TiliaTOS getTiliaTos(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getTiliaTosWithHttpInfo(userId); return localVarResp.getData(); } @@ -4193,13 +4314,14 @@ public TiliaTOS getTiliaTos(String userId) throws ApiException { * @return ApiResponse<TiliaTOS> * @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 single TiliaTOS object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getTiliaTosWithHttpInfo(String userId) throws ApiException { + public ApiResponse getTiliaTosWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getTiliaTosValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -4213,13 +4335,14 @@ public ApiResponse getTiliaTosWithHttpInfo(String userId) throws ApiEx * @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 single TiliaTOS object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getTiliaTosAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getTiliaTosAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getTiliaTosValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -4232,7 +4355,8 @@ public okhttp3.Call getTiliaTosAsync(String userId, final ApiCallback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -4294,7 +4418,8 @@ private okhttp3.Call getTokenBundlesValidateBeforeCall(final ApiCallback _callba * @return List<TokenBundle> * @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 list of TokenBundle objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -4311,7 +4436,8 @@ public List getTokenBundles() throws ApiException { * @return ApiResponse<List<TokenBundle>> * @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 list of TokenBundle objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -4330,7 +4456,8 @@ public ApiResponse> getTokenBundlesWithHttpInfo() throws ApiEx * @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 list of TokenBundle objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -4351,13 +4478,14 @@ public okhttp3.Call getTokenBundlesAsync(final ApiCallback> _c * @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 list of TokenBundle objects. -
401 Error response due to missing auth cookie. -
+
+
Response Details
Status Code Description Response Headers
200 Returns a single UserCreditsEligible object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserCreditsEligibleCall(String userId, String subscriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserCreditsEligibleCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String subscriptionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4407,7 +4535,7 @@ public okhttp3.Call getUserCreditsEligibleCall(String userId, String subscriptio } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserCreditsEligibleValidateBeforeCall(String userId, String subscriptionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserCreditsEligibleValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String subscriptionId, 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 getUserCreditsEligible(Async)"); @@ -4423,46 +4551,48 @@ private okhttp3.Call getUserCreditsEligibleValidateBeforeCall(String userId, Str } /** - * Get User Credits Eligiblity + * Get User Credits Eligibility * Get the user's eligibility status for subscriptions based on available credits. * @param userId Must be a valid user ID. (required) * @param subscriptionId (required) * @return UserCreditsEligible * @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 single UserCreditsEligible object. -
401 Error response due to missing auth cookie. -
*/ - public UserCreditsEligible getUserCreditsEligible(String userId, String subscriptionId) throws ApiException { + public UserCreditsEligible getUserCreditsEligible(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String subscriptionId) throws ApiException { ApiResponse localVarResp = getUserCreditsEligibleWithHttpInfo(userId, subscriptionId); return localVarResp.getData(); } /** - * Get User Credits Eligiblity + * Get User Credits Eligibility * Get the user's eligibility status for subscriptions based on available credits. * @param userId Must be a valid user ID. (required) * @param subscriptionId (required) * @return ApiResponse<UserCreditsEligible> * @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 single UserCreditsEligible object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getUserCreditsEligibleWithHttpInfo(String userId, String subscriptionId) throws ApiException { + public ApiResponse getUserCreditsEligibleWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String subscriptionId) throws ApiException { okhttp3.Call localVarCall = getUserCreditsEligibleValidateBeforeCall(userId, subscriptionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get User Credits Eligiblity (asynchronously) + * Get User Credits Eligibility (asynchronously) * Get the user's eligibility status for subscriptions based on available credits. * @param userId Must be a valid user ID. (required) * @param subscriptionId (required) @@ -4470,13 +4600,14 @@ public ApiResponse getUserCreditsEligibleWithHttpInfo(Strin * @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 single UserCreditsEligible object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserCreditsEligibleAsync(String userId, String subscriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserCreditsEligibleAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String subscriptionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserCreditsEligibleValidateBeforeCall(userId, subscriptionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -4491,13 +4622,14 @@ public okhttp3.Call getUserCreditsEligibleAsync(String userId, String subscripti * @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 single UserSubscriptionEligible object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserSubscriptionEligibleCall(String userId, String steamId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserSubscriptionEligibleCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String steamId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4547,7 +4679,7 @@ public okhttp3.Call getUserSubscriptionEligibleCall(String userId, String steamI } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserSubscriptionEligibleValidateBeforeCall(String userId, String steamId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserSubscriptionEligibleValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String steamId, 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 getUserSubscriptionEligible(Async)"); @@ -4558,46 +4690,48 @@ private okhttp3.Call getUserSubscriptionEligibleValidateBeforeCall(String userId } /** - * Get User Subscription Eligiblity + * Get User Subscription Eligibility * Get the user's eligibility status for subscriptions. * @param userId Must be a valid user ID. (required) * @param steamId The Steam ID of the user. (optional) * @return UserSubscriptionEligible * @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 single UserSubscriptionEligible object. -
401 Error response due to missing auth cookie. -
*/ - public UserSubscriptionEligible getUserSubscriptionEligible(String userId, String steamId) throws ApiException { + public UserSubscriptionEligible getUserSubscriptionEligible(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String steamId) throws ApiException { ApiResponse localVarResp = getUserSubscriptionEligibleWithHttpInfo(userId, steamId); return localVarResp.getData(); } /** - * Get User Subscription Eligiblity + * Get User Subscription Eligibility * Get the user's eligibility status for subscriptions. * @param userId Must be a valid user ID. (required) * @param steamId The Steam ID of the user. (optional) * @return ApiResponse<UserSubscriptionEligible> * @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 single UserSubscriptionEligible object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getUserSubscriptionEligibleWithHttpInfo(String userId, String steamId) throws ApiException { + public ApiResponse getUserSubscriptionEligibleWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String steamId) throws ApiException { okhttp3.Call localVarCall = getUserSubscriptionEligibleValidateBeforeCall(userId, steamId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get User Subscription Eligiblity (asynchronously) + * Get User Subscription Eligibility (asynchronously) * Get the user's eligibility status for subscriptions. * @param userId Must be a valid user ID. (required) * @param steamId The Steam ID of the user. (optional) @@ -4605,13 +4739,14 @@ public ApiResponse getUserSubscriptionEligibleWithHttp * @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 single UserSubscriptionEligible object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserSubscriptionEligibleAsync(String userId, String steamId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserSubscriptionEligibleAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String steamId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserSubscriptionEligibleValidateBeforeCall(userId, steamId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -4625,13 +4760,14 @@ public okhttp3.Call getUserSubscriptionEligibleAsync(String userId, String steam * @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 TiliaKyc object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserTiliaKycCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserTiliaKycCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4677,7 +4813,7 @@ public okhttp3.Call getUserTiliaKycCall(String userId, final ApiCallback _callba } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserTiliaKycValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserTiliaKycValidateBeforeCall(@javax.annotation.Nonnull 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 getUserTiliaKyc(Async)"); @@ -4694,13 +4830,14 @@ private okhttp3.Call getUserTiliaKycValidateBeforeCall(String userId, final ApiC * @return TiliaKyc * @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 TiliaKyc object. -
401 Error response due to missing auth cookie. -
*/ - public TiliaKyc getUserTiliaKyc(String userId) throws ApiException { + public TiliaKyc getUserTiliaKyc(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getUserTiliaKycWithHttpInfo(userId); return localVarResp.getData(); } @@ -4712,13 +4849,14 @@ public TiliaKyc getUserTiliaKyc(String userId) throws ApiException { * @return ApiResponse<TiliaKyc> * @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 TiliaKyc object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getUserTiliaKycWithHttpInfo(String userId) throws ApiException { + public ApiResponse getUserTiliaKycWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getUserTiliaKycValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -4732,13 +4870,14 @@ public ApiResponse getUserTiliaKycWithHttpInfo(String userId) throws A * @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 TiliaKyc object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserTiliaKycAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserTiliaKycAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserTiliaKycValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -4755,13 +4894,14 @@ public okhttp3.Call getUserTiliaKycAsync(String userId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a list of Store objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call listStoresCall(String sellerId, Boolean managementPov, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listStoresCall(@javax.annotation.Nullable String sellerId, @javax.annotation.Nullable Boolean managementPov, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4822,7 +4962,7 @@ public okhttp3.Call listStoresCall(String sellerId, Boolean managementPov, Integ } @SuppressWarnings("rawtypes") - private okhttp3.Call listStoresValidateBeforeCall(String sellerId, Boolean managementPov, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listStoresValidateBeforeCall(@javax.annotation.Nullable String sellerId, @javax.annotation.Nullable Boolean managementPov, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { return listStoresCall(sellerId, managementPov, n, offset, _callback); } @@ -4837,13 +4977,14 @@ private okhttp3.Call listStoresValidateBeforeCall(String sellerId, Boolean manag * @return List<Store> * @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 list of Store objects. -
401 Error response due to missing auth cookie. -
*/ - public List listStores(String sellerId, Boolean managementPov, Integer n, Integer offset) throws ApiException { + public List listStores(@javax.annotation.Nullable String sellerId, @javax.annotation.Nullable Boolean managementPov, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = listStoresWithHttpInfo(sellerId, managementPov, n, offset); return localVarResp.getData(); } @@ -4858,13 +4999,14 @@ public List listStores(String sellerId, Boolean managementPov, Integer n, * @return ApiResponse<List<Store>> * @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 list of Store objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> listStoresWithHttpInfo(String sellerId, Boolean managementPov, Integer n, Integer offset) throws ApiException { + public ApiResponse> listStoresWithHttpInfo(@javax.annotation.Nullable String sellerId, @javax.annotation.Nullable Boolean managementPov, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = listStoresValidateBeforeCall(sellerId, managementPov, n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -4881,13 +5023,14 @@ public ApiResponse> listStoresWithHttpInfo(String sellerId, Boolean * @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 list of Store objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call listStoresAsync(String sellerId, Boolean managementPov, Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listStoresAsync(@javax.annotation.Nullable String sellerId, @javax.annotation.Nullable Boolean managementPov, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listStoresValidateBeforeCall(sellerId, managementPov, n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -4903,13 +5046,14 @@ public okhttp3.Call listStoresAsync(String sellerId, Boolean managementPov, Inte * @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 list of Product objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call listUserProductsCall(String userId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listUserProductsCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4963,7 +5107,7 @@ public okhttp3.Call listUserProductsCall(String userId, Integer n, Integer offse } @SuppressWarnings("rawtypes") - private okhttp3.Call listUserProductsValidateBeforeCall(String userId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listUserProductsValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, 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 listUserProducts(Async)"); @@ -4982,13 +5126,14 @@ private okhttp3.Call listUserProductsValidateBeforeCall(String userId, Integer n * @return List<Product> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a list of Product objects. -
401 Error response due to missing auth cookie. -
*/ - public List listUserProducts(String userId, Integer n, Integer offset) throws ApiException { + public List listUserProducts(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = listUserProductsWithHttpInfo(userId, n, offset); return localVarResp.getData(); } @@ -5002,13 +5147,14 @@ public List listUserProducts(String userId, Integer n, Integer offset) * @return ApiResponse<List<Product>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a list of Product objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> listUserProductsWithHttpInfo(String userId, Integer n, Integer offset) throws ApiException { + public ApiResponse> listUserProductsWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = listUserProductsValidateBeforeCall(userId, n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -5024,13 +5170,14 @@ public ApiResponse> listUserProductsWithHttpInfo(String userId, In * @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 list of Product objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call listUserProductsAsync(String userId, Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listUserProductsAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listUserProductsValidateBeforeCall(userId, n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -5044,13 +5191,14 @@ public okhttp3.Call listUserProductsAsync(String userId, Integer n, Integer offs * @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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call purchaseProductListingCall(PurchaseProductListingRequest purchaseProductListingRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call purchaseProductListingCall(@javax.annotation.Nullable PurchaseProductListingRequest purchaseProductListingRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5096,7 +5244,7 @@ public okhttp3.Call purchaseProductListingCall(PurchaseProductListingRequest pur } @SuppressWarnings("rawtypes") - private okhttp3.Call purchaseProductListingValidateBeforeCall(PurchaseProductListingRequest purchaseProductListingRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call purchaseProductListingValidateBeforeCall(@javax.annotation.Nullable PurchaseProductListingRequest purchaseProductListingRequest, final ApiCallback _callback) throws ApiException { return purchaseProductListingCall(purchaseProductListingRequest, _callback); } @@ -5108,13 +5256,14 @@ private okhttp3.Call purchaseProductListingValidateBeforeCall(PurchaseProductLis * @return ProductPurchase * @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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
*/ - public ProductPurchase purchaseProductListing(PurchaseProductListingRequest purchaseProductListingRequest) throws ApiException { + public ProductPurchase purchaseProductListing(@javax.annotation.Nullable PurchaseProductListingRequest purchaseProductListingRequest) throws ApiException { ApiResponse localVarResp = purchaseProductListingWithHttpInfo(purchaseProductListingRequest); return localVarResp.getData(); } @@ -5126,13 +5275,14 @@ public ProductPurchase purchaseProductListing(PurchaseProductListingRequest purc * @return ApiResponse<ProductPurchase> * @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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse purchaseProductListingWithHttpInfo(PurchaseProductListingRequest purchaseProductListingRequest) throws ApiException { + public ApiResponse purchaseProductListingWithHttpInfo(@javax.annotation.Nullable PurchaseProductListingRequest purchaseProductListingRequest) throws ApiException { okhttp3.Call localVarCall = purchaseProductListingValidateBeforeCall(purchaseProductListingRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -5146,13 +5296,14 @@ public ApiResponse purchaseProductListingWithHttpInfo(PurchaseP * @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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call purchaseProductListingAsync(PurchaseProductListingRequest purchaseProductListingRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call purchaseProductListingAsync(@javax.annotation.Nullable PurchaseProductListingRequest purchaseProductListingRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = purchaseProductListingValidateBeforeCall(purchaseProductListingRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -5167,13 +5318,14 @@ public okhttp3.Call purchaseProductListingAsync(PurchaseProductListingRequest pu * @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 single Product object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateProductCall(String productId, UpdateProductRequest updateProductRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateProductCall(@javax.annotation.Nonnull String productId, @javax.annotation.Nonnull UpdateProductRequest updateProductRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5220,7 +5372,7 @@ public okhttp3.Call updateProductCall(String productId, UpdateProductRequest upd } @SuppressWarnings("rawtypes") - private okhttp3.Call updateProductValidateBeforeCall(String productId, UpdateProductRequest updateProductRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateProductValidateBeforeCall(@javax.annotation.Nonnull String productId, @javax.annotation.Nonnull UpdateProductRequest updateProductRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'productId' is set if (productId == null) { throw new ApiException("Missing the required parameter 'productId' when calling updateProduct(Async)"); @@ -5243,13 +5395,14 @@ private okhttp3.Call updateProductValidateBeforeCall(String productId, UpdatePro * @return Product * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a single Product object. -
401 Error response due to missing auth cookie. -
*/ - public Product updateProduct(String productId, UpdateProductRequest updateProductRequest) throws ApiException { + public Product updateProduct(@javax.annotation.Nonnull String productId, @javax.annotation.Nonnull UpdateProductRequest updateProductRequest) throws ApiException { ApiResponse localVarResp = updateProductWithHttpInfo(productId, updateProductRequest); return localVarResp.getData(); } @@ -5262,13 +5415,14 @@ public Product updateProduct(String productId, UpdateProductRequest updateProduc * @return ApiResponse<Product> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a single Product object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse updateProductWithHttpInfo(String productId, UpdateProductRequest updateProductRequest) throws ApiException { + public ApiResponse updateProductWithHttpInfo(@javax.annotation.Nonnull String productId, @javax.annotation.Nonnull UpdateProductRequest updateProductRequest) throws ApiException { okhttp3.Call localVarCall = updateProductValidateBeforeCall(productId, updateProductRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -5283,13 +5437,14 @@ public ApiResponse updateProductWithHttpInfo(String productId, UpdatePr * @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 single Product object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateProductAsync(String productId, UpdateProductRequest updateProductRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateProductAsync(@javax.annotation.Nonnull String productId, @javax.annotation.Nonnull UpdateProductRequest updateProductRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateProductValidateBeforeCall(productId, updateProductRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -5305,13 +5460,14 @@ public okhttp3.Call updateProductAsync(String productId, UpdateProductRequest up * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateProductListingDirectCall(String productId, UpdateListingRequest updateListingRequest, Boolean hydrate, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateProductListingDirectCall(@javax.annotation.Nonnull String productId, @javax.annotation.Nonnull UpdateListingRequest updateListingRequest, @javax.annotation.Nullable Boolean hydrate, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5362,7 +5518,7 @@ public okhttp3.Call updateProductListingDirectCall(String productId, UpdateListi } @SuppressWarnings("rawtypes") - private okhttp3.Call updateProductListingDirectValidateBeforeCall(String productId, UpdateListingRequest updateListingRequest, Boolean hydrate, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateProductListingDirectValidateBeforeCall(@javax.annotation.Nonnull String productId, @javax.annotation.Nonnull UpdateListingRequest updateListingRequest, @javax.annotation.Nullable Boolean hydrate, final ApiCallback _callback) throws ApiException { // verify the required parameter 'productId' is set if (productId == null) { throw new ApiException("Missing the required parameter 'productId' when calling updateProductListingDirect(Async)"); @@ -5386,13 +5542,14 @@ private okhttp3.Call updateProductListingDirectValidateBeforeCall(String product * @return ProductListing * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public ProductListing updateProductListingDirect(String productId, UpdateListingRequest updateListingRequest, Boolean hydrate) throws ApiException { + public ProductListing updateProductListingDirect(@javax.annotation.Nonnull String productId, @javax.annotation.Nonnull UpdateListingRequest updateListingRequest, @javax.annotation.Nullable Boolean hydrate) throws ApiException { ApiResponse localVarResp = updateProductListingDirectWithHttpInfo(productId, updateListingRequest, hydrate); return localVarResp.getData(); } @@ -5406,13 +5563,14 @@ public ProductListing updateProductListingDirect(String productId, UpdateListing * @return ApiResponse<ProductListing> * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse updateProductListingDirectWithHttpInfo(String productId, UpdateListingRequest updateListingRequest, Boolean hydrate) throws ApiException { + public ApiResponse updateProductListingDirectWithHttpInfo(@javax.annotation.Nonnull String productId, @javax.annotation.Nonnull UpdateListingRequest updateListingRequest, @javax.annotation.Nullable Boolean hydrate) throws ApiException { okhttp3.Call localVarCall = updateProductListingDirectValidateBeforeCall(productId, updateListingRequest, hydrate, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -5428,13 +5586,14 @@ public ApiResponse updateProductListingDirectWithHttpInfo(String * @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 single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateProductListingDirectAsync(String productId, UpdateListingRequest updateListingRequest, Boolean hydrate, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateProductListingDirectAsync(@javax.annotation.Nonnull String productId, @javax.annotation.Nonnull UpdateListingRequest updateListingRequest, @javax.annotation.Nullable Boolean hydrate, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateProductListingDirectValidateBeforeCall(productId, updateListingRequest, hydrate, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -5449,13 +5608,14 @@ public okhttp3.Call updateProductListingDirectAsync(String productId, UpdateList * @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 UserSubscription object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateTiliaTosCall(String userId, UpdateTiliaTOSRequest updateTiliaTOSRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateTiliaTosCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateTiliaTOSRequest updateTiliaTOSRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5502,7 +5662,7 @@ public okhttp3.Call updateTiliaTosCall(String userId, UpdateTiliaTOSRequest upda } @SuppressWarnings("rawtypes") - private okhttp3.Call updateTiliaTosValidateBeforeCall(String userId, UpdateTiliaTOSRequest updateTiliaTOSRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateTiliaTosValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateTiliaTOSRequest updateTiliaTOSRequest, 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 updateTiliaTos(Async)"); @@ -5520,13 +5680,14 @@ private okhttp3.Call updateTiliaTosValidateBeforeCall(String userId, UpdateTilia * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a UserSubscription object. -
401 Error response due to missing auth cookie. -
*/ - public Object updateTiliaTos(String userId, UpdateTiliaTOSRequest updateTiliaTOSRequest) throws ApiException { + public Object updateTiliaTos(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateTiliaTOSRequest updateTiliaTOSRequest) throws ApiException { ApiResponse localVarResp = updateTiliaTosWithHttpInfo(userId, updateTiliaTOSRequest); return localVarResp.getData(); } @@ -5539,13 +5700,14 @@ public Object updateTiliaTos(String userId, UpdateTiliaTOSRequest updateTiliaTOS * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a UserSubscription object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse updateTiliaTosWithHttpInfo(String userId, UpdateTiliaTOSRequest updateTiliaTOSRequest) throws ApiException { + public ApiResponse updateTiliaTosWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateTiliaTOSRequest updateTiliaTOSRequest) throws ApiException { okhttp3.Call localVarCall = updateTiliaTosValidateBeforeCall(userId, updateTiliaTOSRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -5560,13 +5722,14 @@ public ApiResponse updateTiliaTosWithHttpInfo(String userId, UpdateTilia * @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 UserSubscription object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateTiliaTosAsync(String userId, UpdateTiliaTOSRequest updateTiliaTOSRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateTiliaTosAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateTiliaTOSRequest updateTiliaTOSRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateTiliaTosValidateBeforeCall(userId, updateTiliaTOSRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/FavoritesApi.java b/src/main/java/io/github/vrchatapi/api/FavoritesApi.java index def68946..07d13950 100644 --- a/src/main/java/io/github/vrchatapi/api/FavoritesApi.java +++ b/src/main/java/io/github/vrchatapi/api/FavoritesApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -40,7 +40,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class FavoritesApi { private ApiClient localVarApiClient; @@ -86,14 +85,15 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 single Favorite object. -
400 Error response when trying favorite someone or something when already having it/them favorited. -
403 Error response when trying favorite someone whom you are not friends with. -
*/ - public okhttp3.Call addFavoriteCall(AddFavoriteRequest addFavoriteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addFavoriteCall(@javax.annotation.Nullable AddFavoriteRequest addFavoriteRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -139,7 +139,7 @@ public okhttp3.Call addFavoriteCall(AddFavoriteRequest addFavoriteRequest, final } @SuppressWarnings("rawtypes") - private okhttp3.Call addFavoriteValidateBeforeCall(AddFavoriteRequest addFavoriteRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call addFavoriteValidateBeforeCall(@javax.annotation.Nullable AddFavoriteRequest addFavoriteRequest, final ApiCallback _callback) throws ApiException { return addFavoriteCall(addFavoriteRequest, _callback); } @@ -151,14 +151,15 @@ private okhttp3.Call addFavoriteValidateBeforeCall(AddFavoriteRequest addFavorit * @return Favorite * @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 single Favorite object. -
400 Error response when trying favorite someone or something when already having it/them favorited. -
403 Error response when trying favorite someone whom you are not friends with. -
*/ - public Favorite addFavorite(AddFavoriteRequest addFavoriteRequest) throws ApiException { + public Favorite addFavorite(@javax.annotation.Nullable AddFavoriteRequest addFavoriteRequest) throws ApiException { ApiResponse localVarResp = addFavoriteWithHttpInfo(addFavoriteRequest); return localVarResp.getData(); } @@ -170,14 +171,15 @@ public Favorite addFavorite(AddFavoriteRequest addFavoriteRequest) throws ApiExc * @return ApiResponse<Favorite> * @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 single Favorite object. -
400 Error response when trying favorite someone or something when already having it/them favorited. -
403 Error response when trying favorite someone whom you are not friends with. -
*/ - public ApiResponse addFavoriteWithHttpInfo(AddFavoriteRequest addFavoriteRequest) throws ApiException { + public ApiResponse addFavoriteWithHttpInfo(@javax.annotation.Nullable AddFavoriteRequest addFavoriteRequest) throws ApiException { okhttp3.Call localVarCall = addFavoriteValidateBeforeCall(addFavoriteRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -191,14 +193,15 @@ public ApiResponse addFavoriteWithHttpInfo(AddFavoriteRequest addFavor * @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 single Favorite object. -
400 Error response when trying favorite someone or something when already having it/them favorited. -
403 Error response when trying favorite someone whom you are not friends with. -
*/ - public okhttp3.Call addFavoriteAsync(AddFavoriteRequest addFavoriteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addFavoriteAsync(@javax.annotation.Nullable AddFavoriteRequest addFavoriteRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addFavoriteValidateBeforeCall(addFavoriteRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -214,12 +217,13 @@ public okhttp3.Call addFavoriteAsync(AddFavoriteRequest addFavoriteRequest, fina * @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 Success response after clearing a favorite group. -
*/ - public okhttp3.Call clearFavoriteGroupCall(FavoriteType favoriteGroupType, String favoriteGroupName, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call clearFavoriteGroupCall(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -267,7 +271,7 @@ public okhttp3.Call clearFavoriteGroupCall(FavoriteType favoriteGroupType, Strin } @SuppressWarnings("rawtypes") - private okhttp3.Call clearFavoriteGroupValidateBeforeCall(FavoriteType favoriteGroupType, String favoriteGroupName, String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call clearFavoriteGroupValidateBeforeCall(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'favoriteGroupType' is set if (favoriteGroupType == null) { throw new ApiException("Missing the required parameter 'favoriteGroupType' when calling clearFavoriteGroup(Async)"); @@ -296,12 +300,13 @@ private okhttp3.Call clearFavoriteGroupValidateBeforeCall(FavoriteType favoriteG * @return Success * @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 Success response after clearing a favorite group. -
*/ - public Success clearFavoriteGroup(FavoriteType favoriteGroupType, String favoriteGroupName, String userId) throws ApiException { + public Success clearFavoriteGroup(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = clearFavoriteGroupWithHttpInfo(favoriteGroupType, favoriteGroupName, userId); return localVarResp.getData(); } @@ -315,12 +320,13 @@ public Success clearFavoriteGroup(FavoriteType favoriteGroupType, String favorit * @return ApiResponse<Success> * @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 Success response after clearing a favorite group. -
*/ - public ApiResponse clearFavoriteGroupWithHttpInfo(FavoriteType favoriteGroupType, String favoriteGroupName, String userId) throws ApiException { + public ApiResponse clearFavoriteGroupWithHttpInfo(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = clearFavoriteGroupValidateBeforeCall(favoriteGroupType, favoriteGroupName, userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -336,12 +342,13 @@ public ApiResponse clearFavoriteGroupWithHttpInfo(FavoriteType favorite * @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 Success response after clearing a favorite group. -
*/ - public okhttp3.Call clearFavoriteGroupAsync(FavoriteType favoriteGroupType, String favoriteGroupName, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call clearFavoriteGroupAsync(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = clearFavoriteGroupValidateBeforeCall(favoriteGroupType, favoriteGroupName, userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -357,12 +364,13 @@ public okhttp3.Call clearFavoriteGroupAsync(FavoriteType favoriteGroupType, Stri * @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 single FavoriteGroup object. -
*/ - public okhttp3.Call getFavoriteGroupCall(FavoriteType favoriteGroupType, String favoriteGroupName, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFavoriteGroupCall(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -410,7 +418,7 @@ public okhttp3.Call getFavoriteGroupCall(FavoriteType favoriteGroupType, String } @SuppressWarnings("rawtypes") - private okhttp3.Call getFavoriteGroupValidateBeforeCall(FavoriteType favoriteGroupType, String favoriteGroupName, String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFavoriteGroupValidateBeforeCall(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'favoriteGroupType' is set if (favoriteGroupType == null) { throw new ApiException("Missing the required parameter 'favoriteGroupType' when calling getFavoriteGroup(Async)"); @@ -439,12 +447,13 @@ private okhttp3.Call getFavoriteGroupValidateBeforeCall(FavoriteType favoriteGro * @return FavoriteGroup * @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 single FavoriteGroup object. -
*/ - public FavoriteGroup getFavoriteGroup(FavoriteType favoriteGroupType, String favoriteGroupName, String userId) throws ApiException { + public FavoriteGroup getFavoriteGroup(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getFavoriteGroupWithHttpInfo(favoriteGroupType, favoriteGroupName, userId); return localVarResp.getData(); } @@ -458,12 +467,13 @@ public FavoriteGroup getFavoriteGroup(FavoriteType favoriteGroupType, String fav * @return ApiResponse<FavoriteGroup> * @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 single FavoriteGroup object. -
*/ - public ApiResponse getFavoriteGroupWithHttpInfo(FavoriteType favoriteGroupType, String favoriteGroupName, String userId) throws ApiException { + public ApiResponse getFavoriteGroupWithHttpInfo(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getFavoriteGroupValidateBeforeCall(favoriteGroupType, favoriteGroupName, userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -479,12 +489,13 @@ public ApiResponse getFavoriteGroupWithHttpInfo(FavoriteType favo * @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 single FavoriteGroup object. -
*/ - public okhttp3.Call getFavoriteGroupAsync(FavoriteType favoriteGroupType, String favoriteGroupName, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFavoriteGroupAsync(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFavoriteGroupValidateBeforeCall(favoriteGroupType, favoriteGroupName, userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -496,18 +507,19 @@ public okhttp3.Call getFavoriteGroupAsync(FavoriteType favoriteGroupType, String * @param n The number of objects to return. (optional, default to 60) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param userId Target user to see information on, admin-only. (optional) - * @param ownerId The owner of whoms favorite groups to return. Must be a UserID. (optional) + * @param ownerId The owner whose favorite groups to return. Must be a 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 list of FavoriteGroup objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFavoriteGroupsCall(Integer n, Integer offset, String userId, String ownerId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFavoriteGroupsCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String ownerId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -568,7 +580,7 @@ public okhttp3.Call getFavoriteGroupsCall(Integer n, Integer offset, String user } @SuppressWarnings("rawtypes") - private okhttp3.Call getFavoriteGroupsValidateBeforeCall(Integer n, Integer offset, String userId, String ownerId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFavoriteGroupsValidateBeforeCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String ownerId, final ApiCallback _callback) throws ApiException { return getFavoriteGroupsCall(n, offset, userId, ownerId, _callback); } @@ -579,17 +591,18 @@ private okhttp3.Call getFavoriteGroupsValidateBeforeCall(Integer n, Integer offs * @param n The number of objects to return. (optional, default to 60) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param userId Target user to see information on, admin-only. (optional) - * @param ownerId The owner of whoms favorite groups to return. Must be a UserID. (optional) + * @param ownerId The owner whose favorite groups to return. Must be a UserID. (optional) * @return List<FavoriteGroup> * @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 list of FavoriteGroup objects. -
401 Error response due to missing auth cookie. -
*/ - public List getFavoriteGroups(Integer n, Integer offset, String userId, String ownerId) throws ApiException { + public List getFavoriteGroups(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String ownerId) throws ApiException { ApiResponse> localVarResp = getFavoriteGroupsWithHttpInfo(n, offset, userId, ownerId); return localVarResp.getData(); } @@ -600,17 +613,18 @@ public List getFavoriteGroups(Integer n, Integer offset, String u * @param n The number of objects to return. (optional, default to 60) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param userId Target user to see information on, admin-only. (optional) - * @param ownerId The owner of whoms favorite groups to return. Must be a UserID. (optional) + * @param ownerId The owner whose favorite groups to return. Must be a UserID. (optional) * @return ApiResponse<List<FavoriteGroup>> * @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 list of FavoriteGroup objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getFavoriteGroupsWithHttpInfo(Integer n, Integer offset, String userId, String ownerId) throws ApiException { + public ApiResponse> getFavoriteGroupsWithHttpInfo(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String ownerId) throws ApiException { okhttp3.Call localVarCall = getFavoriteGroupsValidateBeforeCall(n, offset, userId, ownerId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -622,18 +636,19 @@ public ApiResponse> getFavoriteGroupsWithHttpInfo(Integer n, * @param n The number of objects to return. (optional, default to 60) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param userId Target user to see information on, admin-only. (optional) - * @param ownerId The owner of whoms favorite groups to return. Must be a UserID. (optional) + * @param ownerId The owner whose favorite groups to return. Must be a 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 list of FavoriteGroup objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFavoriteGroupsAsync(Integer n, Integer offset, String userId, String ownerId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getFavoriteGroupsAsync(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String userId, @javax.annotation.Nullable String ownerId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getFavoriteGroupsValidateBeforeCall(n, offset, userId, ownerId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -646,7 +661,8 @@ public okhttp3.Call getFavoriteGroupsAsync(Integer n, Integer offset, String use * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -708,7 +724,8 @@ private okhttp3.Call getFavoriteLimitsValidateBeforeCall(final ApiCallback _call * @return FavoriteLimits * @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 single FavoriteLimits object. -
401 Error response due to missing auth cookie. -
+
+ @@ -725,7 +742,8 @@ public FavoriteLimits getFavoriteLimits() throws ApiException { * @return ApiResponse<FavoriteLimits> * @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 single FavoriteLimits object. -
401 Error response due to missing auth cookie. -
+
+ @@ -744,7 +762,8 @@ public ApiResponse getFavoriteLimitsWithHttpInfo() throws ApiExc * @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 single FavoriteLimits object. -
401 Error response due to missing auth cookie. -
+
+ @@ -767,13 +786,14 @@ public okhttp3.Call getFavoriteLimitsAsync(final ApiCallback _ca * @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 single FavoriteLimits object. -
401 Error response due to missing auth cookie. -
+
+
Response Details
Status Code Description Response Headers
200 Returns a list of Favorite objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFavoritesCall(Integer n, Integer offset, String type, String tag, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFavoritesCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String type, @javax.annotation.Nullable String tag, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -834,7 +854,7 @@ public okhttp3.Call getFavoritesCall(Integer n, Integer offset, String type, Str } @SuppressWarnings("rawtypes") - private okhttp3.Call getFavoritesValidateBeforeCall(Integer n, Integer offset, String type, String tag, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFavoritesValidateBeforeCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String type, @javax.annotation.Nullable String tag, final ApiCallback _callback) throws ApiException { return getFavoritesCall(n, offset, type, tag, _callback); } @@ -849,13 +869,14 @@ private okhttp3.Call getFavoritesValidateBeforeCall(Integer n, Integer offset, S * @return List<Favorite> * @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 list of Favorite objects. -
401 Error response due to missing auth cookie. -
*/ - public List getFavorites(Integer n, Integer offset, String type, String tag) throws ApiException { + public List getFavorites(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String type, @javax.annotation.Nullable String tag) throws ApiException { ApiResponse> localVarResp = getFavoritesWithHttpInfo(n, offset, type, tag); return localVarResp.getData(); } @@ -870,13 +891,14 @@ public List getFavorites(Integer n, Integer offset, String type, Strin * @return ApiResponse<List<Favorite>> * @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 list of Favorite objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getFavoritesWithHttpInfo(Integer n, Integer offset, String type, String tag) throws ApiException { + public ApiResponse> getFavoritesWithHttpInfo(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String type, @javax.annotation.Nullable String tag) throws ApiException { okhttp3.Call localVarCall = getFavoritesValidateBeforeCall(n, offset, type, tag, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -893,13 +915,14 @@ public ApiResponse> getFavoritesWithHttpInfo(Integer n, Integer o * @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 list of Favorite objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFavoritesAsync(Integer n, Integer offset, String type, String tag, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getFavoritesAsync(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String type, @javax.annotation.Nullable String tag, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getFavoritesValidateBeforeCall(n, offset, type, tag, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -913,14 +936,15 @@ public okhttp3.Call getFavoritesAsync(Integer n, Integer offset, String type, St * @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 Success response after removing a favorite. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent favorite. -
*/ - public okhttp3.Call removeFavoriteCall(String favoriteId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call removeFavoriteCall(@javax.annotation.Nonnull String favoriteId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -966,7 +990,7 @@ public okhttp3.Call removeFavoriteCall(String favoriteId, final ApiCallback _cal } @SuppressWarnings("rawtypes") - private okhttp3.Call removeFavoriteValidateBeforeCall(String favoriteId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call removeFavoriteValidateBeforeCall(@javax.annotation.Nonnull String favoriteId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'favoriteId' is set if (favoriteId == null) { throw new ApiException("Missing the required parameter 'favoriteId' when calling removeFavorite(Async)"); @@ -983,14 +1007,15 @@ private okhttp3.Call removeFavoriteValidateBeforeCall(String favoriteId, final A * @return Success * @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 Success response after removing a favorite. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent favorite. -
*/ - public Success removeFavorite(String favoriteId) throws ApiException { + public Success removeFavorite(@javax.annotation.Nonnull String favoriteId) throws ApiException { ApiResponse localVarResp = removeFavoriteWithHttpInfo(favoriteId); return localVarResp.getData(); } @@ -1002,14 +1027,15 @@ public Success removeFavorite(String favoriteId) throws ApiException { * @return ApiResponse<Success> * @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 Success response after removing a favorite. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent favorite. -
*/ - public ApiResponse removeFavoriteWithHttpInfo(String favoriteId) throws ApiException { + public ApiResponse removeFavoriteWithHttpInfo(@javax.annotation.Nonnull String favoriteId) throws ApiException { okhttp3.Call localVarCall = removeFavoriteValidateBeforeCall(favoriteId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1023,14 +1049,15 @@ public ApiResponse removeFavoriteWithHttpInfo(String favoriteId) throws * @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 Success response after removing a favorite. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent favorite. -
*/ - public okhttp3.Call removeFavoriteAsync(String favoriteId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call removeFavoriteAsync(@javax.annotation.Nonnull String favoriteId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeFavoriteValidateBeforeCall(favoriteId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1047,12 +1074,13 @@ public okhttp3.Call removeFavoriteAsync(String favoriteId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 OK -
*/ - public okhttp3.Call updateFavoriteGroupCall(FavoriteType favoriteGroupType, String favoriteGroupName, String userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateFavoriteGroupCall(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateFavoriteGroupRequest updateFavoriteGroupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1100,7 +1128,7 @@ public okhttp3.Call updateFavoriteGroupCall(FavoriteType favoriteGroupType, Stri } @SuppressWarnings("rawtypes") - private okhttp3.Call updateFavoriteGroupValidateBeforeCall(FavoriteType favoriteGroupType, String favoriteGroupName, String userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateFavoriteGroupValidateBeforeCall(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateFavoriteGroupRequest updateFavoriteGroupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'favoriteGroupType' is set if (favoriteGroupType == null) { throw new ApiException("Missing the required parameter 'favoriteGroupType' when calling updateFavoriteGroup(Async)"); @@ -1129,12 +1157,13 @@ private okhttp3.Call updateFavoriteGroupValidateBeforeCall(FavoriteType favorite * @param updateFavoriteGroupRequest (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
*/ - public void updateFavoriteGroup(FavoriteType favoriteGroupType, String favoriteGroupName, String userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest) throws ApiException { + public void updateFavoriteGroup(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateFavoriteGroupRequest updateFavoriteGroupRequest) throws ApiException { updateFavoriteGroupWithHttpInfo(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest); } @@ -1148,12 +1177,13 @@ public void updateFavoriteGroup(FavoriteType favoriteGroupType, String favoriteG * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
*/ - public ApiResponse updateFavoriteGroupWithHttpInfo(FavoriteType favoriteGroupType, String favoriteGroupName, String userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest) throws ApiException { + public ApiResponse updateFavoriteGroupWithHttpInfo(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateFavoriteGroupRequest updateFavoriteGroupRequest) throws ApiException { okhttp3.Call localVarCall = updateFavoriteGroupValidateBeforeCall(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest, null); return localVarApiClient.execute(localVarCall); } @@ -1169,12 +1199,13 @@ public ApiResponse updateFavoriteGroupWithHttpInfo(FavoriteType favoriteGr * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
*/ - public okhttp3.Call updateFavoriteGroupAsync(FavoriteType favoriteGroupType, String favoriteGroupName, String userId, UpdateFavoriteGroupRequest updateFavoriteGroupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateFavoriteGroupAsync(@javax.annotation.Nonnull FavoriteType favoriteGroupType, @javax.annotation.Nonnull String favoriteGroupName, @javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateFavoriteGroupRequest updateFavoriteGroupRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateFavoriteGroupValidateBeforeCall(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); diff --git a/src/main/java/io/github/vrchatapi/api/FilesApi.java b/src/main/java/io/github/vrchatapi/api/FilesApi.java index 8ebcb51b..b84e053c 100644 --- a/src/main/java/io/github/vrchatapi/api/FilesApi.java +++ b/src/main/java/io/github/vrchatapi/api/FilesApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -53,7 +53,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class FilesApi { private ApiClient localVarApiClient; @@ -99,12 +98,13 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 single File object. -
*/ - public okhttp3.Call createFileCall(CreateFileRequest createFileRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createFileCall(@javax.annotation.Nullable CreateFileRequest createFileRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -150,7 +150,7 @@ public okhttp3.Call createFileCall(CreateFileRequest createFileRequest, final Ap } @SuppressWarnings("rawtypes") - private okhttp3.Call createFileValidateBeforeCall(CreateFileRequest createFileRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createFileValidateBeforeCall(@javax.annotation.Nullable CreateFileRequest createFileRequest, final ApiCallback _callback) throws ApiException { return createFileCall(createFileRequest, _callback); } @@ -162,12 +162,13 @@ private okhttp3.Call createFileValidateBeforeCall(CreateFileRequest createFileRe * @return ModelFile * @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 single File object. -
*/ - public ModelFile createFile(CreateFileRequest createFileRequest) throws ApiException { + public ModelFile createFile(@javax.annotation.Nullable CreateFileRequest createFileRequest) throws ApiException { ApiResponse localVarResp = createFileWithHttpInfo(createFileRequest); return localVarResp.getData(); } @@ -179,12 +180,13 @@ public ModelFile createFile(CreateFileRequest createFileRequest) throws ApiExcep * @return ApiResponse<ModelFile> * @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 single File object. -
*/ - public ApiResponse createFileWithHttpInfo(CreateFileRequest createFileRequest) throws ApiException { + public ApiResponse createFileWithHttpInfo(@javax.annotation.Nullable CreateFileRequest createFileRequest) throws ApiException { okhttp3.Call localVarCall = createFileValidateBeforeCall(createFileRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -198,12 +200,13 @@ public ApiResponse createFileWithHttpInfo(CreateFileRequest createFil * @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 single File object. -
*/ - public okhttp3.Call createFileAsync(CreateFileRequest createFileRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createFileAsync(@javax.annotation.Nullable CreateFileRequest createFileRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createFileValidateBeforeCall(createFileRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -218,12 +221,13 @@ public okhttp3.Call createFileAsync(CreateFileRequest createFileRequest, final A * @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 single File object. -
*/ - public okhttp3.Call createFileVersionCall(String fileId, CreateFileVersionRequest createFileVersionRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createFileVersionCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nullable CreateFileVersionRequest createFileVersionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -270,7 +274,7 @@ public okhttp3.Call createFileVersionCall(String fileId, CreateFileVersionReques } @SuppressWarnings("rawtypes") - private okhttp3.Call createFileVersionValidateBeforeCall(String fileId, CreateFileVersionRequest createFileVersionRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createFileVersionValidateBeforeCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nullable CreateFileVersionRequest createFileVersionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException("Missing the required parameter 'fileId' when calling createFileVersion(Async)"); @@ -288,12 +292,13 @@ private okhttp3.Call createFileVersionValidateBeforeCall(String fileId, CreateFi * @return ModelFile * @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 single File object. -
*/ - public ModelFile createFileVersion(String fileId, CreateFileVersionRequest createFileVersionRequest) throws ApiException { + public ModelFile createFileVersion(@javax.annotation.Nonnull String fileId, @javax.annotation.Nullable CreateFileVersionRequest createFileVersionRequest) throws ApiException { ApiResponse localVarResp = createFileVersionWithHttpInfo(fileId, createFileVersionRequest); return localVarResp.getData(); } @@ -306,12 +311,13 @@ public ModelFile createFileVersion(String fileId, CreateFileVersionRequest creat * @return ApiResponse<ModelFile> * @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 single File object. -
*/ - public ApiResponse createFileVersionWithHttpInfo(String fileId, CreateFileVersionRequest createFileVersionRequest) throws ApiException { + public ApiResponse createFileVersionWithHttpInfo(@javax.annotation.Nonnull String fileId, @javax.annotation.Nullable CreateFileVersionRequest createFileVersionRequest) throws ApiException { okhttp3.Call localVarCall = createFileVersionValidateBeforeCall(fileId, createFileVersionRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -326,12 +332,13 @@ public ApiResponse createFileVersionWithHttpInfo(String fileId, Creat * @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 single File object. -
*/ - public okhttp3.Call createFileVersionAsync(String fileId, CreateFileVersionRequest createFileVersionRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createFileVersionAsync(@javax.annotation.Nonnull String fileId, @javax.annotation.Nullable CreateFileVersionRequest createFileVersionRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createFileVersionValidateBeforeCall(fileId, createFileVersionRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -345,13 +352,14 @@ public okhttp3.Call createFileVersionAsync(String fileId, CreateFileVersionReque * @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 single File object. -
404 Error response when trying to delete a non-existent file. -
*/ - public okhttp3.Call deleteFileCall(String fileId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteFileCall(@javax.annotation.Nonnull String fileId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -397,7 +405,7 @@ public okhttp3.Call deleteFileCall(String fileId, final ApiCallback _callback) t } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteFileValidateBeforeCall(String fileId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteFileValidateBeforeCall(@javax.annotation.Nonnull String fileId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException("Missing the required parameter 'fileId' when calling deleteFile(Async)"); @@ -414,13 +422,14 @@ private okhttp3.Call deleteFileValidateBeforeCall(String fileId, final ApiCallba * @return ModelFile * @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 single File object. -
404 Error response when trying to delete a non-existent file. -
*/ - public ModelFile deleteFile(String fileId) throws ApiException { + public ModelFile deleteFile(@javax.annotation.Nonnull String fileId) throws ApiException { ApiResponse localVarResp = deleteFileWithHttpInfo(fileId); return localVarResp.getData(); } @@ -432,13 +441,14 @@ public ModelFile deleteFile(String fileId) throws ApiException { * @return ApiResponse<ModelFile> * @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 single File object. -
404 Error response when trying to delete a non-existent file. -
*/ - public ApiResponse deleteFileWithHttpInfo(String fileId) throws ApiException { + public ApiResponse deleteFileWithHttpInfo(@javax.annotation.Nonnull String fileId) throws ApiException { okhttp3.Call localVarCall = deleteFileValidateBeforeCall(fileId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -452,13 +462,14 @@ public ApiResponse deleteFileWithHttpInfo(String fileId) throws ApiEx * @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 single File object. -
404 Error response when trying to delete a non-existent file. -
*/ - public okhttp3.Call deleteFileAsync(String fileId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteFileAsync(@javax.annotation.Nonnull String fileId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteFileValidateBeforeCall(fileId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -473,14 +484,15 @@ public okhttp3.Call deleteFileAsync(String fileId, final ApiCallback * @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 single File object. -
400 Error response when trying to delete the initial version of a file. Delete the main File object instead. -
500 Error response when trying to delete any version of a file that is not the last one. -
*/ - public okhttp3.Call deleteFileVersionCall(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteFileVersionCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -527,7 +539,7 @@ public okhttp3.Call deleteFileVersionCall(String fileId, Integer versionId, fina } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteFileVersionValidateBeforeCall(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteFileVersionValidateBeforeCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException("Missing the required parameter 'fileId' when calling deleteFileVersion(Async)"); @@ -550,14 +562,15 @@ private okhttp3.Call deleteFileVersionValidateBeforeCall(String fileId, Integer * @return ModelFile * @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 single File object. -
400 Error response when trying to delete the initial version of a file. Delete the main File object instead. -
500 Error response when trying to delete any version of a file that is not the last one. -
*/ - public ModelFile deleteFileVersion(String fileId, Integer versionId) throws ApiException { + public ModelFile deleteFileVersion(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { ApiResponse localVarResp = deleteFileVersionWithHttpInfo(fileId, versionId); return localVarResp.getData(); } @@ -570,14 +583,15 @@ public ModelFile deleteFileVersion(String fileId, Integer versionId) throws ApiE * @return ApiResponse<ModelFile> * @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 single File object. -
400 Error response when trying to delete the initial version of a file. Delete the main File object instead. -
500 Error response when trying to delete any version of a file that is not the last one. -
*/ - public ApiResponse deleteFileVersionWithHttpInfo(String fileId, Integer versionId) throws ApiException { + public ApiResponse deleteFileVersionWithHttpInfo(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { okhttp3.Call localVarCall = deleteFileVersionValidateBeforeCall(fileId, versionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -592,14 +606,15 @@ public ApiResponse deleteFileVersionWithHttpInfo(String fileId, Integ * @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 single File object. -
400 Error response when trying to delete the initial version of a file. Delete the main File object instead. -
500 Error response when trying to delete any version of a file that is not the last one. -
*/ - public okhttp3.Call deleteFileVersionAsync(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteFileVersionAsync(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteFileVersionValidateBeforeCall(fileId, versionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -614,13 +629,14 @@ public okhttp3.Call deleteFileVersionAsync(String fileId, Integer versionId, fin * @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 Raw file -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call downloadFileVersionCall(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadFileVersionCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -668,7 +684,7 @@ public okhttp3.Call downloadFileVersionCall(String fileId, Integer versionId, fi } @SuppressWarnings("rawtypes") - private okhttp3.Call downloadFileVersionValidateBeforeCall(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadFileVersionValidateBeforeCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException("Missing the required parameter 'fileId' when calling downloadFileVersion(Async)"); @@ -685,38 +701,40 @@ private okhttp3.Call downloadFileVersionValidateBeforeCall(String fileId, Intege /** * Download File Version - * Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when neccesary. + * Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when necessary. * @param fileId Must be a valid file ID. (required) * @param versionId Version ID of the asset. (required) * @return File * @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 Raw file -
404 Error response when trying to show information about a non-existent file. -
*/ - public File downloadFileVersion(String fileId, Integer versionId) throws ApiException { + public File downloadFileVersion(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { ApiResponse localVarResp = downloadFileVersionWithHttpInfo(fileId, versionId); return localVarResp.getData(); } /** * Download File Version - * Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when neccesary. + * Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when necessary. * @param fileId Must be a valid file ID. (required) * @param versionId Version ID of the asset. (required) * @return ApiResponse<File> * @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 Raw file -
404 Error response when trying to show information about a non-existent file. -
*/ - public ApiResponse downloadFileVersionWithHttpInfo(String fileId, Integer versionId) throws ApiException { + public ApiResponse downloadFileVersionWithHttpInfo(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { okhttp3.Call localVarCall = downloadFileVersionValidateBeforeCall(fileId, versionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -724,20 +742,21 @@ public ApiResponse downloadFileVersionWithHttpInfo(String fileId, Integer /** * Download File Version (asynchronously) - * Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when neccesary. + * Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when necessary. * @param fileId Must be a valid file ID. (required) * @param versionId Version ID of the asset. (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 Raw file -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call downloadFileVersionAsync(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadFileVersionAsync(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = downloadFileVersionValidateBeforeCall(fileId, versionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -754,12 +773,13 @@ public okhttp3.Call downloadFileVersionAsync(String fileId, Integer versionId, f * @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 single File object. -
*/ - public okhttp3.Call finishFileDataUploadCall(String fileId, Integer versionId, String fileType, FinishFileDataUploadRequest finishFileDataUploadRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call finishFileDataUploadCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, @javax.annotation.Nullable FinishFileDataUploadRequest finishFileDataUploadRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -808,7 +828,7 @@ public okhttp3.Call finishFileDataUploadCall(String fileId, Integer versionId, S } @SuppressWarnings("rawtypes") - private okhttp3.Call finishFileDataUploadValidateBeforeCall(String fileId, Integer versionId, String fileType, FinishFileDataUploadRequest finishFileDataUploadRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call finishFileDataUploadValidateBeforeCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, @javax.annotation.Nullable FinishFileDataUploadRequest finishFileDataUploadRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException("Missing the required parameter 'fileId' when calling finishFileDataUpload(Async)"); @@ -838,12 +858,13 @@ private okhttp3.Call finishFileDataUploadValidateBeforeCall(String fileId, Integ * @return ModelFile * @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 single File object. -
*/ - public ModelFile finishFileDataUpload(String fileId, Integer versionId, String fileType, FinishFileDataUploadRequest finishFileDataUploadRequest) throws ApiException { + public ModelFile finishFileDataUpload(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, @javax.annotation.Nullable FinishFileDataUploadRequest finishFileDataUploadRequest) throws ApiException { ApiResponse localVarResp = finishFileDataUploadWithHttpInfo(fileId, versionId, fileType, finishFileDataUploadRequest); return localVarResp.getData(); } @@ -858,12 +879,13 @@ public ModelFile finishFileDataUpload(String fileId, Integer versionId, String f * @return ApiResponse<ModelFile> * @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 single File object. -
*/ - public ApiResponse finishFileDataUploadWithHttpInfo(String fileId, Integer versionId, String fileType, FinishFileDataUploadRequest finishFileDataUploadRequest) throws ApiException { + public ApiResponse finishFileDataUploadWithHttpInfo(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, @javax.annotation.Nullable FinishFileDataUploadRequest finishFileDataUploadRequest) throws ApiException { okhttp3.Call localVarCall = finishFileDataUploadValidateBeforeCall(fileId, versionId, fileType, finishFileDataUploadRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -880,12 +902,13 @@ public ApiResponse finishFileDataUploadWithHttpInfo(String fileId, In * @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 single File object. -
*/ - public okhttp3.Call finishFileDataUploadAsync(String fileId, Integer versionId, String fileType, FinishFileDataUploadRequest finishFileDataUploadRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call finishFileDataUploadAsync(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, @javax.annotation.Nullable FinishFileDataUploadRequest finishFileDataUploadRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = finishFileDataUploadValidateBeforeCall(fileId, versionId, fileType, finishFileDataUploadRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -899,12 +922,13 @@ public okhttp3.Call finishFileDataUploadAsync(String fileId, Integer versionId, * @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 single AdminAssetBundle object. -
*/ - public okhttp3.Call getAdminAssetBundleCall(String adminAssetBundleId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAdminAssetBundleCall(@javax.annotation.Nonnull String adminAssetBundleId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -950,7 +974,7 @@ public okhttp3.Call getAdminAssetBundleCall(String adminAssetBundleId, final Api } @SuppressWarnings("rawtypes") - private okhttp3.Call getAdminAssetBundleValidateBeforeCall(String adminAssetBundleId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAdminAssetBundleValidateBeforeCall(@javax.annotation.Nonnull String adminAssetBundleId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'adminAssetBundleId' is set if (adminAssetBundleId == null) { throw new ApiException("Missing the required parameter 'adminAssetBundleId' when calling getAdminAssetBundle(Async)"); @@ -967,12 +991,13 @@ private okhttp3.Call getAdminAssetBundleValidateBeforeCall(String adminAssetBund * @return AdminAssetBundle * @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 single AdminAssetBundle object. -
*/ - public AdminAssetBundle getAdminAssetBundle(String adminAssetBundleId) throws ApiException { + public AdminAssetBundle getAdminAssetBundle(@javax.annotation.Nonnull String adminAssetBundleId) throws ApiException { ApiResponse localVarResp = getAdminAssetBundleWithHttpInfo(adminAssetBundleId); return localVarResp.getData(); } @@ -984,12 +1009,13 @@ public AdminAssetBundle getAdminAssetBundle(String adminAssetBundleId) throws Ap * @return ApiResponse<AdminAssetBundle> * @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 single AdminAssetBundle object. -
*/ - public ApiResponse getAdminAssetBundleWithHttpInfo(String adminAssetBundleId) throws ApiException { + public ApiResponse getAdminAssetBundleWithHttpInfo(@javax.annotation.Nonnull String adminAssetBundleId) throws ApiException { okhttp3.Call localVarCall = getAdminAssetBundleValidateBeforeCall(adminAssetBundleId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1003,12 +1029,13 @@ public ApiResponse getAdminAssetBundleWithHttpInfo(String admi * @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 single AdminAssetBundle object. -
*/ - public okhttp3.Call getAdminAssetBundleAsync(String adminAssetBundleId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAdminAssetBundleAsync(@javax.annotation.Nonnull String adminAssetBundleId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAdminAssetBundleValidateBeforeCall(adminAssetBundleId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1024,13 +1051,14 @@ public okhttp3.Call getAdminAssetBundleAsync(String adminAssetBundleId, final Ap * @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 single AgreementStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getContentAgreementStatusCall(AgreementCode agreementCode, String contentId, Integer version, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getContentAgreementStatusCall(@javax.annotation.Nonnull AgreementCode agreementCode, @javax.annotation.Nonnull String contentId, @javax.annotation.Nonnull Integer version, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1087,7 +1115,7 @@ public okhttp3.Call getContentAgreementStatusCall(AgreementCode agreementCode, S } @SuppressWarnings("rawtypes") - private okhttp3.Call getContentAgreementStatusValidateBeforeCall(AgreementCode agreementCode, String contentId, Integer version, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getContentAgreementStatusValidateBeforeCall(@javax.annotation.Nonnull AgreementCode agreementCode, @javax.annotation.Nonnull String contentId, @javax.annotation.Nonnull Integer version, final ApiCallback _callback) throws ApiException { // verify the required parameter 'agreementCode' is set if (agreementCode == null) { throw new ApiException("Missing the required parameter 'agreementCode' when calling getContentAgreementStatus(Async)"); @@ -1116,13 +1144,14 @@ private okhttp3.Call getContentAgreementStatusValidateBeforeCall(AgreementCode a * @return AgreementStatus * @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 single AgreementStatus object. -
401 Error response due to missing auth cookie. -
*/ - public AgreementStatus getContentAgreementStatus(AgreementCode agreementCode, String contentId, Integer version) throws ApiException { + public AgreementStatus getContentAgreementStatus(@javax.annotation.Nonnull AgreementCode agreementCode, @javax.annotation.Nonnull String contentId, @javax.annotation.Nonnull Integer version) throws ApiException { ApiResponse localVarResp = getContentAgreementStatusWithHttpInfo(agreementCode, contentId, version); return localVarResp.getData(); } @@ -1136,13 +1165,14 @@ public AgreementStatus getContentAgreementStatus(AgreementCode agreementCode, St * @return ApiResponse<AgreementStatus> * @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 single AgreementStatus object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getContentAgreementStatusWithHttpInfo(AgreementCode agreementCode, String contentId, Integer version) throws ApiException { + public ApiResponse getContentAgreementStatusWithHttpInfo(@javax.annotation.Nonnull AgreementCode agreementCode, @javax.annotation.Nonnull String contentId, @javax.annotation.Nonnull Integer version) throws ApiException { okhttp3.Call localVarCall = getContentAgreementStatusValidateBeforeCall(agreementCode, contentId, version, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1158,13 +1188,14 @@ public ApiResponse getContentAgreementStatusWithHttpInfo(Agreem * @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 single AgreementStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getContentAgreementStatusAsync(AgreementCode agreementCode, String contentId, Integer version, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getContentAgreementStatusAsync(@javax.annotation.Nonnull AgreementCode agreementCode, @javax.annotation.Nonnull String contentId, @javax.annotation.Nonnull Integer version, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getContentAgreementStatusValidateBeforeCall(agreementCode, contentId, version, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1178,13 +1209,14 @@ public okhttp3.Call getContentAgreementStatusAsync(AgreementCode agreementCode, * @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 single File object. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call getFileCall(String fileId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFileCall(@javax.annotation.Nonnull String fileId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1230,7 +1262,7 @@ public okhttp3.Call getFileCall(String fileId, final ApiCallback _callback) thro } @SuppressWarnings("rawtypes") - private okhttp3.Call getFileValidateBeforeCall(String fileId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFileValidateBeforeCall(@javax.annotation.Nonnull String fileId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException("Missing the required parameter 'fileId' when calling getFile(Async)"); @@ -1247,13 +1279,14 @@ private okhttp3.Call getFileValidateBeforeCall(String fileId, final ApiCallback * @return ModelFile * @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 single File object. -
404 Error response when trying to show information about a non-existent file. -
*/ - public ModelFile getFile(String fileId) throws ApiException { + public ModelFile getFile(@javax.annotation.Nonnull String fileId) throws ApiException { ApiResponse localVarResp = getFileWithHttpInfo(fileId); return localVarResp.getData(); } @@ -1265,13 +1298,14 @@ public ModelFile getFile(String fileId) throws ApiException { * @return ApiResponse<ModelFile> * @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 single File object. -
404 Error response when trying to show information about a non-existent file. -
*/ - public ApiResponse getFileWithHttpInfo(String fileId) throws ApiException { + public ApiResponse getFileWithHttpInfo(@javax.annotation.Nonnull String fileId) throws ApiException { okhttp3.Call localVarCall = getFileValidateBeforeCall(fileId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1285,13 +1319,14 @@ public ApiResponse getFileWithHttpInfo(String fileId) throws ApiExcep * @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 single File object. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call getFileAsync(String fileId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFileAsync(@javax.annotation.Nonnull String fileId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFileValidateBeforeCall(fileId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1306,14 +1341,15 @@ public okhttp3.Call getFileAsync(String fileId, final ApiCallback _ca * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call getFileAnalysisCall(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFileAnalysisCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1360,7 +1396,7 @@ public okhttp3.Call getFileAnalysisCall(String fileId, Integer versionId, final } @SuppressWarnings("rawtypes") - private okhttp3.Call getFileAnalysisValidateBeforeCall(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFileAnalysisValidateBeforeCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException("Missing the required parameter 'fileId' when calling getFileAnalysis(Async)"); @@ -1383,14 +1419,15 @@ private okhttp3.Call getFileAnalysisValidateBeforeCall(String fileId, Integer ve * @return FileAnalysis * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public FileAnalysis getFileAnalysis(String fileId, Integer versionId) throws ApiException { + public FileAnalysis getFileAnalysis(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { ApiResponse localVarResp = getFileAnalysisWithHttpInfo(fileId, versionId); return localVarResp.getData(); } @@ -1403,14 +1440,15 @@ public FileAnalysis getFileAnalysis(String fileId, Integer versionId) throws Api * @return ApiResponse<FileAnalysis> * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public ApiResponse getFileAnalysisWithHttpInfo(String fileId, Integer versionId) throws ApiException { + public ApiResponse getFileAnalysisWithHttpInfo(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { okhttp3.Call localVarCall = getFileAnalysisValidateBeforeCall(fileId, versionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1425,14 +1463,15 @@ public ApiResponse getFileAnalysisWithHttpInfo(String fileId, Inte * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call getFileAnalysisAsync(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFileAnalysisAsync(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFileAnalysisValidateBeforeCall(fileId, versionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1447,14 +1486,15 @@ public okhttp3.Call getFileAnalysisAsync(String fileId, Integer versionId, final * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call getFileAnalysisSecurityCall(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFileAnalysisSecurityCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1501,7 +1541,7 @@ public okhttp3.Call getFileAnalysisSecurityCall(String fileId, Integer versionId } @SuppressWarnings("rawtypes") - private okhttp3.Call getFileAnalysisSecurityValidateBeforeCall(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFileAnalysisSecurityValidateBeforeCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException("Missing the required parameter 'fileId' when calling getFileAnalysisSecurity(Async)"); @@ -1524,14 +1564,15 @@ private okhttp3.Call getFileAnalysisSecurityValidateBeforeCall(String fileId, In * @return FileAnalysis * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public FileAnalysis getFileAnalysisSecurity(String fileId, Integer versionId) throws ApiException { + public FileAnalysis getFileAnalysisSecurity(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { ApiResponse localVarResp = getFileAnalysisSecurityWithHttpInfo(fileId, versionId); return localVarResp.getData(); } @@ -1544,14 +1585,15 @@ public FileAnalysis getFileAnalysisSecurity(String fileId, Integer versionId) th * @return ApiResponse<FileAnalysis> * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public ApiResponse getFileAnalysisSecurityWithHttpInfo(String fileId, Integer versionId) throws ApiException { + public ApiResponse getFileAnalysisSecurityWithHttpInfo(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { okhttp3.Call localVarCall = getFileAnalysisSecurityValidateBeforeCall(fileId, versionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1566,14 +1608,15 @@ public ApiResponse getFileAnalysisSecurityWithHttpInfo(String file * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call getFileAnalysisSecurityAsync(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFileAnalysisSecurityAsync(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFileAnalysisSecurityValidateBeforeCall(fileId, versionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1588,14 +1631,15 @@ public okhttp3.Call getFileAnalysisSecurityAsync(String fileId, Integer versionI * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call getFileAnalysisStandardCall(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFileAnalysisStandardCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1642,7 +1686,7 @@ public okhttp3.Call getFileAnalysisStandardCall(String fileId, Integer versionId } @SuppressWarnings("rawtypes") - private okhttp3.Call getFileAnalysisStandardValidateBeforeCall(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFileAnalysisStandardValidateBeforeCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException("Missing the required parameter 'fileId' when calling getFileAnalysisStandard(Async)"); @@ -1665,14 +1709,15 @@ private okhttp3.Call getFileAnalysisStandardValidateBeforeCall(String fileId, In * @return FileAnalysis * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public FileAnalysis getFileAnalysisStandard(String fileId, Integer versionId) throws ApiException { + public FileAnalysis getFileAnalysisStandard(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { ApiResponse localVarResp = getFileAnalysisStandardWithHttpInfo(fileId, versionId); return localVarResp.getData(); } @@ -1685,14 +1730,15 @@ public FileAnalysis getFileAnalysisStandard(String fileId, Integer versionId) th * @return ApiResponse<FileAnalysis> * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public ApiResponse getFileAnalysisStandardWithHttpInfo(String fileId, Integer versionId) throws ApiException { + public ApiResponse getFileAnalysisStandardWithHttpInfo(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { okhttp3.Call localVarCall = getFileAnalysisStandardValidateBeforeCall(fileId, versionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1707,14 +1753,15 @@ public ApiResponse getFileAnalysisStandardWithHttpInfo(String file * @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 single FileAnalysis object. -
202 Error response when requesting file Analysis that is not yet available. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call getFileAnalysisStandardAsync(String fileId, Integer versionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFileAnalysisStandardAsync(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFileAnalysisStandardValidateBeforeCall(fileId, versionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1730,12 +1777,13 @@ public okhttp3.Call getFileAnalysisStandardAsync(String fileId, Integer versionI * @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 Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. -
*/ - public okhttp3.Call getFileDataUploadStatusCall(String fileId, Integer versionId, String fileType, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFileDataUploadStatusCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1783,7 +1831,7 @@ public okhttp3.Call getFileDataUploadStatusCall(String fileId, Integer versionId } @SuppressWarnings("rawtypes") - private okhttp3.Call getFileDataUploadStatusValidateBeforeCall(String fileId, Integer versionId, String fileType, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFileDataUploadStatusValidateBeforeCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException("Missing the required parameter 'fileId' when calling getFileDataUploadStatus(Async)"); @@ -1812,12 +1860,13 @@ private okhttp3.Call getFileDataUploadStatusValidateBeforeCall(String fileId, In * @return FileVersionUploadStatus * @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 Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. -
*/ - public FileVersionUploadStatus getFileDataUploadStatus(String fileId, Integer versionId, String fileType) throws ApiException { + public FileVersionUploadStatus getFileDataUploadStatus(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType) throws ApiException { ApiResponse localVarResp = getFileDataUploadStatusWithHttpInfo(fileId, versionId, fileType); return localVarResp.getData(); } @@ -1831,12 +1880,13 @@ public FileVersionUploadStatus getFileDataUploadStatus(String fileId, Integer ve * @return ApiResponse<FileVersionUploadStatus> * @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 Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. -
*/ - public ApiResponse getFileDataUploadStatusWithHttpInfo(String fileId, Integer versionId, String fileType) throws ApiException { + public ApiResponse getFileDataUploadStatusWithHttpInfo(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType) throws ApiException { okhttp3.Call localVarCall = getFileDataUploadStatusValidateBeforeCall(fileId, versionId, fileType, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1852,12 +1902,13 @@ public ApiResponse getFileDataUploadStatusWithHttpInfo( * @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 Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. -
*/ - public okhttp3.Call getFileDataUploadStatusAsync(String fileId, Integer versionId, String fileType, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFileDataUploadStatusAsync(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFileDataUploadStatusValidateBeforeCall(fileId, versionId, fileType, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1874,12 +1925,13 @@ public okhttp3.Call getFileDataUploadStatusAsync(String fileId, Integer versionI * @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 list of File objects. -
*/ - public okhttp3.Call getFilesCall(String tag, String userId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFilesCall(@javax.annotation.Nullable String tag, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1940,7 +1992,7 @@ public okhttp3.Call getFilesCall(String tag, String userId, Integer n, Integer o } @SuppressWarnings("rawtypes") - private okhttp3.Call getFilesValidateBeforeCall(String tag, String userId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFilesValidateBeforeCall(@javax.annotation.Nullable String tag, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { return getFilesCall(tag, userId, n, offset, _callback); } @@ -1955,12 +2007,13 @@ private okhttp3.Call getFilesValidateBeforeCall(String tag, String userId, Integ * @return List<ModelFile> * @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 list of File objects. -
*/ - public List getFiles(String tag, String userId, Integer n, Integer offset) throws ApiException { + public List getFiles(@javax.annotation.Nullable String tag, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = getFilesWithHttpInfo(tag, userId, n, offset); return localVarResp.getData(); } @@ -1975,12 +2028,13 @@ public List getFiles(String tag, String userId, Integer n, Integer of * @return ApiResponse<List<ModelFile>> * @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 list of File objects. -
*/ - public ApiResponse> getFilesWithHttpInfo(String tag, String userId, Integer n, Integer offset) throws ApiException { + public ApiResponse> getFilesWithHttpInfo(@javax.annotation.Nullable String tag, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getFilesValidateBeforeCall(tag, userId, n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1997,12 +2051,13 @@ public ApiResponse> getFilesWithHttpInfo(String tag, String user * @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 list of File objects. -
*/ - public okhttp3.Call getFilesAsync(String tag, String userId, Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getFilesAsync(@javax.annotation.Nullable String tag, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getFilesValidateBeforeCall(tag, userId, n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -2016,13 +2071,14 @@ public okhttp3.Call getFilesAsync(String tag, String userId, Integer n, Integer * @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 list of File IDs. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call setGroupGalleryFileOrderCall(GroupGalleryFileOrderRequest groupGalleryFileOrderRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call setGroupGalleryFileOrderCall(@javax.annotation.Nullable GroupGalleryFileOrderRequest groupGalleryFileOrderRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2068,7 +2124,7 @@ public okhttp3.Call setGroupGalleryFileOrderCall(GroupGalleryFileOrderRequest gr } @SuppressWarnings("rawtypes") - private okhttp3.Call setGroupGalleryFileOrderValidateBeforeCall(GroupGalleryFileOrderRequest groupGalleryFileOrderRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call setGroupGalleryFileOrderValidateBeforeCall(@javax.annotation.Nullable GroupGalleryFileOrderRequest groupGalleryFileOrderRequest, final ApiCallback _callback) throws ApiException { return setGroupGalleryFileOrderCall(groupGalleryFileOrderRequest, _callback); } @@ -2080,13 +2136,14 @@ private okhttp3.Call setGroupGalleryFileOrderValidateBeforeCall(GroupGalleryFile * @return GroupGalleryFileOrder * @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 list of File IDs. -
404 Error response when trying to show information about a non-existent file. -
*/ - public GroupGalleryFileOrder setGroupGalleryFileOrder(GroupGalleryFileOrderRequest groupGalleryFileOrderRequest) throws ApiException { + public GroupGalleryFileOrder setGroupGalleryFileOrder(@javax.annotation.Nullable GroupGalleryFileOrderRequest groupGalleryFileOrderRequest) throws ApiException { ApiResponse localVarResp = setGroupGalleryFileOrderWithHttpInfo(groupGalleryFileOrderRequest); return localVarResp.getData(); } @@ -2098,13 +2155,14 @@ public GroupGalleryFileOrder setGroupGalleryFileOrder(GroupGalleryFileOrderReque * @return ApiResponse<GroupGalleryFileOrder> * @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 list of File IDs. -
404 Error response when trying to show information about a non-existent file. -
*/ - public ApiResponse setGroupGalleryFileOrderWithHttpInfo(GroupGalleryFileOrderRequest groupGalleryFileOrderRequest) throws ApiException { + public ApiResponse setGroupGalleryFileOrderWithHttpInfo(@javax.annotation.Nullable GroupGalleryFileOrderRequest groupGalleryFileOrderRequest) throws ApiException { okhttp3.Call localVarCall = setGroupGalleryFileOrderValidateBeforeCall(groupGalleryFileOrderRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2118,13 +2176,14 @@ public ApiResponse setGroupGalleryFileOrderWithHttpInfo(G * @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 list of File IDs. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call setGroupGalleryFileOrderAsync(GroupGalleryFileOrderRequest groupGalleryFileOrderRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call setGroupGalleryFileOrderAsync(@javax.annotation.Nullable GroupGalleryFileOrderRequest groupGalleryFileOrderRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setGroupGalleryFileOrderValidateBeforeCall(groupGalleryFileOrderRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2141,13 +2200,14 @@ public okhttp3.Call setGroupGalleryFileOrderAsync(GroupGalleryFileOrderRequest g * @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 See [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html](AWS REST docs - PUT Object) -
400 Error response when trying to start an upload against a FileVersion that is already marked as `complete`. -
*/ - public okhttp3.Call startFileDataUploadCall(String fileId, Integer versionId, String fileType, Integer partNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call startFileDataUploadCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, @javax.annotation.Nullable Integer partNumber, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2199,7 +2259,7 @@ public okhttp3.Call startFileDataUploadCall(String fileId, Integer versionId, St } @SuppressWarnings("rawtypes") - private okhttp3.Call startFileDataUploadValidateBeforeCall(String fileId, Integer versionId, String fileType, Integer partNumber, final ApiCallback _callback) throws ApiException { + private okhttp3.Call startFileDataUploadValidateBeforeCall(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, @javax.annotation.Nullable Integer partNumber, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException("Missing the required parameter 'fileId' when calling startFileDataUpload(Async)"); @@ -2229,13 +2289,14 @@ private okhttp3.Call startFileDataUploadValidateBeforeCall(String fileId, Intege * @return FileUploadURL * @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 See [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html](AWS REST docs - PUT Object) -
400 Error response when trying to start an upload against a FileVersion that is already marked as `complete`. -
*/ - public FileUploadURL startFileDataUpload(String fileId, Integer versionId, String fileType, Integer partNumber) throws ApiException { + public FileUploadURL startFileDataUpload(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, @javax.annotation.Nullable Integer partNumber) throws ApiException { ApiResponse localVarResp = startFileDataUploadWithHttpInfo(fileId, versionId, fileType, partNumber); return localVarResp.getData(); } @@ -2250,13 +2311,14 @@ public FileUploadURL startFileDataUpload(String fileId, Integer versionId, Strin * @return ApiResponse<FileUploadURL> * @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 See [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html](AWS REST docs - PUT Object) -
400 Error response when trying to start an upload against a FileVersion that is already marked as `complete`. -
*/ - public ApiResponse startFileDataUploadWithHttpInfo(String fileId, Integer versionId, String fileType, Integer partNumber) throws ApiException { + public ApiResponse startFileDataUploadWithHttpInfo(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, @javax.annotation.Nullable Integer partNumber) throws ApiException { okhttp3.Call localVarCall = startFileDataUploadValidateBeforeCall(fileId, versionId, fileType, partNumber, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2273,13 +2335,14 @@ public ApiResponse startFileDataUploadWithHttpInfo(String fileId, * @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 See [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html](AWS REST docs - PUT Object) -
400 Error response when trying to start an upload against a FileVersion that is already marked as `complete`. -
*/ - public okhttp3.Call startFileDataUploadAsync(String fileId, Integer versionId, String fileType, Integer partNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call startFileDataUploadAsync(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, @javax.annotation.Nonnull String fileType, @javax.annotation.Nullable Integer partNumber, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = startFileDataUploadValidateBeforeCall(fileId, versionId, fileType, partNumber, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2293,13 +2356,14 @@ public okhttp3.Call startFileDataUploadAsync(String fileId, Integer versionId, S * @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 single Agreement object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call submitContentAgreementCall(AgreementRequest agreementRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call submitContentAgreementCall(@javax.annotation.Nullable AgreementRequest agreementRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2345,7 +2409,7 @@ public okhttp3.Call submitContentAgreementCall(AgreementRequest agreementRequest } @SuppressWarnings("rawtypes") - private okhttp3.Call submitContentAgreementValidateBeforeCall(AgreementRequest agreementRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call submitContentAgreementValidateBeforeCall(@javax.annotation.Nullable AgreementRequest agreementRequest, final ApiCallback _callback) throws ApiException { return submitContentAgreementCall(agreementRequest, _callback); } @@ -2357,13 +2421,14 @@ private okhttp3.Call submitContentAgreementValidateBeforeCall(AgreementRequest a * @return Agreement * @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 single Agreement object. -
401 Error response due to missing auth cookie. -
*/ - public Agreement submitContentAgreement(AgreementRequest agreementRequest) throws ApiException { + public Agreement submitContentAgreement(@javax.annotation.Nullable AgreementRequest agreementRequest) throws ApiException { ApiResponse localVarResp = submitContentAgreementWithHttpInfo(agreementRequest); return localVarResp.getData(); } @@ -2375,13 +2440,14 @@ public Agreement submitContentAgreement(AgreementRequest agreementRequest) throw * @return ApiResponse<Agreement> * @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 single Agreement object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse submitContentAgreementWithHttpInfo(AgreementRequest agreementRequest) throws ApiException { + public ApiResponse submitContentAgreementWithHttpInfo(@javax.annotation.Nullable AgreementRequest agreementRequest) throws ApiException { okhttp3.Call localVarCall = submitContentAgreementValidateBeforeCall(agreementRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2395,13 +2461,14 @@ public ApiResponse submitContentAgreementWithHttpInfo(AgreementReques * @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 single Agreement object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call submitContentAgreementAsync(AgreementRequest agreementRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call submitContentAgreementAsync(@javax.annotation.Nullable AgreementRequest agreementRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = submitContentAgreementValidateBeforeCall(agreementRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2416,13 +2483,14 @@ public okhttp3.Call submitContentAgreementAsync(AgreementRequest agreementReques * @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 The asset review notes are submitted. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateAssetReviewNotesCall(String assetReviewId, UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAssetReviewNotesCall(@javax.annotation.Nonnull String assetReviewId, @javax.annotation.Nullable UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2469,7 +2537,7 @@ public okhttp3.Call updateAssetReviewNotesCall(String assetReviewId, UpdateAsset } @SuppressWarnings("rawtypes") - private okhttp3.Call updateAssetReviewNotesValidateBeforeCall(String assetReviewId, UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateAssetReviewNotesValidateBeforeCall(@javax.annotation.Nonnull String assetReviewId, @javax.annotation.Nullable UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'assetReviewId' is set if (assetReviewId == null) { throw new ApiException("Missing the required parameter 'assetReviewId' when calling updateAssetReviewNotes(Async)"); @@ -2486,13 +2554,14 @@ private okhttp3.Call updateAssetReviewNotesValidateBeforeCall(String assetReview * @param updateAssetReviewNotesRequest (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 The asset review notes are submitted. -
401 Error response due to missing auth cookie. -
*/ - public void updateAssetReviewNotes(String assetReviewId, UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest) throws ApiException { + public void updateAssetReviewNotes(@javax.annotation.Nonnull String assetReviewId, @javax.annotation.Nullable UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest) throws ApiException { updateAssetReviewNotesWithHttpInfo(assetReviewId, updateAssetReviewNotesRequest); } @@ -2504,13 +2573,14 @@ public void updateAssetReviewNotes(String assetReviewId, UpdateAssetReviewNotesR * @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 The asset review notes are submitted. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse updateAssetReviewNotesWithHttpInfo(String assetReviewId, UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest) throws ApiException { + public ApiResponse updateAssetReviewNotesWithHttpInfo(@javax.annotation.Nonnull String assetReviewId, @javax.annotation.Nullable UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest) throws ApiException { okhttp3.Call localVarCall = updateAssetReviewNotesValidateBeforeCall(assetReviewId, updateAssetReviewNotesRequest, null); return localVarApiClient.execute(localVarCall); } @@ -2524,13 +2594,14 @@ public ApiResponse updateAssetReviewNotesWithHttpInfo(String assetReviewId * @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 The asset review notes are submitted. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateAssetReviewNotesAsync(String assetReviewId, UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAssetReviewNotesAsync(@javax.annotation.Nonnull String assetReviewId, @javax.annotation.Nullable UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateAssetReviewNotesValidateBeforeCall(assetReviewId, updateAssetReviewNotesRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -2543,12 +2614,13 @@ public okhttp3.Call updateAssetReviewNotesAsync(String assetReviewId, UpdateAsse * @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 single File object. -
*/ - public okhttp3.Call uploadGalleryImageCall(File _file, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadGalleryImageCall(@javax.annotation.Nonnull File _file, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2598,7 +2670,7 @@ public okhttp3.Call uploadGalleryImageCall(File _file, final ApiCallback _callba } @SuppressWarnings("rawtypes") - private okhttp3.Call uploadGalleryImageValidateBeforeCall(File _file, final ApiCallback _callback) throws ApiException { + private okhttp3.Call uploadGalleryImageValidateBeforeCall(@javax.annotation.Nonnull File _file, final ApiCallback _callback) throws ApiException { // verify the required parameter '_file' is set if (_file == null) { throw new ApiException("Missing the required parameter '_file' when calling uploadGalleryImage(Async)"); @@ -2615,12 +2687,13 @@ private okhttp3.Call uploadGalleryImageValidateBeforeCall(File _file, final ApiC * @return ModelFile * @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 single File object. -
*/ - public ModelFile uploadGalleryImage(File _file) throws ApiException { + public ModelFile uploadGalleryImage(@javax.annotation.Nonnull File _file) throws ApiException { ApiResponse localVarResp = uploadGalleryImageWithHttpInfo(_file); return localVarResp.getData(); } @@ -2632,12 +2705,13 @@ public ModelFile uploadGalleryImage(File _file) throws ApiException { * @return ApiResponse<ModelFile> * @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 single File object. -
*/ - public ApiResponse uploadGalleryImageWithHttpInfo(File _file) throws ApiException { + public ApiResponse uploadGalleryImageWithHttpInfo(@javax.annotation.Nonnull File _file) throws ApiException { okhttp3.Call localVarCall = uploadGalleryImageValidateBeforeCall(_file, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2651,12 +2725,13 @@ public ApiResponse uploadGalleryImageWithHttpInfo(File _file) throws * @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 single File object. -
*/ - public okhttp3.Call uploadGalleryImageAsync(File _file, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadGalleryImageAsync(@javax.annotation.Nonnull File _file, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = uploadGalleryImageValidateBeforeCall(_file, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2670,12 +2745,13 @@ public okhttp3.Call uploadGalleryImageAsync(File _file, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a single File object. -
*/ - public okhttp3.Call uploadIconCall(File _file, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadIconCall(@javax.annotation.Nonnull File _file, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2725,7 +2801,7 @@ public okhttp3.Call uploadIconCall(File _file, final ApiCallback _callback) thro } @SuppressWarnings("rawtypes") - private okhttp3.Call uploadIconValidateBeforeCall(File _file, final ApiCallback _callback) throws ApiException { + private okhttp3.Call uploadIconValidateBeforeCall(@javax.annotation.Nonnull File _file, final ApiCallback _callback) throws ApiException { // verify the required parameter '_file' is set if (_file == null) { throw new ApiException("Missing the required parameter '_file' when calling uploadIcon(Async)"); @@ -2742,12 +2818,13 @@ private okhttp3.Call uploadIconValidateBeforeCall(File _file, final ApiCallback * @return ModelFile * @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 single File object. -
*/ - public ModelFile uploadIcon(File _file) throws ApiException { + public ModelFile uploadIcon(@javax.annotation.Nonnull File _file) throws ApiException { ApiResponse localVarResp = uploadIconWithHttpInfo(_file); return localVarResp.getData(); } @@ -2759,12 +2836,13 @@ public ModelFile uploadIcon(File _file) throws ApiException { * @return ApiResponse<ModelFile> * @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 single File object. -
*/ - public ApiResponse uploadIconWithHttpInfo(File _file) throws ApiException { + public ApiResponse uploadIconWithHttpInfo(@javax.annotation.Nonnull File _file) throws ApiException { okhttp3.Call localVarCall = uploadIconValidateBeforeCall(_file, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2778,12 +2856,13 @@ public ApiResponse uploadIconWithHttpInfo(File _file) throws ApiExcep * @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 single File object. -
*/ - public okhttp3.Call uploadIconAsync(File _file, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadIconAsync(@javax.annotation.Nonnull File _file, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = uploadIconValidateBeforeCall(_file, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2803,12 +2882,13 @@ public okhttp3.Call uploadIconAsync(File _file, final ApiCallback _ca * @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 single File object. -
*/ - public okhttp3.Call uploadImageCall(File _file, ImagePurpose tag, ImageAnimationStyle animationStyle, Integer frames, Integer framesOverTime, ImageLoopStyle loopStyle, ImageMask maskTag, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadImageCall(@javax.annotation.Nonnull File _file, @javax.annotation.Nonnull ImagePurpose tag, @javax.annotation.Nullable ImageAnimationStyle animationStyle, @javax.annotation.Nullable Integer frames, @javax.annotation.Nullable Integer framesOverTime, @javax.annotation.Nullable ImageLoopStyle loopStyle, @javax.annotation.Nullable ImageMask maskTag, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2882,7 +2962,7 @@ public okhttp3.Call uploadImageCall(File _file, ImagePurpose tag, ImageAnimation } @SuppressWarnings("rawtypes") - private okhttp3.Call uploadImageValidateBeforeCall(File _file, ImagePurpose tag, ImageAnimationStyle animationStyle, Integer frames, Integer framesOverTime, ImageLoopStyle loopStyle, ImageMask maskTag, final ApiCallback _callback) throws ApiException { + private okhttp3.Call uploadImageValidateBeforeCall(@javax.annotation.Nonnull File _file, @javax.annotation.Nonnull ImagePurpose tag, @javax.annotation.Nullable ImageAnimationStyle animationStyle, @javax.annotation.Nullable Integer frames, @javax.annotation.Nullable Integer framesOverTime, @javax.annotation.Nullable ImageLoopStyle loopStyle, @javax.annotation.Nullable ImageMask maskTag, final ApiCallback _callback) throws ApiException { // verify the required parameter '_file' is set if (_file == null) { throw new ApiException("Missing the required parameter '_file' when calling uploadImage(Async)"); @@ -2910,12 +2990,13 @@ private okhttp3.Call uploadImageValidateBeforeCall(File _file, ImagePurpose tag, * @return ModelFile * @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 single File object. -
*/ - public ModelFile uploadImage(File _file, ImagePurpose tag, ImageAnimationStyle animationStyle, Integer frames, Integer framesOverTime, ImageLoopStyle loopStyle, ImageMask maskTag) throws ApiException { + public ModelFile uploadImage(@javax.annotation.Nonnull File _file, @javax.annotation.Nonnull ImagePurpose tag, @javax.annotation.Nullable ImageAnimationStyle animationStyle, @javax.annotation.Nullable Integer frames, @javax.annotation.Nullable Integer framesOverTime, @javax.annotation.Nullable ImageLoopStyle loopStyle, @javax.annotation.Nullable ImageMask maskTag) throws ApiException { ApiResponse localVarResp = uploadImageWithHttpInfo(_file, tag, animationStyle, frames, framesOverTime, loopStyle, maskTag); return localVarResp.getData(); } @@ -2933,12 +3014,13 @@ public ModelFile uploadImage(File _file, ImagePurpose tag, ImageAnimationStyle a * @return ApiResponse<ModelFile> * @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 single File object. -
*/ - public ApiResponse uploadImageWithHttpInfo(File _file, ImagePurpose tag, ImageAnimationStyle animationStyle, Integer frames, Integer framesOverTime, ImageLoopStyle loopStyle, ImageMask maskTag) throws ApiException { + public ApiResponse uploadImageWithHttpInfo(@javax.annotation.Nonnull File _file, @javax.annotation.Nonnull ImagePurpose tag, @javax.annotation.Nullable ImageAnimationStyle animationStyle, @javax.annotation.Nullable Integer frames, @javax.annotation.Nullable Integer framesOverTime, @javax.annotation.Nullable ImageLoopStyle loopStyle, @javax.annotation.Nullable ImageMask maskTag) throws ApiException { okhttp3.Call localVarCall = uploadImageValidateBeforeCall(_file, tag, animationStyle, frames, framesOverTime, loopStyle, maskTag, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2958,12 +3040,13 @@ public ApiResponse uploadImageWithHttpInfo(File _file, ImagePurpose t * @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 single File object. -
*/ - public okhttp3.Call uploadImageAsync(File _file, ImagePurpose tag, ImageAnimationStyle animationStyle, Integer frames, Integer framesOverTime, ImageLoopStyle loopStyle, ImageMask maskTag, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadImageAsync(@javax.annotation.Nonnull File _file, @javax.annotation.Nonnull ImagePurpose tag, @javax.annotation.Nullable ImageAnimationStyle animationStyle, @javax.annotation.Nullable Integer frames, @javax.annotation.Nullable Integer framesOverTime, @javax.annotation.Nullable ImageLoopStyle loopStyle, @javax.annotation.Nullable ImageMask maskTag, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = uploadImageValidateBeforeCall(_file, tag, animationStyle, frames, framesOverTime, loopStyle, maskTag, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/FriendsApi.java b/src/main/java/io/github/vrchatapi/api/FriendsApi.java index 9bb08ae6..f7b2d573 100644 --- a/src/main/java/io/github/vrchatapi/api/FriendsApi.java +++ b/src/main/java/io/github/vrchatapi/api/FriendsApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,7 +38,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class FriendsApi { private ApiClient localVarApiClient; @@ -85,7 +84,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -93,7 +93,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
Response Details
Status Code Description Response Headers
200 Successful response after booping a user. -
400 Error response when trying to unfriend someone who is not a friend. -
404 Error response when trying to send a friend request to a user which doesn't exist. -
*/ - public okhttp3.Call boopCall(String userId, BoopRequest boopRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call boopCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull BoopRequest boopRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -140,7 +140,7 @@ public okhttp3.Call boopCall(String userId, BoopRequest boopRequest, final ApiCa } @SuppressWarnings("rawtypes") - private okhttp3.Call boopValidateBeforeCall(String userId, BoopRequest boopRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call boopValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull BoopRequest boopRequest, 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 boop(Async)"); @@ -163,7 +163,8 @@ private okhttp3.Call boopValidateBeforeCall(String userId, BoopRequest boopReque * @return Success * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -171,7 +172,7 @@ private okhttp3.Call boopValidateBeforeCall(String userId, BoopRequest boopReque
Response Details
Status Code Description Response Headers
200 Successful response after booping a user. -
400 Error response when trying to unfriend someone who is not a friend. -
404 Error response when trying to send a friend request to a user which doesn't exist. -
*/ - public Success boop(String userId, BoopRequest boopRequest) throws ApiException { + public Success boop(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull BoopRequest boopRequest) throws ApiException { ApiResponse localVarResp = boopWithHttpInfo(userId, boopRequest); return localVarResp.getData(); } @@ -184,7 +185,8 @@ public Success boop(String userId, BoopRequest boopRequest) throws ApiException * @return ApiResponse<Success> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -192,7 +194,7 @@ public Success boop(String userId, BoopRequest boopRequest) throws ApiException
Response Details
Status Code Description Response Headers
200 Successful response after booping a user. -
400 Error response when trying to unfriend someone who is not a friend. -
404 Error response when trying to send a friend request to a user which doesn't exist. -
*/ - public ApiResponse boopWithHttpInfo(String userId, BoopRequest boopRequest) throws ApiException { + public ApiResponse boopWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull BoopRequest boopRequest) throws ApiException { okhttp3.Call localVarCall = boopValidateBeforeCall(userId, boopRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -207,7 +209,8 @@ public ApiResponse boopWithHttpInfo(String userId, BoopRequest boopRequ * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -215,7 +218,7 @@ public ApiResponse boopWithHttpInfo(String userId, BoopRequest boopRequ
Response Details
Status Code Description Response Headers
200 Successful response after booping a user. -
400 Error response when trying to unfriend someone who is not a friend. -
404 Error response when trying to send a friend request to a user which doesn't exist. -
*/ - public okhttp3.Call boopAsync(String userId, BoopRequest boopRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call boopAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull BoopRequest boopRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = boopValidateBeforeCall(userId, boopRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -229,14 +232,15 @@ public okhttp3.Call boopAsync(String userId, BoopRequest boopRequest, final ApiC * @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 Successful response after cancelling a friend request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to delete a non-existent friend-request. -
*/ - public okhttp3.Call deleteFriendRequestCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteFriendRequestCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -282,7 +286,7 @@ public okhttp3.Call deleteFriendRequestCall(String userId, final ApiCallback _ca } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteFriendRequestValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteFriendRequestValidateBeforeCall(@javax.annotation.Nonnull 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 deleteFriendRequest(Async)"); @@ -299,14 +303,15 @@ private okhttp3.Call deleteFriendRequestValidateBeforeCall(String userId, final * @return Success * @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 Successful response after cancelling a friend request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to delete a non-existent friend-request. -
*/ - public Success deleteFriendRequest(String userId) throws ApiException { + public Success deleteFriendRequest(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = deleteFriendRequestWithHttpInfo(userId); return localVarResp.getData(); } @@ -318,14 +323,15 @@ public Success deleteFriendRequest(String userId) throws ApiException { * @return ApiResponse<Success> * @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 Successful response after cancelling a friend request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to delete a non-existent friend-request. -
*/ - public ApiResponse deleteFriendRequestWithHttpInfo(String userId) throws ApiException { + public ApiResponse deleteFriendRequestWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = deleteFriendRequestValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -339,14 +345,15 @@ public ApiResponse deleteFriendRequestWithHttpInfo(String userId) throw * @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 Successful response after cancelling a friend request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to delete a non-existent friend-request. -
*/ - public okhttp3.Call deleteFriendRequestAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteFriendRequestAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteFriendRequestValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -360,15 +367,16 @@ public okhttp3.Call deleteFriendRequestAsync(String userId, final ApiCallback + + - +
Response Details
Status Code Description Response Headers
200 Returns a single Notifcation object. -
200 Returns a single Notification object. -
400 Bad request error response when sending a friend request -
401 Error response due to missing auth cookie. -
404 Error response when trying to send a friend request to a user which doesn't exist. -
*/ - public okhttp3.Call friendCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call friendCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -414,7 +422,7 @@ public okhttp3.Call friendCall(String userId, final ApiCallback _callback) throw } @SuppressWarnings("rawtypes") - private okhttp3.Call friendValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call friendValidateBeforeCall(@javax.annotation.Nonnull 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 friend(Async)"); @@ -431,15 +439,16 @@ private okhttp3.Call friendValidateBeforeCall(String userId, final ApiCallback _ * @return Notification * @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 single Notifcation object. -
200 Returns a single Notification object. -
400 Bad request error response when sending a friend request -
401 Error response due to missing auth cookie. -
404 Error response when trying to send a friend request to a user which doesn't exist. -
*/ - public Notification friend(String userId) throws ApiException { + public Notification friend(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = friendWithHttpInfo(userId); return localVarResp.getData(); } @@ -451,15 +460,16 @@ public Notification friend(String userId) throws ApiException { * @return ApiResponse<Notification> * @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 single Notifcation object. -
200 Returns a single Notification object. -
400 Bad request error response when sending a friend request -
401 Error response due to missing auth cookie. -
404 Error response when trying to send a friend request to a user which doesn't exist. -
*/ - public ApiResponse friendWithHttpInfo(String userId) throws ApiException { + public ApiResponse friendWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = friendValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -473,15 +483,16 @@ public ApiResponse friendWithHttpInfo(String userId) throws ApiExc * @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 single Notifcation object. -
200 Returns a single Notification object. -
400 Bad request error response when sending a friend request -
401 Error response due to missing auth cookie. -
404 Error response when trying to send a friend request to a user which doesn't exist. -
*/ - public okhttp3.Call friendAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call friendAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = friendValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -495,13 +506,14 @@ public okhttp3.Call friendAsync(String userId, final ApiCallback _ * @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 users Friend Status. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFriendStatusCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFriendStatusCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -547,7 +559,7 @@ public okhttp3.Call getFriendStatusCall(String userId, final ApiCallback _callba } @SuppressWarnings("rawtypes") - private okhttp3.Call getFriendStatusValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFriendStatusValidateBeforeCall(@javax.annotation.Nonnull 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 getFriendStatus(Async)"); @@ -564,13 +576,14 @@ private okhttp3.Call getFriendStatusValidateBeforeCall(String userId, final ApiC * @return FriendStatus * @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 users Friend Status. -
401 Error response due to missing auth cookie. -
*/ - public FriendStatus getFriendStatus(String userId) throws ApiException { + public FriendStatus getFriendStatus(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getFriendStatusWithHttpInfo(userId); return localVarResp.getData(); } @@ -582,13 +595,14 @@ public FriendStatus getFriendStatus(String userId) throws ApiException { * @return ApiResponse<FriendStatus> * @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 users Friend Status. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getFriendStatusWithHttpInfo(String userId) throws ApiException { + public ApiResponse getFriendStatusWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getFriendStatusValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -602,13 +616,14 @@ public ApiResponse getFriendStatusWithHttpInfo(String userId) thro * @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 users Friend Status. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFriendStatusAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFriendStatusAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFriendStatusValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -624,13 +639,14 @@ public okhttp3.Call getFriendStatusAsync(String userId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a list of LimitedUserFriend objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFriendsCall(Integer offset, Integer n, Boolean offline, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFriendsCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Boolean offline, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -687,7 +703,7 @@ public okhttp3.Call getFriendsCall(Integer offset, Integer n, Boolean offline, f } @SuppressWarnings("rawtypes") - private okhttp3.Call getFriendsValidateBeforeCall(Integer offset, Integer n, Boolean offline, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFriendsValidateBeforeCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Boolean offline, final ApiCallback _callback) throws ApiException { return getFriendsCall(offset, n, offline, _callback); } @@ -701,13 +717,14 @@ private okhttp3.Call getFriendsValidateBeforeCall(Integer offset, Integer n, Boo * @return List<LimitedUserFriend> * @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 list of LimitedUserFriend objects. -
401 Error response due to missing auth cookie. -
*/ - public List getFriends(Integer offset, Integer n, Boolean offline) throws ApiException { + public List getFriends(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Boolean offline) throws ApiException { ApiResponse> localVarResp = getFriendsWithHttpInfo(offset, n, offline); return localVarResp.getData(); } @@ -721,13 +738,14 @@ public List getFriends(Integer offset, Integer n, Boolean off * @return ApiResponse<List<LimitedUserFriend>> * @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 list of LimitedUserFriend objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getFriendsWithHttpInfo(Integer offset, Integer n, Boolean offline) throws ApiException { + public ApiResponse> getFriendsWithHttpInfo(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Boolean offline) throws ApiException { okhttp3.Call localVarCall = getFriendsValidateBeforeCall(offset, n, offline, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -743,13 +761,14 @@ public ApiResponse> getFriendsWithHttpInfo(Integer offse * @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 list of LimitedUserFriend objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFriendsAsync(Integer offset, Integer n, Boolean offline, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getFriendsAsync(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Boolean offline, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getFriendsValidateBeforeCall(offset, n, offline, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -763,14 +782,15 @@ public okhttp3.Call getFriendsAsync(Integer offset, Integer n, Boolean offline, * @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 Successful response after unfriending a user. -
400 Error response when trying to unfriend someone who is not a friend. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call unfriendCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unfriendCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -816,7 +836,7 @@ public okhttp3.Call unfriendCall(String userId, final ApiCallback _callback) thr } @SuppressWarnings("rawtypes") - private okhttp3.Call unfriendValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call unfriendValidateBeforeCall(@javax.annotation.Nonnull 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 unfriend(Async)"); @@ -833,14 +853,15 @@ private okhttp3.Call unfriendValidateBeforeCall(String userId, final ApiCallback * @return Success * @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 Successful response after unfriending a user. -
400 Error response when trying to unfriend someone who is not a friend. -
401 Error response due to missing auth cookie. -
*/ - public Success unfriend(String userId) throws ApiException { + public Success unfriend(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = unfriendWithHttpInfo(userId); return localVarResp.getData(); } @@ -852,14 +873,15 @@ public Success unfriend(String userId) throws ApiException { * @return ApiResponse<Success> * @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 Successful response after unfriending a user. -
400 Error response when trying to unfriend someone who is not a friend. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse unfriendWithHttpInfo(String userId) throws ApiException { + public ApiResponse unfriendWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = unfriendValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -873,14 +895,15 @@ public ApiResponse unfriendWithHttpInfo(String userId) throws ApiExcept * @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 Successful response after unfriending a user. -
400 Error response when trying to unfriend someone who is not a friend. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call unfriendAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unfriendAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = unfriendValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/GroupsApi.java b/src/main/java/io/github/vrchatapi/api/GroupsApi.java index dbb44002..c2fa1466 100644 --- a/src/main/java/io/github/vrchatapi/api/GroupsApi.java +++ b/src/main/java/io/github/vrchatapi/api/GroupsApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -68,7 +68,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class GroupsApi { private ApiClient localVarApiClient; @@ -116,14 +115,15 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 single GroupGalleryImage object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call addGroupGalleryImageCall(String groupId, String groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addGroupGalleryImageCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nonnull AddGroupGalleryImageRequest addGroupGalleryImageRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -171,7 +171,7 @@ public okhttp3.Call addGroupGalleryImageCall(String groupId, String groupGallery } @SuppressWarnings("rawtypes") - private okhttp3.Call addGroupGalleryImageValidateBeforeCall(String groupId, String groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call addGroupGalleryImageValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nonnull AddGroupGalleryImageRequest addGroupGalleryImageRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling addGroupGalleryImage(Async)"); @@ -200,14 +200,15 @@ private okhttp3.Call addGroupGalleryImageValidateBeforeCall(String groupId, Stri * @return GroupGalleryImage * @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 single GroupGalleryImage object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupGalleryImage addGroupGalleryImage(String groupId, String groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest) throws ApiException { + public GroupGalleryImage addGroupGalleryImage(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nonnull AddGroupGalleryImageRequest addGroupGalleryImageRequest) throws ApiException { ApiResponse localVarResp = addGroupGalleryImageWithHttpInfo(groupId, groupGalleryId, addGroupGalleryImageRequest); return localVarResp.getData(); } @@ -221,14 +222,15 @@ public GroupGalleryImage addGroupGalleryImage(String groupId, String groupGaller * @return ApiResponse<GroupGalleryImage> * @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 single GroupGalleryImage object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse addGroupGalleryImageWithHttpInfo(String groupId, String groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest) throws ApiException { + public ApiResponse addGroupGalleryImageWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nonnull AddGroupGalleryImageRequest addGroupGalleryImageRequest) throws ApiException { okhttp3.Call localVarCall = addGroupGalleryImageValidateBeforeCall(groupId, groupGalleryId, addGroupGalleryImageRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -244,14 +246,15 @@ public ApiResponse addGroupGalleryImageWithHttpInfo(String gr * @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 single GroupGalleryImage object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call addGroupGalleryImageAsync(String groupId, String groupGalleryId, AddGroupGalleryImageRequest addGroupGalleryImageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addGroupGalleryImageAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nonnull AddGroupGalleryImageRequest addGroupGalleryImageRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addGroupGalleryImageValidateBeforeCall(groupId, groupGalleryId, addGroupGalleryImageRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -267,14 +270,15 @@ public okhttp3.Call addGroupGalleryImageAsync(String groupId, String groupGaller * @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 list of GroupRoleID objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call addGroupMemberRoleCall(String groupId, String userId, String groupRoleId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addGroupMemberRoleCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupRoleId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -322,7 +326,7 @@ public okhttp3.Call addGroupMemberRoleCall(String groupId, String userId, String } @SuppressWarnings("rawtypes") - private okhttp3.Call addGroupMemberRoleValidateBeforeCall(String groupId, String userId, String groupRoleId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call addGroupMemberRoleValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupRoleId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling addGroupMemberRole(Async)"); @@ -351,14 +355,15 @@ private okhttp3.Call addGroupMemberRoleValidateBeforeCall(String groupId, String * @return List<String> * @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 list of GroupRoleID objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public List addGroupMemberRole(String groupId, String userId, String groupRoleId) throws ApiException { + public List addGroupMemberRole(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupRoleId) throws ApiException { ApiResponse> localVarResp = addGroupMemberRoleWithHttpInfo(groupId, userId, groupRoleId); return localVarResp.getData(); } @@ -372,14 +377,15 @@ public List addGroupMemberRole(String groupId, String userId, String gro * @return ApiResponse<List<String>> * @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 list of GroupRoleID objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse> addGroupMemberRoleWithHttpInfo(String groupId, String userId, String groupRoleId) throws ApiException { + public ApiResponse> addGroupMemberRoleWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupRoleId) throws ApiException { okhttp3.Call localVarCall = addGroupMemberRoleValidateBeforeCall(groupId, userId, groupRoleId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -395,14 +401,15 @@ public ApiResponse> addGroupMemberRoleWithHttpInfo(String groupId, * @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 list of GroupRoleID objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call addGroupMemberRoleAsync(String groupId, String userId, String groupRoleId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call addGroupMemberRoleAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupRoleId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = addGroupMemberRoleValidateBeforeCall(groupId, userId, groupRoleId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -417,13 +424,14 @@ public okhttp3.Call addGroupMemberRoleAsync(String groupId, String userId, Strin * @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 GroupPost object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call addGroupPostCall(String groupId, CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addGroupPostCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -470,7 +478,7 @@ public okhttp3.Call addGroupPostCall(String groupId, CreateGroupPostRequest crea } @SuppressWarnings("rawtypes") - private okhttp3.Call addGroupPostValidateBeforeCall(String groupId, CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call addGroupPostValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling addGroupPost(Async)"); @@ -493,13 +501,14 @@ private okhttp3.Call addGroupPostValidateBeforeCall(String groupId, CreateGroupP * @return GroupPost * @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 GroupPost object. -
401 Error response due to missing auth cookie. -
*/ - public GroupPost addGroupPost(String groupId, CreateGroupPostRequest createGroupPostRequest) throws ApiException { + public GroupPost addGroupPost(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupPostRequest createGroupPostRequest) throws ApiException { ApiResponse localVarResp = addGroupPostWithHttpInfo(groupId, createGroupPostRequest); return localVarResp.getData(); } @@ -512,13 +521,14 @@ public GroupPost addGroupPost(String groupId, CreateGroupPostRequest createGroup * @return ApiResponse<GroupPost> * @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 GroupPost object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse addGroupPostWithHttpInfo(String groupId, CreateGroupPostRequest createGroupPostRequest) throws ApiException { + public ApiResponse addGroupPostWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupPostRequest createGroupPostRequest) throws ApiException { okhttp3.Call localVarCall = addGroupPostValidateBeforeCall(groupId, createGroupPostRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -533,13 +543,14 @@ public ApiResponse addGroupPostWithHttpInfo(String groupId, CreateGro * @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 GroupPost object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call addGroupPostAsync(String groupId, CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addGroupPostAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addGroupPostValidateBeforeCall(groupId, createGroupPostRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -554,7 +565,8 @@ public okhttp3.Call addGroupPostAsync(String groupId, CreateGroupPostRequest cre * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -562,7 +574,7 @@ public okhttp3.Call addGroupPostAsync(String groupId, CreateGroupPostRequest cre
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Bad request error response when banning a user -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call banGroupMemberCall(String groupId, BanGroupMemberRequest banGroupMemberRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call banGroupMemberCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull BanGroupMemberRequest banGroupMemberRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -609,7 +621,7 @@ public okhttp3.Call banGroupMemberCall(String groupId, BanGroupMemberRequest ban } @SuppressWarnings("rawtypes") - private okhttp3.Call banGroupMemberValidateBeforeCall(String groupId, BanGroupMemberRequest banGroupMemberRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call banGroupMemberValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull BanGroupMemberRequest banGroupMemberRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling banGroupMember(Async)"); @@ -632,7 +644,8 @@ private okhttp3.Call banGroupMemberValidateBeforeCall(String groupId, BanGroupMe * @return GroupMember * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -640,7 +653,7 @@ private okhttp3.Call banGroupMemberValidateBeforeCall(String groupId, BanGroupMe
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Bad request error response when banning a user -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupMember banGroupMember(String groupId, BanGroupMemberRequest banGroupMemberRequest) throws ApiException { + public GroupMember banGroupMember(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull BanGroupMemberRequest banGroupMemberRequest) throws ApiException { ApiResponse localVarResp = banGroupMemberWithHttpInfo(groupId, banGroupMemberRequest); return localVarResp.getData(); } @@ -653,7 +666,8 @@ public GroupMember banGroupMember(String groupId, BanGroupMemberRequest banGroup * @return ApiResponse<GroupMember> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -661,7 +675,7 @@ public GroupMember banGroupMember(String groupId, BanGroupMemberRequest banGroup
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Bad request error response when banning a user -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse banGroupMemberWithHttpInfo(String groupId, BanGroupMemberRequest banGroupMemberRequest) throws ApiException { + public ApiResponse banGroupMemberWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull BanGroupMemberRequest banGroupMemberRequest) throws ApiException { okhttp3.Call localVarCall = banGroupMemberValidateBeforeCall(groupId, banGroupMemberRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -676,7 +690,8 @@ public ApiResponse banGroupMemberWithHttpInfo(String groupId, BanGr * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -684,7 +699,7 @@ public ApiResponse banGroupMemberWithHttpInfo(String groupId, BanGr
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Bad request error response when banning a user -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call banGroupMemberAsync(String groupId, BanGroupMemberRequest banGroupMemberRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call banGroupMemberAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull BanGroupMemberRequest banGroupMemberRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = banGroupMemberValidateBeforeCall(groupId, banGroupMemberRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -698,7 +713,8 @@ public okhttp3.Call banGroupMemberAsync(String groupId, BanGroupMemberRequest ba * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -707,7 +723,7 @@ public okhttp3.Call banGroupMemberAsync(String groupId, BanGroupMemberRequest ba
Response Details
Status Code Description Response Headers
200 Successful response after blocking a Group. -
400 Bad request error response when banning a user -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call blockGroupCall(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call blockGroupCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -753,7 +769,7 @@ public okhttp3.Call blockGroupCall(String groupId, final ApiCallback _callback) } @SuppressWarnings("rawtypes") - private okhttp3.Call blockGroupValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call blockGroupValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling blockGroup(Async)"); @@ -770,7 +786,8 @@ private okhttp3.Call blockGroupValidateBeforeCall(String groupId, final ApiCallb * @return Success * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -779,7 +796,7 @@ private okhttp3.Call blockGroupValidateBeforeCall(String groupId, final ApiCallb
Response Details
Status Code Description Response Headers
200 Successful response after blocking a Group. -
400 Bad request error response when banning a user -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public Success blockGroup(String groupId) throws ApiException { + public Success blockGroup(@javax.annotation.Nonnull String groupId) throws ApiException { ApiResponse localVarResp = blockGroupWithHttpInfo(groupId); return localVarResp.getData(); } @@ -791,7 +808,8 @@ public Success blockGroup(String groupId) throws ApiException { * @return ApiResponse<Success> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -800,7 +818,7 @@ public Success blockGroup(String groupId) throws ApiException {
Response Details
Status Code Description Response Headers
200 Successful response after blocking a Group. -
400 Bad request error response when banning a user -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse blockGroupWithHttpInfo(String groupId) throws ApiException { + public ApiResponse blockGroupWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = blockGroupValidateBeforeCall(groupId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -814,7 +832,8 @@ public ApiResponse blockGroupWithHttpInfo(String groupId) throws ApiExc * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -823,7 +842,7 @@ public ApiResponse blockGroupWithHttpInfo(String groupId) throws ApiExc
Response Details
Status Code Description Response Headers
200 Successful response after blocking a Group. -
400 Bad request error response when banning a user -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call blockGroupAsync(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call blockGroupAsync(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = blockGroupValidateBeforeCall(groupId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -837,7 +856,8 @@ public okhttp3.Call blockGroupAsync(String groupId, final ApiCallback _ * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -845,7 +865,7 @@ public okhttp3.Call blockGroupAsync(String groupId, final ApiCallback _
Response Details
Status Code Description Response Headers
200 OK -
400 You can't cancel a join request if you didn't request to join․ -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call cancelGroupRequestCall(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call cancelGroupRequestCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -891,7 +911,7 @@ public okhttp3.Call cancelGroupRequestCall(String groupId, final ApiCallback _ca } @SuppressWarnings("rawtypes") - private okhttp3.Call cancelGroupRequestValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call cancelGroupRequestValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling cancelGroupRequest(Async)"); @@ -907,7 +927,8 @@ private okhttp3.Call cancelGroupRequestValidateBeforeCall(String groupId, final * @param groupId Must be a valid group ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -915,7 +936,7 @@ private okhttp3.Call cancelGroupRequestValidateBeforeCall(String groupId, final
Response Details
Status Code Description Response Headers
200 OK -
400 You can't cancel a join request if you didn't request to join․ -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public void cancelGroupRequest(String groupId) throws ApiException { + public void cancelGroupRequest(@javax.annotation.Nonnull String groupId) throws ApiException { cancelGroupRequestWithHttpInfo(groupId); } @@ -926,7 +947,8 @@ public void cancelGroupRequest(String groupId) throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -934,7 +956,7 @@ public void cancelGroupRequest(String groupId) throws ApiException {
Response Details
Status Code Description Response Headers
200 OK -
400 You can't cancel a join request if you didn't request to join․ -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse cancelGroupRequestWithHttpInfo(String groupId) throws ApiException { + public ApiResponse cancelGroupRequestWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = cancelGroupRequestValidateBeforeCall(groupId, null); return localVarApiClient.execute(localVarCall); } @@ -947,7 +969,8 @@ public ApiResponse cancelGroupRequestWithHttpInfo(String groupId) throws A * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -955,7 +978,7 @@ public ApiResponse cancelGroupRequestWithHttpInfo(String groupId) throws A
Response Details
Status Code Description Response Headers
200 OK -
400 You can't cancel a join request if you didn't request to join․ -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call cancelGroupRequestAsync(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call cancelGroupRequestAsync(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = cancelGroupRequestValidateBeforeCall(groupId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -968,7 +991,8 @@ public okhttp3.Call cancelGroupRequestAsync(String groupId, final ApiCallback + + @@ -976,7 +1000,7 @@ public okhttp3.Call cancelGroupRequestAsync(String groupId, final ApiCallback
Response Details
Status Code Description Response Headers
200 Successful response after cancelling a group transfer. -
400 Error response when trying to cancel a transfer for a group without a pending transfer. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call cancelGroupTransferCall(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call cancelGroupTransferCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1022,7 +1046,7 @@ public okhttp3.Call cancelGroupTransferCall(String groupId, final ApiCallback _c } @SuppressWarnings("rawtypes") - private okhttp3.Call cancelGroupTransferValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call cancelGroupTransferValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling cancelGroupTransfer(Async)"); @@ -1039,7 +1063,8 @@ private okhttp3.Call cancelGroupTransferValidateBeforeCall(String groupId, final * @return Success * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -1047,7 +1072,7 @@ private okhttp3.Call cancelGroupTransferValidateBeforeCall(String groupId, final
Response Details
Status Code Description Response Headers
200 Successful response after cancelling a group transfer. -
400 Error response when trying to cancel a transfer for a group without a pending transfer. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public Success cancelGroupTransfer(String groupId) throws ApiException { + public Success cancelGroupTransfer(@javax.annotation.Nonnull String groupId) throws ApiException { ApiResponse localVarResp = cancelGroupTransferWithHttpInfo(groupId); return localVarResp.getData(); } @@ -1059,7 +1084,8 @@ public Success cancelGroupTransfer(String groupId) throws ApiException { * @return ApiResponse<Success> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -1067,7 +1093,7 @@ public Success cancelGroupTransfer(String groupId) throws ApiException {
Response Details
Status Code Description Response Headers
200 Successful response after cancelling a group transfer. -
400 Error response when trying to cancel a transfer for a group without a pending transfer. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse cancelGroupTransferWithHttpInfo(String groupId) throws ApiException { + public ApiResponse cancelGroupTransferWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = cancelGroupTransferValidateBeforeCall(groupId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1081,7 +1107,8 @@ public ApiResponse cancelGroupTransferWithHttpInfo(String groupId) thro * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -1089,7 +1116,7 @@ public ApiResponse cancelGroupTransferWithHttpInfo(String groupId) thro
Response Details
Status Code Description Response Headers
200 Successful response after cancelling a group transfer. -
400 Error response when trying to cancel a transfer for a group without a pending transfer. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call cancelGroupTransferAsync(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call cancelGroupTransferAsync(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = cancelGroupTransferValidateBeforeCall(groupId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1103,13 +1130,14 @@ public okhttp3.Call cancelGroupTransferAsync(String groupId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a single Group object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createGroupCall(CreateGroupRequest createGroupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupCall(@javax.annotation.Nonnull CreateGroupRequest createGroupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1155,7 +1183,7 @@ public okhttp3.Call createGroupCall(CreateGroupRequest createGroupRequest, final } @SuppressWarnings("rawtypes") - private okhttp3.Call createGroupValidateBeforeCall(CreateGroupRequest createGroupRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createGroupValidateBeforeCall(@javax.annotation.Nonnull CreateGroupRequest createGroupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createGroupRequest' is set if (createGroupRequest == null) { throw new ApiException("Missing the required parameter 'createGroupRequest' when calling createGroup(Async)"); @@ -1172,13 +1200,14 @@ private okhttp3.Call createGroupValidateBeforeCall(CreateGroupRequest createGrou * @return Group * @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 single Group object. -
401 Error response due to missing auth cookie. -
*/ - public Group createGroup(CreateGroupRequest createGroupRequest) throws ApiException { + public Group createGroup(@javax.annotation.Nonnull CreateGroupRequest createGroupRequest) throws ApiException { ApiResponse localVarResp = createGroupWithHttpInfo(createGroupRequest); return localVarResp.getData(); } @@ -1190,13 +1219,14 @@ public Group createGroup(CreateGroupRequest createGroupRequest) throws ApiExcept * @return ApiResponse<Group> * @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 single Group object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse createGroupWithHttpInfo(CreateGroupRequest createGroupRequest) throws ApiException { + public ApiResponse createGroupWithHttpInfo(@javax.annotation.Nonnull CreateGroupRequest createGroupRequest) throws ApiException { okhttp3.Call localVarCall = createGroupValidateBeforeCall(createGroupRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1210,13 +1240,14 @@ public ApiResponse createGroupWithHttpInfo(CreateGroupRequest createGroup * @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 single Group object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createGroupAsync(CreateGroupRequest createGroupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupAsync(@javax.annotation.Nonnull CreateGroupRequest createGroupRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createGroupValidateBeforeCall(createGroupRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1231,14 +1262,15 @@ public okhttp3.Call createGroupAsync(CreateGroupRequest createGroupRequest, fina * @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 single GroupAnnouncement object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call createGroupAnnouncementCall(String groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupAnnouncementCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupAnnouncementRequest createGroupAnnouncementRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1285,7 +1317,7 @@ public okhttp3.Call createGroupAnnouncementCall(String groupId, CreateGroupAnnou } @SuppressWarnings("rawtypes") - private okhttp3.Call createGroupAnnouncementValidateBeforeCall(String groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createGroupAnnouncementValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupAnnouncementRequest createGroupAnnouncementRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling createGroupAnnouncement(Async)"); @@ -1308,14 +1340,15 @@ private okhttp3.Call createGroupAnnouncementValidateBeforeCall(String groupId, C * @return GroupAnnouncement * @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 single GroupAnnouncement object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupAnnouncement createGroupAnnouncement(String groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest) throws ApiException { + public GroupAnnouncement createGroupAnnouncement(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupAnnouncementRequest createGroupAnnouncementRequest) throws ApiException { ApiResponse localVarResp = createGroupAnnouncementWithHttpInfo(groupId, createGroupAnnouncementRequest); return localVarResp.getData(); } @@ -1328,14 +1361,15 @@ public GroupAnnouncement createGroupAnnouncement(String groupId, CreateGroupAnno * @return ApiResponse<GroupAnnouncement> * @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 single GroupAnnouncement object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse createGroupAnnouncementWithHttpInfo(String groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest) throws ApiException { + public ApiResponse createGroupAnnouncementWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupAnnouncementRequest createGroupAnnouncementRequest) throws ApiException { okhttp3.Call localVarCall = createGroupAnnouncementValidateBeforeCall(groupId, createGroupAnnouncementRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1350,14 +1384,15 @@ public ApiResponse createGroupAnnouncementWithHttpInfo(String * @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 single GroupAnnouncement object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call createGroupAnnouncementAsync(String groupId, CreateGroupAnnouncementRequest createGroupAnnouncementRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupAnnouncementAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupAnnouncementRequest createGroupAnnouncementRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createGroupAnnouncementValidateBeforeCall(groupId, createGroupAnnouncementRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1372,14 +1407,15 @@ public okhttp3.Call createGroupAnnouncementAsync(String groupId, CreateGroupAnno * @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 single GroupGallery object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call createGroupGalleryCall(String groupId, CreateGroupGalleryRequest createGroupGalleryRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupGalleryCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupGalleryRequest createGroupGalleryRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1426,7 +1462,7 @@ public okhttp3.Call createGroupGalleryCall(String groupId, CreateGroupGalleryReq } @SuppressWarnings("rawtypes") - private okhttp3.Call createGroupGalleryValidateBeforeCall(String groupId, CreateGroupGalleryRequest createGroupGalleryRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createGroupGalleryValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupGalleryRequest createGroupGalleryRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling createGroupGallery(Async)"); @@ -1449,14 +1485,15 @@ private okhttp3.Call createGroupGalleryValidateBeforeCall(String groupId, Create * @return GroupGallery * @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 single GroupGallery object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupGallery createGroupGallery(String groupId, CreateGroupGalleryRequest createGroupGalleryRequest) throws ApiException { + public GroupGallery createGroupGallery(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupGalleryRequest createGroupGalleryRequest) throws ApiException { ApiResponse localVarResp = createGroupGalleryWithHttpInfo(groupId, createGroupGalleryRequest); return localVarResp.getData(); } @@ -1469,14 +1506,15 @@ public GroupGallery createGroupGallery(String groupId, CreateGroupGalleryRequest * @return ApiResponse<GroupGallery> * @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 single GroupGallery object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse createGroupGalleryWithHttpInfo(String groupId, CreateGroupGalleryRequest createGroupGalleryRequest) throws ApiException { + public ApiResponse createGroupGalleryWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupGalleryRequest createGroupGalleryRequest) throws ApiException { okhttp3.Call localVarCall = createGroupGalleryValidateBeforeCall(groupId, createGroupGalleryRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1491,14 +1529,15 @@ public ApiResponse createGroupGalleryWithHttpInfo(String groupId, * @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 single GroupGallery object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call createGroupGalleryAsync(String groupId, CreateGroupGalleryRequest createGroupGalleryRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupGalleryAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupGalleryRequest createGroupGalleryRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createGroupGalleryValidateBeforeCall(groupId, createGroupGalleryRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1513,7 +1552,8 @@ public okhttp3.Call createGroupGalleryAsync(String groupId, CreateGroupGalleryRe * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1522,7 +1562,7 @@ public okhttp3.Call createGroupGalleryAsync(String groupId, CreateGroupGalleryRe
Response Details
Status Code Description Response Headers
200 OK -
400 Bad request error response when creating a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call createGroupInviteCall(String groupId, CreateGroupInviteRequest createGroupInviteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupInviteCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupInviteRequest createGroupInviteRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1569,7 +1609,7 @@ public okhttp3.Call createGroupInviteCall(String groupId, CreateGroupInviteReque } @SuppressWarnings("rawtypes") - private okhttp3.Call createGroupInviteValidateBeforeCall(String groupId, CreateGroupInviteRequest createGroupInviteRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createGroupInviteValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupInviteRequest createGroupInviteRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling createGroupInvite(Async)"); @@ -1591,7 +1631,8 @@ private okhttp3.Call createGroupInviteValidateBeforeCall(String groupId, CreateG * @param createGroupInviteRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -1600,7 +1641,7 @@ private okhttp3.Call createGroupInviteValidateBeforeCall(String groupId, CreateG
Response Details
Status Code Description Response Headers
200 OK -
400 Bad request error response when creating a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public void createGroupInvite(String groupId, CreateGroupInviteRequest createGroupInviteRequest) throws ApiException { + public void createGroupInvite(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupInviteRequest createGroupInviteRequest) throws ApiException { createGroupInviteWithHttpInfo(groupId, createGroupInviteRequest); } @@ -1612,7 +1653,8 @@ public void createGroupInvite(String groupId, CreateGroupInviteRequest createGro * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -1621,7 +1663,7 @@ public void createGroupInvite(String groupId, CreateGroupInviteRequest createGro
Response Details
Status Code Description Response Headers
200 OK -
400 Bad request error response when creating a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse createGroupInviteWithHttpInfo(String groupId, CreateGroupInviteRequest createGroupInviteRequest) throws ApiException { + public ApiResponse createGroupInviteWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupInviteRequest createGroupInviteRequest) throws ApiException { okhttp3.Call localVarCall = createGroupInviteValidateBeforeCall(groupId, createGroupInviteRequest, null); return localVarApiClient.execute(localVarCall); } @@ -1635,7 +1677,8 @@ public ApiResponse createGroupInviteWithHttpInfo(String groupId, CreateGro * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -1644,7 +1687,7 @@ public ApiResponse createGroupInviteWithHttpInfo(String groupId, CreateGro
Response Details
Status Code Description Response Headers
200 OK -
400 Bad request error response when creating a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call createGroupInviteAsync(String groupId, CreateGroupInviteRequest createGroupInviteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupInviteAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupInviteRequest createGroupInviteRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createGroupInviteValidateBeforeCall(groupId, createGroupInviteRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1658,14 +1701,15 @@ public okhttp3.Call createGroupInviteAsync(String groupId, CreateGroupInviteRequ * @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 single GroupRole object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call createGroupRoleCall(String groupId, CreateGroupRoleRequest createGroupRoleRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupRoleCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupRoleRequest createGroupRoleRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1712,7 +1756,7 @@ public okhttp3.Call createGroupRoleCall(String groupId, CreateGroupRoleRequest c } @SuppressWarnings("rawtypes") - private okhttp3.Call createGroupRoleValidateBeforeCall(String groupId, CreateGroupRoleRequest createGroupRoleRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createGroupRoleValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupRoleRequest createGroupRoleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling createGroupRole(Async)"); @@ -1735,14 +1779,15 @@ private okhttp3.Call createGroupRoleValidateBeforeCall(String groupId, CreateGro * @return GroupRole * @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 single GroupRole object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupRole createGroupRole(String groupId, CreateGroupRoleRequest createGroupRoleRequest) throws ApiException { + public GroupRole createGroupRole(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupRoleRequest createGroupRoleRequest) throws ApiException { ApiResponse localVarResp = createGroupRoleWithHttpInfo(groupId, createGroupRoleRequest); return localVarResp.getData(); } @@ -1755,14 +1800,15 @@ public GroupRole createGroupRole(String groupId, CreateGroupRoleRequest createGr * @return ApiResponse<GroupRole> * @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 single GroupRole object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse createGroupRoleWithHttpInfo(String groupId, CreateGroupRoleRequest createGroupRoleRequest) throws ApiException { + public ApiResponse createGroupRoleWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupRoleRequest createGroupRoleRequest) throws ApiException { okhttp3.Call localVarCall = createGroupRoleValidateBeforeCall(groupId, createGroupRoleRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1777,14 +1823,15 @@ public ApiResponse createGroupRoleWithHttpInfo(String groupId, Create * @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 single GroupRole object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call createGroupRoleAsync(String groupId, CreateGroupRoleRequest createGroupRoleRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGroupRoleAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupRoleRequest createGroupRoleRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createGroupRoleValidateBeforeCall(groupId, createGroupRoleRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1799,7 +1846,8 @@ public okhttp3.Call createGroupRoleAsync(String groupId, CreateGroupRoleRequest * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1807,7 +1855,7 @@ public okhttp3.Call createGroupRoleAsync(String groupId, CreateGroupRoleRequest
Response Details
Status Code Description Response Headers
200 Successful response after declining a group invite. -
400 Bad request error response when declining a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call declineGroupInviteCall(String groupId, DeclineGroupInviteRequest declineGroupInviteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call declineGroupInviteCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable DeclineGroupInviteRequest declineGroupInviteRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1854,7 +1902,7 @@ public okhttp3.Call declineGroupInviteCall(String groupId, DeclineGroupInviteReq } @SuppressWarnings("rawtypes") - private okhttp3.Call declineGroupInviteValidateBeforeCall(String groupId, DeclineGroupInviteRequest declineGroupInviteRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call declineGroupInviteValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable DeclineGroupInviteRequest declineGroupInviteRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling declineGroupInvite(Async)"); @@ -1872,7 +1920,8 @@ private okhttp3.Call declineGroupInviteValidateBeforeCall(String groupId, Declin * @return Success * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -1880,7 +1929,7 @@ private okhttp3.Call declineGroupInviteValidateBeforeCall(String groupId, Declin
Response Details
Status Code Description Response Headers
200 Successful response after declining a group invite. -
400 Bad request error response when declining a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public Success declineGroupInvite(String groupId, DeclineGroupInviteRequest declineGroupInviteRequest) throws ApiException { + public Success declineGroupInvite(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable DeclineGroupInviteRequest declineGroupInviteRequest) throws ApiException { ApiResponse localVarResp = declineGroupInviteWithHttpInfo(groupId, declineGroupInviteRequest); return localVarResp.getData(); } @@ -1893,7 +1942,8 @@ public Success declineGroupInvite(String groupId, DeclineGroupInviteRequest decl * @return ApiResponse<Success> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -1901,7 +1951,7 @@ public Success declineGroupInvite(String groupId, DeclineGroupInviteRequest decl
Response Details
Status Code Description Response Headers
200 Successful response after declining a group invite. -
400 Bad request error response when declining a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse declineGroupInviteWithHttpInfo(String groupId, DeclineGroupInviteRequest declineGroupInviteRequest) throws ApiException { + public ApiResponse declineGroupInviteWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable DeclineGroupInviteRequest declineGroupInviteRequest) throws ApiException { okhttp3.Call localVarCall = declineGroupInviteValidateBeforeCall(groupId, declineGroupInviteRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1916,7 +1966,8 @@ public ApiResponse declineGroupInviteWithHttpInfo(String groupId, Decli * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -1924,7 +1975,7 @@ public ApiResponse declineGroupInviteWithHttpInfo(String groupId, Decli
Response Details
Status Code Description Response Headers
200 Successful response after declining a group invite. -
400 Bad request error response when declining a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call declineGroupInviteAsync(String groupId, DeclineGroupInviteRequest declineGroupInviteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call declineGroupInviteAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable DeclineGroupInviteRequest declineGroupInviteRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = declineGroupInviteValidateBeforeCall(groupId, declineGroupInviteRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1939,14 +1990,15 @@ public okhttp3.Call declineGroupInviteAsync(String groupId, DeclineGroupInviteRe * @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 Successful response after deleting a Group. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call deleteGroupCall(String groupId, Boolean hardDelete, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean hardDelete, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1996,7 +2048,7 @@ public okhttp3.Call deleteGroupCall(String groupId, Boolean hardDelete, final Ap } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteGroupValidateBeforeCall(String groupId, Boolean hardDelete, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteGroupValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean hardDelete, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling deleteGroup(Async)"); @@ -2014,14 +2066,15 @@ private okhttp3.Call deleteGroupValidateBeforeCall(String groupId, Boolean hardD * @return Success * @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 Successful response after deleting a Group. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public Success deleteGroup(String groupId, Boolean hardDelete) throws ApiException { + public Success deleteGroup(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean hardDelete) throws ApiException { ApiResponse localVarResp = deleteGroupWithHttpInfo(groupId, hardDelete); return localVarResp.getData(); } @@ -2034,14 +2087,15 @@ public Success deleteGroup(String groupId, Boolean hardDelete) throws ApiExcepti * @return ApiResponse<Success> * @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 Successful response after deleting a Group. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse deleteGroupWithHttpInfo(String groupId, Boolean hardDelete) throws ApiException { + public ApiResponse deleteGroupWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean hardDelete) throws ApiException { okhttp3.Call localVarCall = deleteGroupValidateBeforeCall(groupId, hardDelete, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2056,14 +2110,15 @@ public ApiResponse deleteGroupWithHttpInfo(String groupId, Boolean hard * @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 Successful response after deleting a Group. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call deleteGroupAsync(String groupId, Boolean hardDelete, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean hardDelete, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteGroupValidateBeforeCall(groupId, hardDelete, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2077,14 +2132,15 @@ public okhttp3.Call deleteGroupAsync(String groupId, Boolean hardDelete, final A * @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 Successful response after deleting/clearing the group announcement. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call deleteGroupAnnouncementCall(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupAnnouncementCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2130,7 +2186,7 @@ public okhttp3.Call deleteGroupAnnouncementCall(String groupId, final ApiCallbac } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteGroupAnnouncementValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteGroupAnnouncementValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling deleteGroupAnnouncement(Async)"); @@ -2147,14 +2203,15 @@ private okhttp3.Call deleteGroupAnnouncementValidateBeforeCall(String groupId, f * @return Success * @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 Successful response after deleting/clearing the group announcement. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public Success deleteGroupAnnouncement(String groupId) throws ApiException { + public Success deleteGroupAnnouncement(@javax.annotation.Nonnull String groupId) throws ApiException { ApiResponse localVarResp = deleteGroupAnnouncementWithHttpInfo(groupId); return localVarResp.getData(); } @@ -2166,14 +2223,15 @@ public Success deleteGroupAnnouncement(String groupId) throws ApiException { * @return ApiResponse<Success> * @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 Successful response after deleting/clearing the group announcement. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse deleteGroupAnnouncementWithHttpInfo(String groupId) throws ApiException { + public ApiResponse deleteGroupAnnouncementWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = deleteGroupAnnouncementValidateBeforeCall(groupId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2187,14 +2245,15 @@ public ApiResponse deleteGroupAnnouncementWithHttpInfo(String groupId) * @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 Successful response after deleting/clearing the group announcement. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call deleteGroupAnnouncementAsync(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupAnnouncementAsync(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteGroupAnnouncementValidateBeforeCall(groupId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2209,14 +2268,15 @@ public okhttp3.Call deleteGroupAnnouncementAsync(String groupId, final ApiCallba * @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 Successful response after deleting a group gallery. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call deleteGroupGalleryCall(String groupId, String groupGalleryId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupGalleryCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2263,7 +2323,7 @@ public okhttp3.Call deleteGroupGalleryCall(String groupId, String groupGalleryId } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteGroupGalleryValidateBeforeCall(String groupId, String groupGalleryId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteGroupGalleryValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling deleteGroupGallery(Async)"); @@ -2286,14 +2346,15 @@ private okhttp3.Call deleteGroupGalleryValidateBeforeCall(String groupId, String * @return Success * @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 Successful response after deleting a group gallery. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public Success deleteGroupGallery(String groupId, String groupGalleryId) throws ApiException { + public Success deleteGroupGallery(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId) throws ApiException { ApiResponse localVarResp = deleteGroupGalleryWithHttpInfo(groupId, groupGalleryId); return localVarResp.getData(); } @@ -2306,14 +2367,15 @@ public Success deleteGroupGallery(String groupId, String groupGalleryId) throws * @return ApiResponse<Success> * @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 Successful response after deleting a group gallery. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse deleteGroupGalleryWithHttpInfo(String groupId, String groupGalleryId) throws ApiException { + public ApiResponse deleteGroupGalleryWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId) throws ApiException { okhttp3.Call localVarCall = deleteGroupGalleryValidateBeforeCall(groupId, groupGalleryId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2328,14 +2390,15 @@ public ApiResponse deleteGroupGalleryWithHttpInfo(String groupId, Strin * @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 Successful response after deleting a group gallery. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call deleteGroupGalleryAsync(String groupId, String groupGalleryId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupGalleryAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteGroupGalleryValidateBeforeCall(groupId, groupGalleryId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2351,7 +2414,8 @@ public okhttp3.Call deleteGroupGalleryAsync(String groupId, String groupGalleryI * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -2359,7 +2423,7 @@ public okhttp3.Call deleteGroupGalleryAsync(String groupId, String groupGalleryI
Response Details
Status Code Description Response Headers
200 Successful response after deleting a group gallery image. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call deleteGroupGalleryImageCall(String groupId, String groupGalleryId, String groupGalleryImageId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupGalleryImageCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nonnull String groupGalleryImageId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2407,7 +2471,7 @@ public okhttp3.Call deleteGroupGalleryImageCall(String groupId, String groupGall } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteGroupGalleryImageValidateBeforeCall(String groupId, String groupGalleryId, String groupGalleryImageId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteGroupGalleryImageValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nonnull String groupGalleryImageId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling deleteGroupGalleryImage(Async)"); @@ -2436,7 +2500,8 @@ private okhttp3.Call deleteGroupGalleryImageValidateBeforeCall(String groupId, S * @return Success * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -2444,7 +2509,7 @@ private okhttp3.Call deleteGroupGalleryImageValidateBeforeCall(String groupId, S
Response Details
Status Code Description Response Headers
200 Successful response after deleting a group gallery image. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public Success deleteGroupGalleryImage(String groupId, String groupGalleryId, String groupGalleryImageId) throws ApiException { + public Success deleteGroupGalleryImage(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nonnull String groupGalleryImageId) throws ApiException { ApiResponse localVarResp = deleteGroupGalleryImageWithHttpInfo(groupId, groupGalleryId, groupGalleryImageId); return localVarResp.getData(); } @@ -2458,7 +2523,8 @@ public Success deleteGroupGalleryImage(String groupId, String groupGalleryId, St * @return ApiResponse<Success> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -2466,7 +2532,7 @@ public Success deleteGroupGalleryImage(String groupId, String groupGalleryId, St
Response Details
Status Code Description Response Headers
200 Successful response after deleting a group gallery image. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse deleteGroupGalleryImageWithHttpInfo(String groupId, String groupGalleryId, String groupGalleryImageId) throws ApiException { + public ApiResponse deleteGroupGalleryImageWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nonnull String groupGalleryImageId) throws ApiException { okhttp3.Call localVarCall = deleteGroupGalleryImageValidateBeforeCall(groupId, groupGalleryId, groupGalleryImageId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2482,7 +2548,8 @@ public ApiResponse deleteGroupGalleryImageWithHttpInfo(String groupId, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -2490,7 +2557,7 @@ public ApiResponse deleteGroupGalleryImageWithHttpInfo(String groupId,
Response Details
Status Code Description Response Headers
200 Successful response after deleting a group gallery image. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call deleteGroupGalleryImageAsync(String groupId, String groupGalleryId, String groupGalleryImageId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupGalleryImageAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nonnull String groupGalleryImageId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteGroupGalleryImageValidateBeforeCall(groupId, groupGalleryId, groupGalleryImageId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2505,14 +2572,15 @@ public okhttp3.Call deleteGroupGalleryImageAsync(String groupId, String groupGal * @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 -
400 Bad request error response when deleting a group invite -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteGroupInviteCall(String groupId, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupInviteCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2559,7 +2627,7 @@ public okhttp3.Call deleteGroupInviteCall(String groupId, String userId, final A } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteGroupInviteValidateBeforeCall(String groupId, String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteGroupInviteValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling deleteGroupInvite(Async)"); @@ -2581,14 +2649,15 @@ private okhttp3.Call deleteGroupInviteValidateBeforeCall(String groupId, String * @param userId Must be a valid user ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
400 Bad request error response when deleting a group invite -
401 Error response due to missing auth cookie. -
*/ - public void deleteGroupInvite(String groupId, String userId) throws ApiException { + public void deleteGroupInvite(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { deleteGroupInviteWithHttpInfo(groupId, userId); } @@ -2600,14 +2669,15 @@ public void deleteGroupInvite(String groupId, String userId) throws ApiException * @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 -
400 Bad request error response when deleting a group invite -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse deleteGroupInviteWithHttpInfo(String groupId, String userId) throws ApiException { + public ApiResponse deleteGroupInviteWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = deleteGroupInviteValidateBeforeCall(groupId, userId, null); return localVarApiClient.execute(localVarCall); } @@ -2621,14 +2691,15 @@ public ApiResponse deleteGroupInviteWithHttpInfo(String groupId, String us * @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 -
400 Bad request error response when deleting a group invite -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteGroupInviteAsync(String groupId, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupInviteAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteGroupInviteValidateBeforeCall(groupId, userId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -2642,14 +2713,15 @@ public okhttp3.Call deleteGroupInviteAsync(String groupId, String userId, final * @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 Response after deleting a group post. -
401 Error response due to missing auth cookie. -
404 Response after deleting a group post. -
*/ - public okhttp3.Call deleteGroupPostCall(String groupId, String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupPostCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2696,7 +2768,7 @@ public okhttp3.Call deleteGroupPostCall(String groupId, String notificationId, f } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteGroupPostValidateBeforeCall(String groupId, String notificationId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteGroupPostValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling deleteGroupPost(Async)"); @@ -2719,14 +2791,15 @@ private okhttp3.Call deleteGroupPostValidateBeforeCall(String groupId, String no * @return Success * @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 Response after deleting a group post. -
401 Error response due to missing auth cookie. -
404 Response after deleting a group post. -
*/ - public Success deleteGroupPost(String groupId, String notificationId) throws ApiException { + public Success deleteGroupPost(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId) throws ApiException { ApiResponse localVarResp = deleteGroupPostWithHttpInfo(groupId, notificationId); return localVarResp.getData(); } @@ -2739,14 +2812,15 @@ public Success deleteGroupPost(String groupId, String notificationId) throws Api * @return ApiResponse<Success> * @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 Response after deleting a group post. -
401 Error response due to missing auth cookie. -
404 Response after deleting a group post. -
*/ - public ApiResponse deleteGroupPostWithHttpInfo(String groupId, String notificationId) throws ApiException { + public ApiResponse deleteGroupPostWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId) throws ApiException { okhttp3.Call localVarCall = deleteGroupPostValidateBeforeCall(groupId, notificationId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2761,14 +2835,15 @@ public ApiResponse deleteGroupPostWithHttpInfo(String groupId, String n * @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 Response after deleting a group post. -
401 Error response due to missing auth cookie. -
404 Response after deleting a group post. -
*/ - public okhttp3.Call deleteGroupPostAsync(String groupId, String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupPostAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteGroupPostValidateBeforeCall(groupId, notificationId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2783,14 +2858,15 @@ public okhttp3.Call deleteGroupPostAsync(String groupId, String notificationId, * @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 list of GroupRole objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a group you are not member of. -
*/ - public okhttp3.Call deleteGroupRoleCall(String groupId, String groupRoleId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGroupRoleCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2837,7 +2913,7 @@ public okhttp3.Call deleteGroupRoleCall(String groupId, String groupRoleId, fina } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteGroupRoleValidateBeforeCall(String groupId, String groupRoleId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteGroupRoleValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling deleteGroupRole(Async)"); @@ -2860,14 +2936,15 @@ private okhttp3.Call deleteGroupRoleValidateBeforeCall(String groupId, String gr * @return List<GroupRole> * @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 list of GroupRole objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a group you are not member of. -
*/ - public List deleteGroupRole(String groupId, String groupRoleId) throws ApiException { + public List deleteGroupRole(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId) throws ApiException { ApiResponse> localVarResp = deleteGroupRoleWithHttpInfo(groupId, groupRoleId); return localVarResp.getData(); } @@ -2880,14 +2957,15 @@ public List deleteGroupRole(String groupId, String groupRoleId) throw * @return ApiResponse<List<GroupRole>> * @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 list of GroupRole objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a group you are not member of. -
*/ - public ApiResponse> deleteGroupRoleWithHttpInfo(String groupId, String groupRoleId) throws ApiException { + public ApiResponse> deleteGroupRoleWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId) throws ApiException { okhttp3.Call localVarCall = deleteGroupRoleValidateBeforeCall(groupId, groupRoleId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2902,14 +2980,15 @@ public ApiResponse> deleteGroupRoleWithHttpInfo(String groupId, * @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 list of GroupRole objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a group you are not member of. -
*/ - public okhttp3.Call deleteGroupRoleAsync(String groupId, String groupRoleId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call deleteGroupRoleAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = deleteGroupRoleValidateBeforeCall(groupId, groupRoleId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -2924,14 +3003,15 @@ public okhttp3.Call deleteGroupRoleAsync(String groupId, String groupRoleId, fin * @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 single Group object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupCall(String groupId, Boolean includeRoles, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean includeRoles, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2981,7 +3061,7 @@ public okhttp3.Call getGroupCall(String groupId, Boolean includeRoles, final Api } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupValidateBeforeCall(String groupId, Boolean includeRoles, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean includeRoles, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroup(Async)"); @@ -2999,14 +3079,15 @@ private okhttp3.Call getGroupValidateBeforeCall(String groupId, Boolean includeR * @return Group * @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 single Group object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public Group getGroup(String groupId, Boolean includeRoles) throws ApiException { + public Group getGroup(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean includeRoles) throws ApiException { ApiResponse localVarResp = getGroupWithHttpInfo(groupId, includeRoles); return localVarResp.getData(); } @@ -3019,14 +3100,15 @@ public Group getGroup(String groupId, Boolean includeRoles) throws ApiException * @return ApiResponse<Group> * @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 single Group object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse getGroupWithHttpInfo(String groupId, Boolean includeRoles) throws ApiException { + public ApiResponse getGroupWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean includeRoles) throws ApiException { okhttp3.Call localVarCall = getGroupValidateBeforeCall(groupId, includeRoles, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3041,14 +3123,15 @@ public ApiResponse getGroupWithHttpInfo(String groupId, Boolean includeRo * @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 single Group object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupAsync(String groupId, Boolean includeRoles, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean includeRoles, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupValidateBeforeCall(groupId, includeRoles, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -3062,14 +3145,15 @@ public okhttp3.Call getGroupAsync(String groupId, Boolean includeRoles, final Ap * @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 single GroupAnnouncement object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupAnnouncementsCall(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupAnnouncementsCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3115,7 +3199,7 @@ public okhttp3.Call getGroupAnnouncementsCall(String groupId, final ApiCallback } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupAnnouncementsValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupAnnouncementsValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupAnnouncements(Async)"); @@ -3132,14 +3216,15 @@ private okhttp3.Call getGroupAnnouncementsValidateBeforeCall(String groupId, fin * @return GroupAnnouncement * @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 single GroupAnnouncement object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupAnnouncement getGroupAnnouncements(String groupId) throws ApiException { + public GroupAnnouncement getGroupAnnouncements(@javax.annotation.Nonnull String groupId) throws ApiException { ApiResponse localVarResp = getGroupAnnouncementsWithHttpInfo(groupId); return localVarResp.getData(); } @@ -3151,14 +3236,15 @@ public GroupAnnouncement getGroupAnnouncements(String groupId) throws ApiExcepti * @return ApiResponse<GroupAnnouncement> * @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 single GroupAnnouncement object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse getGroupAnnouncementsWithHttpInfo(String groupId) throws ApiException { + public ApiResponse getGroupAnnouncementsWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = getGroupAnnouncementsValidateBeforeCall(groupId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3172,14 +3258,15 @@ public ApiResponse getGroupAnnouncementsWithHttpInfo(String g * @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 single GroupAnnouncement object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupAnnouncementsAsync(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupAnnouncementsAsync(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupAnnouncementsValidateBeforeCall(groupId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -3193,14 +3280,15 @@ public okhttp3.Call getGroupAnnouncementsAsync(String groupId, final ApiCallback * @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 list of GroupAuditLogEntryTypes. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupAuditLogEntryTypesCall(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupAuditLogEntryTypesCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3246,7 +3334,7 @@ public okhttp3.Call getGroupAuditLogEntryTypesCall(String groupId, final ApiCall } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupAuditLogEntryTypesValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupAuditLogEntryTypesValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupAuditLogEntryTypes(Async)"); @@ -3263,14 +3351,15 @@ private okhttp3.Call getGroupAuditLogEntryTypesValidateBeforeCall(String groupId * @return List<String> * @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 list of GroupAuditLogEntryTypes. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public List getGroupAuditLogEntryTypes(String groupId) throws ApiException { + public List getGroupAuditLogEntryTypes(@javax.annotation.Nonnull String groupId) throws ApiException { ApiResponse> localVarResp = getGroupAuditLogEntryTypesWithHttpInfo(groupId); return localVarResp.getData(); } @@ -3282,14 +3371,15 @@ public List getGroupAuditLogEntryTypes(String groupId) throws ApiExcepti * @return ApiResponse<List<String>> * @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 list of GroupAuditLogEntryTypes. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse> getGroupAuditLogEntryTypesWithHttpInfo(String groupId) throws ApiException { + public ApiResponse> getGroupAuditLogEntryTypesWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = getGroupAuditLogEntryTypesValidateBeforeCall(groupId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3303,14 +3393,15 @@ public ApiResponse> getGroupAuditLogEntryTypesWithHttpInfo(String g * @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 list of GroupAuditLogEntryTypes. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupAuditLogEntryTypesAsync(String groupId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGroupAuditLogEntryTypesAsync(@javax.annotation.Nonnull String groupId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getGroupAuditLogEntryTypesValidateBeforeCall(groupId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -3331,14 +3422,15 @@ public okhttp3.Call getGroupAuditLogEntryTypesAsync(String groupId, final ApiCal * @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 list of GroupAudit objects, wrapped in new pagination format. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupAuditLogsCall(String groupId, Integer n, Integer offset, OffsetDateTime startDate, OffsetDateTime endDate, String actorIds, String eventTypes, String targetIds, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupAuditLogsCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable OffsetDateTime startDate, @javax.annotation.Nullable OffsetDateTime endDate, @javax.annotation.Nullable String actorIds, @javax.annotation.Nullable String eventTypes, @javax.annotation.Nullable String targetIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3412,7 +3504,7 @@ public okhttp3.Call getGroupAuditLogsCall(String groupId, Integer n, Integer off } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupAuditLogsValidateBeforeCall(String groupId, Integer n, Integer offset, OffsetDateTime startDate, OffsetDateTime endDate, String actorIds, String eventTypes, String targetIds, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupAuditLogsValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable OffsetDateTime startDate, @javax.annotation.Nullable OffsetDateTime endDate, @javax.annotation.Nullable String actorIds, @javax.annotation.Nullable String eventTypes, @javax.annotation.Nullable String targetIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupAuditLogs(Async)"); @@ -3436,14 +3528,15 @@ private okhttp3.Call getGroupAuditLogsValidateBeforeCall(String groupId, Integer * @return PaginatedGroupAuditLogEntryList * @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 list of GroupAudit objects, wrapped in new pagination format. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public PaginatedGroupAuditLogEntryList getGroupAuditLogs(String groupId, Integer n, Integer offset, OffsetDateTime startDate, OffsetDateTime endDate, String actorIds, String eventTypes, String targetIds) throws ApiException { + public PaginatedGroupAuditLogEntryList getGroupAuditLogs(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable OffsetDateTime startDate, @javax.annotation.Nullable OffsetDateTime endDate, @javax.annotation.Nullable String actorIds, @javax.annotation.Nullable String eventTypes, @javax.annotation.Nullable String targetIds) throws ApiException { ApiResponse localVarResp = getGroupAuditLogsWithHttpInfo(groupId, n, offset, startDate, endDate, actorIds, eventTypes, targetIds); return localVarResp.getData(); } @@ -3462,14 +3555,15 @@ public PaginatedGroupAuditLogEntryList getGroupAuditLogs(String groupId, Integer * @return ApiResponse<PaginatedGroupAuditLogEntryList> * @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 list of GroupAudit objects, wrapped in new pagination format. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse getGroupAuditLogsWithHttpInfo(String groupId, Integer n, Integer offset, OffsetDateTime startDate, OffsetDateTime endDate, String actorIds, String eventTypes, String targetIds) throws ApiException { + public ApiResponse getGroupAuditLogsWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable OffsetDateTime startDate, @javax.annotation.Nullable OffsetDateTime endDate, @javax.annotation.Nullable String actorIds, @javax.annotation.Nullable String eventTypes, @javax.annotation.Nullable String targetIds) throws ApiException { okhttp3.Call localVarCall = getGroupAuditLogsValidateBeforeCall(groupId, n, offset, startDate, endDate, actorIds, eventTypes, targetIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3490,14 +3584,15 @@ public ApiResponse getGroupAuditLogsWithHttpInf * @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 list of GroupAudit objects, wrapped in new pagination format. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupAuditLogsAsync(String groupId, Integer n, Integer offset, OffsetDateTime startDate, OffsetDateTime endDate, String actorIds, String eventTypes, String targetIds, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupAuditLogsAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable OffsetDateTime startDate, @javax.annotation.Nullable OffsetDateTime endDate, @javax.annotation.Nullable String actorIds, @javax.annotation.Nullable String eventTypes, @javax.annotation.Nullable String targetIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupAuditLogsValidateBeforeCall(groupId, n, offset, startDate, endDate, actorIds, eventTypes, targetIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -3513,7 +3608,8 @@ public okhttp3.Call getGroupAuditLogsAsync(String groupId, Integer n, Integer of * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -3521,7 +3617,7 @@ public okhttp3.Call getGroupAuditLogsAsync(String groupId, Integer n, Integer of
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupBansCall(String groupId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupBansCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3575,7 +3671,7 @@ public okhttp3.Call getGroupBansCall(String groupId, Integer n, Integer offset, } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupBansValidateBeforeCall(String groupId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupBansValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupBans(Async)"); @@ -3594,7 +3690,8 @@ private okhttp3.Call getGroupBansValidateBeforeCall(String groupId, Integer n, I * @return List<GroupMember> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -3602,7 +3699,7 @@ private okhttp3.Call getGroupBansValidateBeforeCall(String groupId, Integer n, I
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public List getGroupBans(String groupId, Integer n, Integer offset) throws ApiException { + public List getGroupBans(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = getGroupBansWithHttpInfo(groupId, n, offset); return localVarResp.getData(); } @@ -3616,7 +3713,8 @@ public List getGroupBans(String groupId, Integer n, Integer offset) * @return ApiResponse<List<GroupMember>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -3624,7 +3722,7 @@ public List getGroupBans(String groupId, Integer n, Integer offset)
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse> getGroupBansWithHttpInfo(String groupId, Integer n, Integer offset) throws ApiException { + public ApiResponse> getGroupBansWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getGroupBansValidateBeforeCall(groupId, n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3640,7 +3738,8 @@ public ApiResponse> getGroupBansWithHttpInfo(String groupId, I * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -3648,7 +3747,7 @@ public ApiResponse> getGroupBansWithHttpInfo(String groupId, I
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupBansAsync(String groupId, Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGroupBansAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getGroupBansValidateBeforeCall(groupId, n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -3666,14 +3765,15 @@ public okhttp3.Call getGroupBansAsync(String groupId, Integer n, Integer offset, * @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 list of GroupGalleryImage objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupGalleryImagesCall(String groupId, String groupGalleryId, Integer n, Integer offset, Boolean approved, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupGalleryImagesCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean approved, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3732,7 +3832,7 @@ public okhttp3.Call getGroupGalleryImagesCall(String groupId, String groupGaller } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupGalleryImagesValidateBeforeCall(String groupId, String groupGalleryId, Integer n, Integer offset, Boolean approved, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupGalleryImagesValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean approved, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupGalleryImages(Async)"); @@ -3758,14 +3858,15 @@ private okhttp3.Call getGroupGalleryImagesValidateBeforeCall(String groupId, Str * @return List<GroupGalleryImage> * @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 list of GroupGalleryImage objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public List getGroupGalleryImages(String groupId, String groupGalleryId, Integer n, Integer offset, Boolean approved) throws ApiException { + public List getGroupGalleryImages(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean approved) throws ApiException { ApiResponse> localVarResp = getGroupGalleryImagesWithHttpInfo(groupId, groupGalleryId, n, offset, approved); return localVarResp.getData(); } @@ -3781,14 +3882,15 @@ public List getGroupGalleryImages(String groupId, String grou * @return ApiResponse<List<GroupGalleryImage>> * @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 list of GroupGalleryImage objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse> getGroupGalleryImagesWithHttpInfo(String groupId, String groupGalleryId, Integer n, Integer offset, Boolean approved) throws ApiException { + public ApiResponse> getGroupGalleryImagesWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean approved) throws ApiException { okhttp3.Call localVarCall = getGroupGalleryImagesValidateBeforeCall(groupId, groupGalleryId, n, offset, approved, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3806,14 +3908,15 @@ public ApiResponse> getGroupGalleryImagesWithHttpInfo(St * @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 list of GroupGalleryImage objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupGalleryImagesAsync(String groupId, String groupGalleryId, Integer n, Integer offset, Boolean approved, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGroupGalleryImagesAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean approved, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getGroupGalleryImagesValidateBeforeCall(groupId, groupGalleryId, n, offset, approved, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -3827,14 +3930,15 @@ public okhttp3.Call getGroupGalleryImagesAsync(String groupId, String groupGalle * @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 list of GroupInstance objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupInstancesCall(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupInstancesCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3880,7 +3984,7 @@ public okhttp3.Call getGroupInstancesCall(String groupId, final ApiCallback _cal } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupInstancesValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupInstancesValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupInstances(Async)"); @@ -3897,14 +4001,15 @@ private okhttp3.Call getGroupInstancesValidateBeforeCall(String groupId, final A * @return List<GroupInstance> * @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 list of GroupInstance objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public List getGroupInstances(String groupId) throws ApiException { + public List getGroupInstances(@javax.annotation.Nonnull String groupId) throws ApiException { ApiResponse> localVarResp = getGroupInstancesWithHttpInfo(groupId); return localVarResp.getData(); } @@ -3916,14 +4021,15 @@ public List getGroupInstances(String groupId) throws ApiException * @return ApiResponse<List<GroupInstance>> * @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 list of GroupInstance objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse> getGroupInstancesWithHttpInfo(String groupId) throws ApiException { + public ApiResponse> getGroupInstancesWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = getGroupInstancesValidateBeforeCall(groupId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3937,14 +4043,15 @@ public ApiResponse> getGroupInstancesWithHttpInfo(String gro * @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 list of GroupInstance objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupInstancesAsync(String groupId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGroupInstancesAsync(@javax.annotation.Nonnull String groupId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getGroupInstancesValidateBeforeCall(groupId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -3960,7 +4067,8 @@ public okhttp3.Call getGroupInstancesAsync(String groupId, final ApiCallback + + @@ -3968,7 +4076,7 @@ public okhttp3.Call getGroupInstancesAsync(String groupId, final ApiCallback
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupInvitesCall(String groupId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupInvitesCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4022,7 +4130,7 @@ public okhttp3.Call getGroupInvitesCall(String groupId, Integer n, Integer offse } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupInvitesValidateBeforeCall(String groupId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupInvitesValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupInvites(Async)"); @@ -4041,7 +4149,8 @@ private okhttp3.Call getGroupInvitesValidateBeforeCall(String groupId, Integer n * @return List<GroupMember> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -4049,7 +4158,7 @@ private okhttp3.Call getGroupInvitesValidateBeforeCall(String groupId, Integer n
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public List getGroupInvites(String groupId, Integer n, Integer offset) throws ApiException { + public List getGroupInvites(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = getGroupInvitesWithHttpInfo(groupId, n, offset); return localVarResp.getData(); } @@ -4063,7 +4172,8 @@ public List getGroupInvites(String groupId, Integer n, Integer offs * @return ApiResponse<List<GroupMember>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -4071,7 +4181,7 @@ public List getGroupInvites(String groupId, Integer n, Integer offs
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse> getGroupInvitesWithHttpInfo(String groupId, Integer n, Integer offset) throws ApiException { + public ApiResponse> getGroupInvitesWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getGroupInvitesValidateBeforeCall(groupId, n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -4087,7 +4197,8 @@ public ApiResponse> getGroupInvitesWithHttpInfo(String groupId * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -4095,7 +4206,7 @@ public ApiResponse> getGroupInvitesWithHttpInfo(String groupId
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupInvitesAsync(String groupId, Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGroupInvitesAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getGroupInvitesValidateBeforeCall(groupId, n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -4110,7 +4221,8 @@ public okhttp3.Call getGroupInvitesAsync(String groupId, Integer n, Integer offs * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -4118,7 +4230,7 @@ public okhttp3.Call getGroupInvitesAsync(String groupId, Integer n, Integer offs
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupMemberCall(String groupId, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupMemberCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4165,7 +4277,7 @@ public okhttp3.Call getGroupMemberCall(String groupId, String userId, final ApiC } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupMemberValidateBeforeCall(String groupId, String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupMemberValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupMember(Async)"); @@ -4188,7 +4300,8 @@ private okhttp3.Call getGroupMemberValidateBeforeCall(String groupId, String use * @return GroupMember * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -4196,7 +4309,7 @@ private okhttp3.Call getGroupMemberValidateBeforeCall(String groupId, String use
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupMember getGroupMember(String groupId, String userId) throws ApiException { + public GroupMember getGroupMember(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getGroupMemberWithHttpInfo(groupId, userId); return localVarResp.getData(); } @@ -4209,7 +4322,8 @@ public GroupMember getGroupMember(String groupId, String userId) throws ApiExcep * @return ApiResponse<GroupMember> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -4217,7 +4331,7 @@ public GroupMember getGroupMember(String groupId, String userId) throws ApiExcep
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse getGroupMemberWithHttpInfo(String groupId, String userId) throws ApiException { + public ApiResponse getGroupMemberWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getGroupMemberValidateBeforeCall(groupId, userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -4232,7 +4346,8 @@ public ApiResponse getGroupMemberWithHttpInfo(String groupId, Strin * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -4240,7 +4355,7 @@ public ApiResponse getGroupMemberWithHttpInfo(String groupId, Strin
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupMemberAsync(String groupId, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupMemberAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupMemberValidateBeforeCall(groupId, userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -4258,7 +4373,8 @@ public okhttp3.Call getGroupMemberAsync(String groupId, String userId, final Api * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -4266,7 +4382,7 @@ public okhttp3.Call getGroupMemberAsync(String groupId, String userId, final Api
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupMembersCall(String groupId, Integer n, Integer offset, GroupSearchSort sort, String roleId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupMembersCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable GroupSearchSort sort, @javax.annotation.Nullable String roleId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4328,7 +4444,7 @@ public okhttp3.Call getGroupMembersCall(String groupId, Integer n, Integer offse } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupMembersValidateBeforeCall(String groupId, Integer n, Integer offset, GroupSearchSort sort, String roleId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupMembersValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable GroupSearchSort sort, @javax.annotation.Nullable String roleId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupMembers(Async)"); @@ -4349,7 +4465,8 @@ private okhttp3.Call getGroupMembersValidateBeforeCall(String groupId, Integer n * @return List<GroupMember> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -4357,7 +4474,7 @@ private okhttp3.Call getGroupMembersValidateBeforeCall(String groupId, Integer n
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public List getGroupMembers(String groupId, Integer n, Integer offset, GroupSearchSort sort, String roleId) throws ApiException { + public List getGroupMembers(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable GroupSearchSort sort, @javax.annotation.Nullable String roleId) throws ApiException { ApiResponse> localVarResp = getGroupMembersWithHttpInfo(groupId, n, offset, sort, roleId); return localVarResp.getData(); } @@ -4373,7 +4490,8 @@ public List getGroupMembers(String groupId, Integer n, Integer offs * @return ApiResponse<List<GroupMember>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -4381,7 +4499,7 @@ public List getGroupMembers(String groupId, Integer n, Integer offs
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse> getGroupMembersWithHttpInfo(String groupId, Integer n, Integer offset, GroupSearchSort sort, String roleId) throws ApiException { + public ApiResponse> getGroupMembersWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable GroupSearchSort sort, @javax.annotation.Nullable String roleId) throws ApiException { okhttp3.Call localVarCall = getGroupMembersValidateBeforeCall(groupId, n, offset, sort, roleId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -4399,7 +4517,8 @@ public ApiResponse> getGroupMembersWithHttpInfo(String groupId * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -4407,7 +4526,7 @@ public ApiResponse> getGroupMembersWithHttpInfo(String groupId
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupMembersAsync(String groupId, Integer n, Integer offset, GroupSearchSort sort, String roleId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGroupMembersAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable GroupSearchSort sort, @javax.annotation.Nullable String roleId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getGroupMembersValidateBeforeCall(groupId, n, offset, sort, roleId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -4421,7 +4540,8 @@ public okhttp3.Call getGroupMembersAsync(String groupId, Integer n, Integer offs * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -4429,7 +4549,7 @@ public okhttp3.Call getGroupMembersAsync(String groupId, Integer n, Integer offs
Response Details
Status Code Description Response Headers
200 Returns a list of GroupPermission objects. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupPermissionsCall(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupPermissionsCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4475,7 +4595,7 @@ public okhttp3.Call getGroupPermissionsCall(String groupId, final ApiCallback _c } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupPermissionsValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupPermissionsValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupPermissions(Async)"); @@ -4492,7 +4612,8 @@ private okhttp3.Call getGroupPermissionsValidateBeforeCall(String groupId, final * @return List<GroupPermission> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -4500,7 +4621,7 @@ private okhttp3.Call getGroupPermissionsValidateBeforeCall(String groupId, final
Response Details
Status Code Description Response Headers
200 Returns a list of GroupPermission objects. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public List getGroupPermissions(String groupId) throws ApiException { + public List getGroupPermissions(@javax.annotation.Nonnull String groupId) throws ApiException { ApiResponse> localVarResp = getGroupPermissionsWithHttpInfo(groupId); return localVarResp.getData(); } @@ -4512,7 +4633,8 @@ public List getGroupPermissions(String groupId) throws ApiExcep * @return ApiResponse<List<GroupPermission>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -4520,7 +4642,7 @@ public List getGroupPermissions(String groupId) throws ApiExcep
Response Details
Status Code Description Response Headers
200 Returns a list of GroupPermission objects. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse> getGroupPermissionsWithHttpInfo(String groupId) throws ApiException { + public ApiResponse> getGroupPermissionsWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = getGroupPermissionsValidateBeforeCall(groupId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -4534,7 +4656,8 @@ public ApiResponse> getGroupPermissionsWithHttpInfo(String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -4542,7 +4665,7 @@ public ApiResponse> getGroupPermissionsWithHttpInfo(String
Response Details
Status Code Description Response Headers
200 Returns a list of GroupPermission objects. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupPermissionsAsync(String groupId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGroupPermissionsAsync(@javax.annotation.Nonnull String groupId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getGroupPermissionsValidateBeforeCall(groupId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -4559,13 +4682,14 @@ public okhttp3.Call getGroupPermissionsAsync(String groupId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a GroupPost Array. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getGroupPostsCall(String groupId, Integer n, Integer offset, Boolean publicOnly, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupPostsCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean publicOnly, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4623,7 +4747,7 @@ public okhttp3.Call getGroupPostsCall(String groupId, Integer n, Integer offset, } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupPostsValidateBeforeCall(String groupId, Integer n, Integer offset, Boolean publicOnly, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupPostsValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean publicOnly, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupPosts(Async)"); @@ -4643,13 +4767,14 @@ private okhttp3.Call getGroupPostsValidateBeforeCall(String groupId, Integer n, * @return GetGroupPosts200Response * @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 GroupPost Array. -
401 Error response due to missing auth cookie. -
*/ - public GetGroupPosts200Response getGroupPosts(String groupId, Integer n, Integer offset, Boolean publicOnly) throws ApiException { + public GetGroupPosts200Response getGroupPosts(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean publicOnly) throws ApiException { ApiResponse localVarResp = getGroupPostsWithHttpInfo(groupId, n, offset, publicOnly); return localVarResp.getData(); } @@ -4664,13 +4789,14 @@ public GetGroupPosts200Response getGroupPosts(String groupId, Integer n, Integer * @return ApiResponse<GetGroupPosts200Response> * @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 GroupPost Array. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getGroupPostsWithHttpInfo(String groupId, Integer n, Integer offset, Boolean publicOnly) throws ApiException { + public ApiResponse getGroupPostsWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean publicOnly) throws ApiException { okhttp3.Call localVarCall = getGroupPostsValidateBeforeCall(groupId, n, offset, publicOnly, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -4687,13 +4813,14 @@ public ApiResponse getGroupPostsWithHttpInfo(String gr * @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 GroupPost Array. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getGroupPostsAsync(String groupId, Integer n, Integer offset, Boolean publicOnly, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupPostsAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean publicOnly, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupPostsValidateBeforeCall(groupId, n, offset, publicOnly, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -4710,7 +4837,8 @@ public okhttp3.Call getGroupPostsAsync(String groupId, Integer n, Integer offset * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -4718,7 +4846,7 @@ public okhttp3.Call getGroupPostsAsync(String groupId, Integer n, Integer offset
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Bad request error response when responding to a group join request -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupRequestsCall(String groupId, Integer n, Integer offset, Boolean blocked, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupRequestsCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean blocked, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4776,7 +4904,7 @@ public okhttp3.Call getGroupRequestsCall(String groupId, Integer n, Integer offs } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupRequestsValidateBeforeCall(String groupId, Integer n, Integer offset, Boolean blocked, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupRequestsValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean blocked, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupRequests(Async)"); @@ -4796,7 +4924,8 @@ private okhttp3.Call getGroupRequestsValidateBeforeCall(String groupId, Integer * @return List<GroupMember> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -4804,7 +4933,7 @@ private okhttp3.Call getGroupRequestsValidateBeforeCall(String groupId, Integer
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Bad request error response when responding to a group join request -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public List getGroupRequests(String groupId, Integer n, Integer offset, Boolean blocked) throws ApiException { + public List getGroupRequests(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean blocked) throws ApiException { ApiResponse> localVarResp = getGroupRequestsWithHttpInfo(groupId, n, offset, blocked); return localVarResp.getData(); } @@ -4819,7 +4948,8 @@ public List getGroupRequests(String groupId, Integer n, Integer off * @return ApiResponse<List<GroupMember>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -4827,7 +4957,7 @@ public List getGroupRequests(String groupId, Integer n, Integer off
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Bad request error response when responding to a group join request -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse> getGroupRequestsWithHttpInfo(String groupId, Integer n, Integer offset, Boolean blocked) throws ApiException { + public ApiResponse> getGroupRequestsWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean blocked) throws ApiException { okhttp3.Call localVarCall = getGroupRequestsValidateBeforeCall(groupId, n, offset, blocked, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -4844,7 +4974,8 @@ public ApiResponse> getGroupRequestsWithHttpInfo(String groupI * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -4852,7 +4983,7 @@ public ApiResponse> getGroupRequestsWithHttpInfo(String groupI
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Bad request error response when responding to a group join request -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupRequestsAsync(String groupId, Integer n, Integer offset, Boolean blocked, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGroupRequestsAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean blocked, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getGroupRequestsValidateBeforeCall(groupId, n, offset, blocked, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -4865,7 +4996,8 @@ public okhttp3.Call getGroupRequestsAsync(String groupId, Integer n, Integer off * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -4927,7 +5059,8 @@ private okhttp3.Call getGroupRoleTemplatesValidateBeforeCall(final ApiCallback _ * @return Map<String, GroupRoleTemplateValues> * @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 dictionary of GroupRoleTemplate objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -4944,7 +5077,8 @@ public Map getGroupRoleTemplates() throws ApiEx * @return ApiResponse<Map<String, GroupRoleTemplateValues>> * @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 dictionary of GroupRoleTemplate objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -4963,7 +5097,8 @@ public ApiResponse> getGroupRoleTemplatesWi * @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 dictionary of GroupRoleTemplate objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -4983,14 +5118,15 @@ public okhttp3.Call getGroupRoleTemplatesAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns a dictionary of GroupRoleTemplate objects. -
401 Error response due to missing auth cookie. -
+
Response Details
Status Code Description Response Headers
200 Returns a list of GroupRole objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupRolesCall(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupRolesCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5036,7 +5172,7 @@ public okhttp3.Call getGroupRolesCall(String groupId, final ApiCallback _callbac } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupRolesValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupRolesValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupRoles(Async)"); @@ -5053,14 +5189,15 @@ private okhttp3.Call getGroupRolesValidateBeforeCall(String groupId, final ApiCa * @return List<GroupRole> * @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 list of GroupRole objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public List getGroupRoles(String groupId) throws ApiException { + public List getGroupRoles(@javax.annotation.Nonnull String groupId) throws ApiException { ApiResponse> localVarResp = getGroupRolesWithHttpInfo(groupId); return localVarResp.getData(); } @@ -5072,14 +5209,15 @@ public List getGroupRoles(String groupId) throws ApiException { * @return ApiResponse<List<GroupRole>> * @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 list of GroupRole objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse> getGroupRolesWithHttpInfo(String groupId) throws ApiException { + public ApiResponse> getGroupRolesWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = getGroupRolesValidateBeforeCall(groupId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -5093,14 +5231,15 @@ public ApiResponse> getGroupRolesWithHttpInfo(String groupId) th * @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 list of GroupRole objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupRolesAsync(String groupId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getGroupRolesAsync(@javax.annotation.Nonnull String groupId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getGroupRolesValidateBeforeCall(groupId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -5115,7 +5254,8 @@ public okhttp3.Call getGroupRolesAsync(String groupId, final ApiCallback + + @@ -5123,7 +5263,7 @@ public okhttp3.Call getGroupRolesAsync(String groupId, final ApiCallback
Response Details
Status Code Description Response Headers
200 Returns a single GroupTransferable object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupTransferabilityCall(String groupId, String transferTargetId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupTransferabilityCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable String transferTargetId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5173,7 +5313,7 @@ public okhttp3.Call getGroupTransferabilityCall(String groupId, String transferT } @SuppressWarnings("rawtypes") - private okhttp3.Call getGroupTransferabilityValidateBeforeCall(String groupId, String transferTargetId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getGroupTransferabilityValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable String transferTargetId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroupTransferability(Async)"); @@ -5191,7 +5331,8 @@ private okhttp3.Call getGroupTransferabilityValidateBeforeCall(String groupId, S * @return GroupTransferable * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -5199,7 +5340,7 @@ private okhttp3.Call getGroupTransferabilityValidateBeforeCall(String groupId, S
Response Details
Status Code Description Response Headers
200 Returns a single GroupTransferable object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupTransferable getGroupTransferability(String groupId, String transferTargetId) throws ApiException { + public GroupTransferable getGroupTransferability(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable String transferTargetId) throws ApiException { ApiResponse localVarResp = getGroupTransferabilityWithHttpInfo(groupId, transferTargetId); return localVarResp.getData(); } @@ -5212,7 +5353,8 @@ public GroupTransferable getGroupTransferability(String groupId, String transfer * @return ApiResponse<GroupTransferable> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -5220,7 +5362,7 @@ public GroupTransferable getGroupTransferability(String groupId, String transfer
Response Details
Status Code Description Response Headers
200 Returns a single GroupTransferable object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse getGroupTransferabilityWithHttpInfo(String groupId, String transferTargetId) throws ApiException { + public ApiResponse getGroupTransferabilityWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable String transferTargetId) throws ApiException { okhttp3.Call localVarCall = getGroupTransferabilityValidateBeforeCall(groupId, transferTargetId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -5235,7 +5377,8 @@ public ApiResponse getGroupTransferabilityWithHttpInfo(String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -5243,7 +5386,7 @@ public ApiResponse getGroupTransferabilityWithHttpInfo(String
Response Details
Status Code Description Response Headers
200 Returns a single GroupTransferable object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call getGroupTransferabilityAsync(String groupId, String transferTargetId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getGroupTransferabilityAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable String transferTargetId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getGroupTransferabilityValidateBeforeCall(groupId, transferTargetId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -5258,7 +5401,8 @@ public okhttp3.Call getGroupTransferabilityAsync(String groupId, String transfer * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -5266,7 +5410,7 @@ public okhttp3.Call getGroupTransferabilityAsync(String groupId, String transfer
Response Details
Status Code Description Response Headers
200 Successful response after initiating or completing a group transfer. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call initiateOrAcceptGroupTransferCall(String groupId, TransferGroupRequest transferGroupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call initiateOrAcceptGroupTransferCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable TransferGroupRequest transferGroupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5313,7 +5457,7 @@ public okhttp3.Call initiateOrAcceptGroupTransferCall(String groupId, TransferGr } @SuppressWarnings("rawtypes") - private okhttp3.Call initiateOrAcceptGroupTransferValidateBeforeCall(String groupId, TransferGroupRequest transferGroupRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call initiateOrAcceptGroupTransferValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable TransferGroupRequest transferGroupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling initiateOrAcceptGroupTransfer(Async)"); @@ -5325,13 +5469,14 @@ private okhttp3.Call initiateOrAcceptGroupTransferValidateBeforeCall(String grou /** * Initiate or Accept Group Transfer - * To initiate, must be logged in as the current owner and specify the transferTargetId in the body. To accept, must be logged in as the user targetted by a pending transfer, no body is required. + * To initiate, must be logged in as the current owner and specify the transferTargetId in the body. To accept, must be logged in as the user targeted by a pending transfer, no body is required. * @param groupId Must be a valid group ID. (required) * @param transferGroupRequest (optional) * @return Success * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -5339,20 +5484,21 @@ private okhttp3.Call initiateOrAcceptGroupTransferValidateBeforeCall(String grou
Response Details
Status Code Description Response Headers
200 Successful response after initiating or completing a group transfer. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public Success initiateOrAcceptGroupTransfer(String groupId, TransferGroupRequest transferGroupRequest) throws ApiException { + public Success initiateOrAcceptGroupTransfer(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable TransferGroupRequest transferGroupRequest) throws ApiException { ApiResponse localVarResp = initiateOrAcceptGroupTransferWithHttpInfo(groupId, transferGroupRequest); return localVarResp.getData(); } /** * Initiate or Accept Group Transfer - * To initiate, must be logged in as the current owner and specify the transferTargetId in the body. To accept, must be logged in as the user targetted by a pending transfer, no body is required. + * To initiate, must be logged in as the current owner and specify the transferTargetId in the body. To accept, must be logged in as the user targeted by a pending transfer, no body is required. * @param groupId Must be a valid group ID. (required) * @param transferGroupRequest (optional) * @return ApiResponse<Success> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -5360,7 +5506,7 @@ public Success initiateOrAcceptGroupTransfer(String groupId, TransferGroupReques
Response Details
Status Code Description Response Headers
200 Successful response after initiating or completing a group transfer. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse initiateOrAcceptGroupTransferWithHttpInfo(String groupId, TransferGroupRequest transferGroupRequest) throws ApiException { + public ApiResponse initiateOrAcceptGroupTransferWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable TransferGroupRequest transferGroupRequest) throws ApiException { okhttp3.Call localVarCall = initiateOrAcceptGroupTransferValidateBeforeCall(groupId, transferGroupRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -5368,14 +5514,15 @@ public ApiResponse initiateOrAcceptGroupTransferWithHttpInfo(String gro /** * Initiate or Accept Group Transfer (asynchronously) - * To initiate, must be logged in as the current owner and specify the transferTargetId in the body. To accept, must be logged in as the user targetted by a pending transfer, no body is required. + * To initiate, must be logged in as the current owner and specify the transferTargetId in the body. To accept, must be logged in as the user targeted by a pending transfer, no body is required. * @param groupId Must be a valid group ID. (required) * @param transferGroupRequest (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 - +
+ @@ -5383,7 +5530,7 @@ public ApiResponse initiateOrAcceptGroupTransferWithHttpInfo(String gro
Response Details
Status Code Description Response Headers
200 Successful response after initiating or completing a group transfer. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call initiateOrAcceptGroupTransferAsync(String groupId, TransferGroupRequest transferGroupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call initiateOrAcceptGroupTransferAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable TransferGroupRequest transferGroupRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = initiateOrAcceptGroupTransferValidateBeforeCall(groupId, transferGroupRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -5399,7 +5546,8 @@ public okhttp3.Call initiateOrAcceptGroupTransferAsync(String groupId, TransferG * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -5407,7 +5555,7 @@ public okhttp3.Call initiateOrAcceptGroupTransferAsync(String groupId, TransferG
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Error response when trying to join a group that the user is already a member of. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call joinGroupCall(String groupId, Boolean confirmOverrideBlock, JoinGroupRequest joinGroupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call joinGroupCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean confirmOverrideBlock, @javax.annotation.Nullable JoinGroupRequest joinGroupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5458,7 +5606,7 @@ public okhttp3.Call joinGroupCall(String groupId, Boolean confirmOverrideBlock, } @SuppressWarnings("rawtypes") - private okhttp3.Call joinGroupValidateBeforeCall(String groupId, Boolean confirmOverrideBlock, JoinGroupRequest joinGroupRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call joinGroupValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean confirmOverrideBlock, @javax.annotation.Nullable JoinGroupRequest joinGroupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling joinGroup(Async)"); @@ -5477,7 +5625,8 @@ private okhttp3.Call joinGroupValidateBeforeCall(String groupId, Boolean confirm * @return GroupMember * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -5485,7 +5634,7 @@ private okhttp3.Call joinGroupValidateBeforeCall(String groupId, Boolean confirm
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Error response when trying to join a group that the user is already a member of. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupMember joinGroup(String groupId, Boolean confirmOverrideBlock, JoinGroupRequest joinGroupRequest) throws ApiException { + public GroupMember joinGroup(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean confirmOverrideBlock, @javax.annotation.Nullable JoinGroupRequest joinGroupRequest) throws ApiException { ApiResponse localVarResp = joinGroupWithHttpInfo(groupId, confirmOverrideBlock, joinGroupRequest); return localVarResp.getData(); } @@ -5499,7 +5648,8 @@ public GroupMember joinGroup(String groupId, Boolean confirmOverrideBlock, JoinG * @return ApiResponse<GroupMember> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -5507,7 +5657,7 @@ public GroupMember joinGroup(String groupId, Boolean confirmOverrideBlock, JoinG
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Error response when trying to join a group that the user is already a member of. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse joinGroupWithHttpInfo(String groupId, Boolean confirmOverrideBlock, JoinGroupRequest joinGroupRequest) throws ApiException { + public ApiResponse joinGroupWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean confirmOverrideBlock, @javax.annotation.Nullable JoinGroupRequest joinGroupRequest) throws ApiException { okhttp3.Call localVarCall = joinGroupValidateBeforeCall(groupId, confirmOverrideBlock, joinGroupRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -5523,7 +5673,8 @@ public ApiResponse joinGroupWithHttpInfo(String groupId, Boolean co * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -5531,7 +5682,7 @@ public ApiResponse joinGroupWithHttpInfo(String groupId, Boolean co
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
400 Error response when trying to join a group that the user is already a member of. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call joinGroupAsync(String groupId, Boolean confirmOverrideBlock, JoinGroupRequest joinGroupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call joinGroupAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean confirmOverrideBlock, @javax.annotation.Nullable JoinGroupRequest joinGroupRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = joinGroupValidateBeforeCall(groupId, confirmOverrideBlock, joinGroupRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -5546,7 +5697,8 @@ public okhttp3.Call joinGroupAsync(String groupId, Boolean confirmOverrideBlock, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -5554,7 +5706,7 @@ public okhttp3.Call joinGroupAsync(String groupId, Boolean confirmOverrideBlock,
Response Details
Status Code Description Response Headers
200 Successful response after deleting a group member. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call kickGroupMemberCall(String groupId, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call kickGroupMemberCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5601,7 +5753,7 @@ public okhttp3.Call kickGroupMemberCall(String groupId, String userId, final Api } @SuppressWarnings("rawtypes") - private okhttp3.Call kickGroupMemberValidateBeforeCall(String groupId, String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call kickGroupMemberValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling kickGroupMember(Async)"); @@ -5624,7 +5776,8 @@ private okhttp3.Call kickGroupMemberValidateBeforeCall(String groupId, String us * @return Success * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -5632,7 +5785,7 @@ private okhttp3.Call kickGroupMemberValidateBeforeCall(String groupId, String us
Response Details
Status Code Description Response Headers
200 Successful response after deleting a group member. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public Success kickGroupMember(String groupId, String userId) throws ApiException { + public Success kickGroupMember(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = kickGroupMemberWithHttpInfo(groupId, userId); return localVarResp.getData(); } @@ -5645,7 +5798,8 @@ public Success kickGroupMember(String groupId, String userId) throws ApiExceptio * @return ApiResponse<Success> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -5653,7 +5807,7 @@ public Success kickGroupMember(String groupId, String userId) throws ApiExceptio
Response Details
Status Code Description Response Headers
200 Successful response after deleting a group member. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse kickGroupMemberWithHttpInfo(String groupId, String userId) throws ApiException { + public ApiResponse kickGroupMemberWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = kickGroupMemberValidateBeforeCall(groupId, userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -5668,7 +5822,8 @@ public ApiResponse kickGroupMemberWithHttpInfo(String groupId, String u * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -5676,7 +5831,7 @@ public ApiResponse kickGroupMemberWithHttpInfo(String groupId, String u
Response Details
Status Code Description Response Headers
200 Successful response after deleting a group member. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call kickGroupMemberAsync(String groupId, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call kickGroupMemberAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = kickGroupMemberValidateBeforeCall(groupId, userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -5690,14 +5845,15 @@ public okhttp3.Call kickGroupMemberAsync(String groupId, String userId, final Ap * @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 -
403 Error response when trying to perform operations on a group you are not member of. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call leaveGroupCall(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call leaveGroupCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5743,7 +5899,7 @@ public okhttp3.Call leaveGroupCall(String groupId, final ApiCallback _callback) } @SuppressWarnings("rawtypes") - private okhttp3.Call leaveGroupValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call leaveGroupValidateBeforeCall(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling leaveGroup(Async)"); @@ -5759,14 +5915,15 @@ private okhttp3.Call leaveGroupValidateBeforeCall(String groupId, final ApiCallb * @param groupId Must be a valid group ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
403 Error response when trying to perform operations on a group you are not member of. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public void leaveGroup(String groupId) throws ApiException { + public void leaveGroup(@javax.annotation.Nonnull String groupId) throws ApiException { leaveGroupWithHttpInfo(groupId); } @@ -5777,14 +5934,15 @@ public void leaveGroup(String groupId) throws ApiException { * @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 -
403 Error response when trying to perform operations on a group you are not member of. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse leaveGroupWithHttpInfo(String groupId) throws ApiException { + public ApiResponse leaveGroupWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = leaveGroupValidateBeforeCall(groupId, null); return localVarApiClient.execute(localVarCall); } @@ -5797,14 +5955,15 @@ public ApiResponse leaveGroupWithHttpInfo(String groupId) throws ApiExcept * @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 -
403 Error response when trying to perform operations on a group you are not member of. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call leaveGroupAsync(String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call leaveGroupAsync(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = leaveGroupValidateBeforeCall(groupId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -5819,14 +5978,15 @@ public okhttp3.Call leaveGroupAsync(String groupId, final ApiCallback _cal * @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 list of GroupRoleID objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call removeGroupMemberRoleCall(String groupId, String userId, String groupRoleId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call removeGroupMemberRoleCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupRoleId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5874,7 +6034,7 @@ public okhttp3.Call removeGroupMemberRoleCall(String groupId, String userId, Str } @SuppressWarnings("rawtypes") - private okhttp3.Call removeGroupMemberRoleValidateBeforeCall(String groupId, String userId, String groupRoleId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call removeGroupMemberRoleValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupRoleId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling removeGroupMemberRole(Async)"); @@ -5903,14 +6063,15 @@ private okhttp3.Call removeGroupMemberRoleValidateBeforeCall(String groupId, Str * @return List<String> * @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 list of GroupRoleID objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public List removeGroupMemberRole(String groupId, String userId, String groupRoleId) throws ApiException { + public List removeGroupMemberRole(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupRoleId) throws ApiException { ApiResponse> localVarResp = removeGroupMemberRoleWithHttpInfo(groupId, userId, groupRoleId); return localVarResp.getData(); } @@ -5924,14 +6085,15 @@ public List removeGroupMemberRole(String groupId, String userId, String * @return ApiResponse<List<String>> * @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 list of GroupRoleID objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse> removeGroupMemberRoleWithHttpInfo(String groupId, String userId, String groupRoleId) throws ApiException { + public ApiResponse> removeGroupMemberRoleWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupRoleId) throws ApiException { okhttp3.Call localVarCall = removeGroupMemberRoleValidateBeforeCall(groupId, userId, groupRoleId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -5947,14 +6109,15 @@ public ApiResponse> removeGroupMemberRoleWithHttpInfo(String groupI * @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 list of GroupRoleID objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call removeGroupMemberRoleAsync(String groupId, String userId, String groupRoleId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call removeGroupMemberRoleAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupRoleId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = removeGroupMemberRoleValidateBeforeCall(groupId, userId, groupRoleId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -5970,14 +6133,15 @@ public okhttp3.Call removeGroupMemberRoleAsync(String groupId, String userId, St * @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. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call respondGroupJoinRequestCall(String groupId, String userId, RespondGroupJoinRequest respondGroupJoinRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call respondGroupJoinRequestCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull RespondGroupJoinRequest respondGroupJoinRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6025,7 +6189,7 @@ public okhttp3.Call respondGroupJoinRequestCall(String groupId, String userId, R } @SuppressWarnings("rawtypes") - private okhttp3.Call respondGroupJoinRequestValidateBeforeCall(String groupId, String userId, RespondGroupJoinRequest respondGroupJoinRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call respondGroupJoinRequestValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull RespondGroupJoinRequest respondGroupJoinRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling respondGroupJoinRequest(Async)"); @@ -6053,14 +6217,15 @@ private okhttp3.Call respondGroupJoinRequestValidateBeforeCall(String groupId, S * @param respondGroupJoinRequest (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 auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public void respondGroupJoinRequest(String groupId, String userId, RespondGroupJoinRequest respondGroupJoinRequest) throws ApiException { + public void respondGroupJoinRequest(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull RespondGroupJoinRequest respondGroupJoinRequest) throws ApiException { respondGroupJoinRequestWithHttpInfo(groupId, userId, respondGroupJoinRequest); } @@ -6073,14 +6238,15 @@ public void respondGroupJoinRequest(String groupId, String userId, RespondGroupJ * @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 auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse respondGroupJoinRequestWithHttpInfo(String groupId, String userId, RespondGroupJoinRequest respondGroupJoinRequest) throws ApiException { + public ApiResponse respondGroupJoinRequestWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull RespondGroupJoinRequest respondGroupJoinRequest) throws ApiException { okhttp3.Call localVarCall = respondGroupJoinRequestValidateBeforeCall(groupId, userId, respondGroupJoinRequest, null); return localVarApiClient.execute(localVarCall); } @@ -6095,14 +6261,15 @@ public ApiResponse respondGroupJoinRequestWithHttpInfo(String groupId, Str * @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. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call respondGroupJoinRequestAsync(String groupId, String userId, RespondGroupJoinRequest respondGroupJoinRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call respondGroupJoinRequestAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull RespondGroupJoinRequest respondGroupJoinRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = respondGroupJoinRequestValidateBeforeCall(groupId, userId, respondGroupJoinRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -6118,7 +6285,8 @@ public okhttp3.Call respondGroupJoinRequestAsync(String groupId, String userId, * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -6126,7 +6294,7 @@ public okhttp3.Call respondGroupJoinRequestAsync(String groupId, String userId,
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects from a search. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call searchGroupMembersCall(String groupId, String query, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchGroupMembersCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String query, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6184,7 +6352,7 @@ public okhttp3.Call searchGroupMembersCall(String groupId, String query, Integer } @SuppressWarnings("rawtypes") - private okhttp3.Call searchGroupMembersValidateBeforeCall(String groupId, String query, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchGroupMembersValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String query, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling searchGroupMembers(Async)"); @@ -6209,7 +6377,8 @@ private okhttp3.Call searchGroupMembersValidateBeforeCall(String groupId, String * @return SearchGroupMembers200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -6217,7 +6386,7 @@ private okhttp3.Call searchGroupMembersValidateBeforeCall(String groupId, String
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects from a search. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public SearchGroupMembers200Response searchGroupMembers(String groupId, String query, Integer n, Integer offset) throws ApiException { + public SearchGroupMembers200Response searchGroupMembers(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String query, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse localVarResp = searchGroupMembersWithHttpInfo(groupId, query, n, offset); return localVarResp.getData(); } @@ -6232,7 +6401,8 @@ public SearchGroupMembers200Response searchGroupMembers(String groupId, String q * @return ApiResponse<SearchGroupMembers200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -6240,7 +6410,7 @@ public SearchGroupMembers200Response searchGroupMembers(String groupId, String q
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects from a search. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse searchGroupMembersWithHttpInfo(String groupId, String query, Integer n, Integer offset) throws ApiException { + public ApiResponse searchGroupMembersWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String query, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = searchGroupMembersValidateBeforeCall(groupId, query, n, offset, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -6257,7 +6427,8 @@ public ApiResponse searchGroupMembersWithHttpInfo * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -6265,7 +6436,7 @@ public ApiResponse searchGroupMembersWithHttpInfo
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects from a search. -
400 Error response when trying to search list of users with an invalid request. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call searchGroupMembersAsync(String groupId, String query, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchGroupMembersAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String query, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = searchGroupMembersValidateBeforeCall(groupId, query, n, offset, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -6281,13 +6452,14 @@ public okhttp3.Call searchGroupMembersAsync(String groupId, String query, Intege * @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 list of LimitedGroup objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchGroupsCall(String query, Integer offset, Integer n, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchGroupsCall(@javax.annotation.Nullable String query, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6344,7 +6516,7 @@ public okhttp3.Call searchGroupsCall(String query, Integer offset, Integer n, fi } @SuppressWarnings("rawtypes") - private okhttp3.Call searchGroupsValidateBeforeCall(String query, Integer offset, Integer n, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchGroupsValidateBeforeCall(@javax.annotation.Nullable String query, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, final ApiCallback _callback) throws ApiException { return searchGroupsCall(query, offset, n, _callback); } @@ -6358,13 +6530,14 @@ private okhttp3.Call searchGroupsValidateBeforeCall(String query, Integer offset * @return List<LimitedGroup> * @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 list of LimitedGroup objects. -
401 Error response due to missing auth cookie. -
*/ - public List searchGroups(String query, Integer offset, Integer n) throws ApiException { + public List searchGroups(@javax.annotation.Nullable String query, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n) throws ApiException { ApiResponse> localVarResp = searchGroupsWithHttpInfo(query, offset, n); return localVarResp.getData(); } @@ -6378,13 +6551,14 @@ public List searchGroups(String query, Integer offset, Integer n) * @return ApiResponse<List<LimitedGroup>> * @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 list of LimitedGroup objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> searchGroupsWithHttpInfo(String query, Integer offset, Integer n) throws ApiException { + public ApiResponse> searchGroupsWithHttpInfo(@javax.annotation.Nullable String query, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n) throws ApiException { okhttp3.Call localVarCall = searchGroupsValidateBeforeCall(query, offset, n, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -6400,13 +6574,14 @@ public ApiResponse> searchGroupsWithHttpInfo(String query, In * @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 list of LimitedGroup objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchGroupsAsync(String query, Integer offset, Integer n, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call searchGroupsAsync(@javax.annotation.Nullable String query, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer n, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchGroupsValidateBeforeCall(query, offset, n, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -6421,14 +6596,15 @@ public okhttp3.Call searchGroupsAsync(String query, Integer offset, Integer n, f * @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 list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call unbanGroupMemberCall(String groupId, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unbanGroupMemberCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6475,7 +6651,7 @@ public okhttp3.Call unbanGroupMemberCall(String groupId, String userId, final Ap } @SuppressWarnings("rawtypes") - private okhttp3.Call unbanGroupMemberValidateBeforeCall(String groupId, String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call unbanGroupMemberValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling unbanGroupMember(Async)"); @@ -6498,14 +6674,15 @@ private okhttp3.Call unbanGroupMemberValidateBeforeCall(String groupId, String u * @return GroupMember * @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 list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupMember unbanGroupMember(String groupId, String userId) throws ApiException { + public GroupMember unbanGroupMember(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = unbanGroupMemberWithHttpInfo(groupId, userId); return localVarResp.getData(); } @@ -6518,14 +6695,15 @@ public GroupMember unbanGroupMember(String groupId, String userId) throws ApiExc * @return ApiResponse<GroupMember> * @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 list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse unbanGroupMemberWithHttpInfo(String groupId, String userId) throws ApiException { + public ApiResponse unbanGroupMemberWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = unbanGroupMemberValidateBeforeCall(groupId, userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -6540,14 +6718,15 @@ public ApiResponse unbanGroupMemberWithHttpInfo(String groupId, Str * @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 list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call unbanGroupMemberAsync(String groupId, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unbanGroupMemberAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = unbanGroupMemberValidateBeforeCall(groupId, userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -6562,14 +6741,15 @@ public okhttp3.Call unbanGroupMemberAsync(String groupId, String userId, final A * @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 single Group object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call updateGroupCall(String groupId, UpdateGroupRequest updateGroupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable UpdateGroupRequest updateGroupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6616,7 +6796,7 @@ public okhttp3.Call updateGroupCall(String groupId, UpdateGroupRequest updateGro } @SuppressWarnings("rawtypes") - private okhttp3.Call updateGroupValidateBeforeCall(String groupId, UpdateGroupRequest updateGroupRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateGroupValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable UpdateGroupRequest updateGroupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling updateGroup(Async)"); @@ -6634,14 +6814,15 @@ private okhttp3.Call updateGroupValidateBeforeCall(String groupId, UpdateGroupRe * @return Group * @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 single Group object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public Group updateGroup(String groupId, UpdateGroupRequest updateGroupRequest) throws ApiException { + public Group updateGroup(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable UpdateGroupRequest updateGroupRequest) throws ApiException { ApiResponse localVarResp = updateGroupWithHttpInfo(groupId, updateGroupRequest); return localVarResp.getData(); } @@ -6654,14 +6835,15 @@ public Group updateGroup(String groupId, UpdateGroupRequest updateGroupRequest) * @return ApiResponse<Group> * @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 single Group object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse updateGroupWithHttpInfo(String groupId, UpdateGroupRequest updateGroupRequest) throws ApiException { + public ApiResponse updateGroupWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable UpdateGroupRequest updateGroupRequest) throws ApiException { okhttp3.Call localVarCall = updateGroupValidateBeforeCall(groupId, updateGroupRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -6676,14 +6858,15 @@ public ApiResponse updateGroupWithHttpInfo(String groupId, UpdateGroupReq * @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 single Group object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call updateGroupAsync(String groupId, UpdateGroupRequest updateGroupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable UpdateGroupRequest updateGroupRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateGroupValidateBeforeCall(groupId, updateGroupRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -6699,14 +6882,15 @@ public okhttp3.Call updateGroupAsync(String groupId, UpdateGroupRequest updateGr * @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 single GroupGallery object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call updateGroupGalleryCall(String groupId, String groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupGalleryCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nullable UpdateGroupGalleryRequest updateGroupGalleryRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6754,7 +6938,7 @@ public okhttp3.Call updateGroupGalleryCall(String groupId, String groupGalleryId } @SuppressWarnings("rawtypes") - private okhttp3.Call updateGroupGalleryValidateBeforeCall(String groupId, String groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateGroupGalleryValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nullable UpdateGroupGalleryRequest updateGroupGalleryRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling updateGroupGallery(Async)"); @@ -6778,14 +6962,15 @@ private okhttp3.Call updateGroupGalleryValidateBeforeCall(String groupId, String * @return GroupGallery * @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 single GroupGallery object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupGallery updateGroupGallery(String groupId, String groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest) throws ApiException { + public GroupGallery updateGroupGallery(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nullable UpdateGroupGalleryRequest updateGroupGalleryRequest) throws ApiException { ApiResponse localVarResp = updateGroupGalleryWithHttpInfo(groupId, groupGalleryId, updateGroupGalleryRequest); return localVarResp.getData(); } @@ -6799,14 +6984,15 @@ public GroupGallery updateGroupGallery(String groupId, String groupGalleryId, Up * @return ApiResponse<GroupGallery> * @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 single GroupGallery object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse updateGroupGalleryWithHttpInfo(String groupId, String groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest) throws ApiException { + public ApiResponse updateGroupGalleryWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nullable UpdateGroupGalleryRequest updateGroupGalleryRequest) throws ApiException { okhttp3.Call localVarCall = updateGroupGalleryValidateBeforeCall(groupId, groupGalleryId, updateGroupGalleryRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -6822,14 +7008,15 @@ public ApiResponse updateGroupGalleryWithHttpInfo(String groupId, * @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 single GroupGallery object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call updateGroupGalleryAsync(String groupId, String groupGalleryId, UpdateGroupGalleryRequest updateGroupGalleryRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupGalleryAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, @javax.annotation.Nullable UpdateGroupGalleryRequest updateGroupGalleryRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateGroupGalleryValidateBeforeCall(groupId, groupGalleryId, updateGroupGalleryRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -6845,14 +7032,15 @@ public okhttp3.Call updateGroupGalleryAsync(String groupId, String groupGalleryI * @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 list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call updateGroupMemberCall(String groupId, String userId, UpdateGroupMemberRequest updateGroupMemberRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupMemberCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateGroupMemberRequest updateGroupMemberRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6900,7 +7088,7 @@ public okhttp3.Call updateGroupMemberCall(String groupId, String userId, UpdateG } @SuppressWarnings("rawtypes") - private okhttp3.Call updateGroupMemberValidateBeforeCall(String groupId, String userId, UpdateGroupMemberRequest updateGroupMemberRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateGroupMemberValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateGroupMemberRequest updateGroupMemberRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling updateGroupMember(Async)"); @@ -6924,14 +7112,15 @@ private okhttp3.Call updateGroupMemberValidateBeforeCall(String groupId, String * @return GroupMember * @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 list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public GroupMember updateGroupMember(String groupId, String userId, UpdateGroupMemberRequest updateGroupMemberRequest) throws ApiException { + public GroupMember updateGroupMember(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateGroupMemberRequest updateGroupMemberRequest) throws ApiException { ApiResponse localVarResp = updateGroupMemberWithHttpInfo(groupId, userId, updateGroupMemberRequest); return localVarResp.getData(); } @@ -6945,14 +7134,15 @@ public GroupMember updateGroupMember(String groupId, String userId, UpdateGroupM * @return ApiResponse<GroupMember> * @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 list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public ApiResponse updateGroupMemberWithHttpInfo(String groupId, String userId, UpdateGroupMemberRequest updateGroupMemberRequest) throws ApiException { + public ApiResponse updateGroupMemberWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateGroupMemberRequest updateGroupMemberRequest) throws ApiException { okhttp3.Call localVarCall = updateGroupMemberValidateBeforeCall(groupId, userId, updateGroupMemberRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -6968,14 +7158,15 @@ public ApiResponse updateGroupMemberWithHttpInfo(String groupId, St * @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 list of GroupMember objects. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
*/ - public okhttp3.Call updateGroupMemberAsync(String groupId, String userId, UpdateGroupMemberRequest updateGroupMemberRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupMemberAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateGroupMemberRequest updateGroupMemberRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateGroupMemberValidateBeforeCall(groupId, userId, updateGroupMemberRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -6991,14 +7182,15 @@ public okhttp3.Call updateGroupMemberAsync(String groupId, String userId, Update * @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 GroupPost object. -
401 Error response due to missing auth cookie. -
404 Response after deleting a group post. -
*/ - public okhttp3.Call updateGroupPostCall(String groupId, String notificationId, CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupPostCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7046,7 +7238,7 @@ public okhttp3.Call updateGroupPostCall(String groupId, String notificationId, C } @SuppressWarnings("rawtypes") - private okhttp3.Call updateGroupPostValidateBeforeCall(String groupId, String notificationId, CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateGroupPostValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling updateGroupPost(Async)"); @@ -7075,14 +7267,15 @@ private okhttp3.Call updateGroupPostValidateBeforeCall(String groupId, String no * @return GroupPost * @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 GroupPost object. -
401 Error response due to missing auth cookie. -
404 Response after deleting a group post. -
*/ - public GroupPost updateGroupPost(String groupId, String notificationId, CreateGroupPostRequest createGroupPostRequest) throws ApiException { + public GroupPost updateGroupPost(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull CreateGroupPostRequest createGroupPostRequest) throws ApiException { ApiResponse localVarResp = updateGroupPostWithHttpInfo(groupId, notificationId, createGroupPostRequest); return localVarResp.getData(); } @@ -7096,14 +7289,15 @@ public GroupPost updateGroupPost(String groupId, String notificationId, CreateGr * @return ApiResponse<GroupPost> * @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 GroupPost object. -
401 Error response due to missing auth cookie. -
404 Response after deleting a group post. -
*/ - public ApiResponse updateGroupPostWithHttpInfo(String groupId, String notificationId, CreateGroupPostRequest createGroupPostRequest) throws ApiException { + public ApiResponse updateGroupPostWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull CreateGroupPostRequest createGroupPostRequest) throws ApiException { okhttp3.Call localVarCall = updateGroupPostValidateBeforeCall(groupId, notificationId, createGroupPostRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -7119,14 +7313,15 @@ public ApiResponse updateGroupPostWithHttpInfo(String groupId, String * @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 GroupPost object. -
401 Error response due to missing auth cookie. -
404 Response after deleting a group post. -
*/ - public okhttp3.Call updateGroupPostAsync(String groupId, String notificationId, CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupPostAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull CreateGroupPostRequest createGroupPostRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateGroupPostValidateBeforeCall(groupId, notificationId, createGroupPostRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -7141,14 +7336,15 @@ public okhttp3.Call updateGroupPostAsync(String groupId, String notificationId, * @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 Successful response after updating group representation. -
401 Error response due to missing auth cookie. -
403 Error response when trying to perform operations on a group you are not member of. -
*/ - public okhttp3.Call updateGroupRepresentationCall(String groupId, UpdateGroupRepresentationRequest updateGroupRepresentationRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupRepresentationCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull UpdateGroupRepresentationRequest updateGroupRepresentationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7195,7 +7391,7 @@ public okhttp3.Call updateGroupRepresentationCall(String groupId, UpdateGroupRep } @SuppressWarnings("rawtypes") - private okhttp3.Call updateGroupRepresentationValidateBeforeCall(String groupId, UpdateGroupRepresentationRequest updateGroupRepresentationRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateGroupRepresentationValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull UpdateGroupRepresentationRequest updateGroupRepresentationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling updateGroupRepresentation(Async)"); @@ -7218,14 +7414,15 @@ private okhttp3.Call updateGroupRepresentationValidateBeforeCall(String groupId, * @return Success * @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 Successful response after updating group representation. -
401 Error response due to missing auth cookie. -
403 Error response when trying to perform operations on a group you are not member of. -
*/ - public Success updateGroupRepresentation(String groupId, UpdateGroupRepresentationRequest updateGroupRepresentationRequest) throws ApiException { + public Success updateGroupRepresentation(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull UpdateGroupRepresentationRequest updateGroupRepresentationRequest) throws ApiException { ApiResponse localVarResp = updateGroupRepresentationWithHttpInfo(groupId, updateGroupRepresentationRequest); return localVarResp.getData(); } @@ -7238,14 +7435,15 @@ public Success updateGroupRepresentation(String groupId, UpdateGroupRepresentati * @return ApiResponse<Success> * @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 Successful response after updating group representation. -
401 Error response due to missing auth cookie. -
403 Error response when trying to perform operations on a group you are not member of. -
*/ - public ApiResponse updateGroupRepresentationWithHttpInfo(String groupId, UpdateGroupRepresentationRequest updateGroupRepresentationRequest) throws ApiException { + public ApiResponse updateGroupRepresentationWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull UpdateGroupRepresentationRequest updateGroupRepresentationRequest) throws ApiException { okhttp3.Call localVarCall = updateGroupRepresentationValidateBeforeCall(groupId, updateGroupRepresentationRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -7260,14 +7458,15 @@ public ApiResponse updateGroupRepresentationWithHttpInfo(String groupId * @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 Successful response after updating group representation. -
401 Error response due to missing auth cookie. -
403 Error response when trying to perform operations on a group you are not member of. -
*/ - public okhttp3.Call updateGroupRepresentationAsync(String groupId, UpdateGroupRepresentationRequest updateGroupRepresentationRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupRepresentationAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull UpdateGroupRepresentationRequest updateGroupRepresentationRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateGroupRepresentationValidateBeforeCall(groupId, updateGroupRepresentationRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -7283,13 +7482,14 @@ public okhttp3.Call updateGroupRepresentationAsync(String groupId, UpdateGroupRe * @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 list of GroupRole objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateGroupRoleCall(String groupId, String groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateGroupRoleCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId, @javax.annotation.Nullable UpdateGroupRoleRequest updateGroupRoleRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7337,7 +7537,7 @@ public okhttp3.Call updateGroupRoleCall(String groupId, String groupRoleId, Upda } @SuppressWarnings("rawtypes") - private okhttp3.Call updateGroupRoleValidateBeforeCall(String groupId, String groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateGroupRoleValidateBeforeCall(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId, @javax.annotation.Nullable UpdateGroupRoleRequest updateGroupRoleRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling updateGroupRole(Async)"); @@ -7361,13 +7561,14 @@ private okhttp3.Call updateGroupRoleValidateBeforeCall(String groupId, String gr * @return List<GroupRole> * @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 list of GroupRole objects. -
401 Error response due to missing auth cookie. -
*/ - public List updateGroupRole(String groupId, String groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest) throws ApiException { + public List updateGroupRole(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId, @javax.annotation.Nullable UpdateGroupRoleRequest updateGroupRoleRequest) throws ApiException { ApiResponse> localVarResp = updateGroupRoleWithHttpInfo(groupId, groupRoleId, updateGroupRoleRequest); return localVarResp.getData(); } @@ -7381,13 +7582,14 @@ public List updateGroupRole(String groupId, String groupRoleId, Updat * @return ApiResponse<List<GroupRole>> * @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 list of GroupRole objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> updateGroupRoleWithHttpInfo(String groupId, String groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest) throws ApiException { + public ApiResponse> updateGroupRoleWithHttpInfo(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId, @javax.annotation.Nullable UpdateGroupRoleRequest updateGroupRoleRequest) throws ApiException { okhttp3.Call localVarCall = updateGroupRoleValidateBeforeCall(groupId, groupRoleId, updateGroupRoleRequest, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -7403,13 +7605,14 @@ public ApiResponse> updateGroupRoleWithHttpInfo(String groupId, * @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 list of GroupRole objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateGroupRoleAsync(String groupId, String groupRoleId, UpdateGroupRoleRequest updateGroupRoleRequest, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call updateGroupRoleAsync(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId, @javax.annotation.Nullable UpdateGroupRoleRequest updateGroupRoleRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = updateGroupRoleValidateBeforeCall(groupId, groupRoleId, updateGroupRoleRequest, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/InstancesApi.java b/src/main/java/io/github/vrchatapi/api/InstancesApi.java index d8ec7feb..c09148b9 100644 --- a/src/main/java/io/github/vrchatapi/api/InstancesApi.java +++ b/src/main/java/io/github/vrchatapi/api/InstancesApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -37,7 +37,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class InstancesApi { private ApiClient localVarApiClient; @@ -86,15 +85,16 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 single Instance object. -
401 Error response due to missing auth cookie. -
403 Error response due to not being allowed to close an instance -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public okhttp3.Call closeInstanceCall(String worldId, String instanceId, Boolean hardClose, OffsetDateTime closedAt, final ApiCallback _callback) throws ApiException { + public okhttp3.Call closeInstanceCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, @javax.annotation.Nullable Boolean hardClose, @javax.annotation.Nullable OffsetDateTime closedAt, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -149,7 +149,7 @@ public okhttp3.Call closeInstanceCall(String worldId, String instanceId, Boolean } @SuppressWarnings("rawtypes") - private okhttp3.Call closeInstanceValidateBeforeCall(String worldId, String instanceId, Boolean hardClose, OffsetDateTime closedAt, final ApiCallback _callback) throws ApiException { + private okhttp3.Call closeInstanceValidateBeforeCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, @javax.annotation.Nullable Boolean hardClose, @javax.annotation.Nullable OffsetDateTime closedAt, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling closeInstance(Async)"); @@ -174,15 +174,16 @@ private okhttp3.Call closeInstanceValidateBeforeCall(String worldId, String inst * @return Instance * @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 single Instance object. -
401 Error response due to missing auth cookie. -
403 Error response due to not being allowed to close an instance -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public Instance closeInstance(String worldId, String instanceId, Boolean hardClose, OffsetDateTime closedAt) throws ApiException { + public Instance closeInstance(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, @javax.annotation.Nullable Boolean hardClose, @javax.annotation.Nullable OffsetDateTime closedAt) throws ApiException { ApiResponse localVarResp = closeInstanceWithHttpInfo(worldId, instanceId, hardClose, closedAt); return localVarResp.getData(); } @@ -197,15 +198,16 @@ public Instance closeInstance(String worldId, String instanceId, Boolean hardClo * @return ApiResponse<Instance> * @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 single Instance object. -
401 Error response due to missing auth cookie. -
403 Error response due to not being allowed to close an instance -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public ApiResponse closeInstanceWithHttpInfo(String worldId, String instanceId, Boolean hardClose, OffsetDateTime closedAt) throws ApiException { + public ApiResponse closeInstanceWithHttpInfo(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, @javax.annotation.Nullable Boolean hardClose, @javax.annotation.Nullable OffsetDateTime closedAt) throws ApiException { okhttp3.Call localVarCall = closeInstanceValidateBeforeCall(worldId, instanceId, hardClose, closedAt, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -222,15 +224,16 @@ public ApiResponse closeInstanceWithHttpInfo(String worldId, String in * @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 single Instance object. -
401 Error response due to missing auth cookie. -
403 Error response due to not being allowed to close an instance -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public okhttp3.Call closeInstanceAsync(String worldId, String instanceId, Boolean hardClose, OffsetDateTime closedAt, final ApiCallback _callback) throws ApiException { + public okhttp3.Call closeInstanceAsync(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, @javax.annotation.Nullable Boolean hardClose, @javax.annotation.Nullable OffsetDateTime closedAt, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = closeInstanceValidateBeforeCall(worldId, instanceId, hardClose, closedAt, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -244,13 +247,14 @@ public okhttp3.Call closeInstanceAsync(String worldId, String instanceId, Boolea * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createInstanceCall(CreateInstanceRequest createInstanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createInstanceCall(@javax.annotation.Nonnull CreateInstanceRequest createInstanceRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -296,7 +300,7 @@ public okhttp3.Call createInstanceCall(CreateInstanceRequest createInstanceReque } @SuppressWarnings("rawtypes") - private okhttp3.Call createInstanceValidateBeforeCall(CreateInstanceRequest createInstanceRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createInstanceValidateBeforeCall(@javax.annotation.Nonnull CreateInstanceRequest createInstanceRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createInstanceRequest' is set if (createInstanceRequest == null) { throw new ApiException("Missing the required parameter 'createInstanceRequest' when calling createInstance(Async)"); @@ -313,13 +317,14 @@ private okhttp3.Call createInstanceValidateBeforeCall(CreateInstanceRequest crea * @return Instance * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public Instance createInstance(CreateInstanceRequest createInstanceRequest) throws ApiException { + public Instance createInstance(@javax.annotation.Nonnull CreateInstanceRequest createInstanceRequest) throws ApiException { ApiResponse localVarResp = createInstanceWithHttpInfo(createInstanceRequest); return localVarResp.getData(); } @@ -331,13 +336,14 @@ public Instance createInstance(CreateInstanceRequest createInstanceRequest) thro * @return ApiResponse<Instance> * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse createInstanceWithHttpInfo(CreateInstanceRequest createInstanceRequest) throws ApiException { + public ApiResponse createInstanceWithHttpInfo(@javax.annotation.Nonnull CreateInstanceRequest createInstanceRequest) throws ApiException { okhttp3.Call localVarCall = createInstanceValidateBeforeCall(createInstanceRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -351,13 +357,14 @@ public ApiResponse createInstanceWithHttpInfo(CreateInstanceRequest cr * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createInstanceAsync(CreateInstanceRequest createInstanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createInstanceAsync(@javax.annotation.Nonnull CreateInstanceRequest createInstanceRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createInstanceValidateBeforeCall(createInstanceRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -372,13 +379,14 @@ public okhttp3.Call createInstanceAsync(CreateInstanceRequest createInstanceRequ * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getInstanceCall(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInstanceCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -425,7 +433,7 @@ public okhttp3.Call getInstanceCall(String worldId, String instanceId, final Api } @SuppressWarnings("rawtypes") - private okhttp3.Call getInstanceValidateBeforeCall(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInstanceValidateBeforeCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling getInstance(Async)"); @@ -448,13 +456,14 @@ private okhttp3.Call getInstanceValidateBeforeCall(String worldId, String instan * @return Instance * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public Instance getInstance(String worldId, String instanceId) throws ApiException { + public Instance getInstance(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId) throws ApiException { ApiResponse localVarResp = getInstanceWithHttpInfo(worldId, instanceId); return localVarResp.getData(); } @@ -467,13 +476,14 @@ public Instance getInstance(String worldId, String instanceId) throws ApiExcepti * @return ApiResponse<Instance> * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getInstanceWithHttpInfo(String worldId, String instanceId) throws ApiException { + public ApiResponse getInstanceWithHttpInfo(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId) throws ApiException { okhttp3.Call localVarCall = getInstanceValidateBeforeCall(worldId, instanceId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -488,13 +498,14 @@ public ApiResponse getInstanceWithHttpInfo(String worldId, String inst * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getInstanceAsync(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInstanceAsync(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getInstanceValidateBeforeCall(worldId, instanceId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -508,14 +519,15 @@ public okhttp3.Call getInstanceAsync(String worldId, String instanceId, final Ap * @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 single Instance object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public okhttp3.Call getInstanceByShortNameCall(String shortName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInstanceByShortNameCall(@javax.annotation.Nonnull String shortName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -561,7 +573,7 @@ public okhttp3.Call getInstanceByShortNameCall(String shortName, final ApiCallba } @SuppressWarnings("rawtypes") - private okhttp3.Call getInstanceByShortNameValidateBeforeCall(String shortName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInstanceByShortNameValidateBeforeCall(@javax.annotation.Nonnull String shortName, final ApiCallback _callback) throws ApiException { // verify the required parameter 'shortName' is set if (shortName == null) { throw new ApiException("Missing the required parameter 'shortName' when calling getInstanceByShortName(Async)"); @@ -578,14 +590,15 @@ private okhttp3.Call getInstanceByShortNameValidateBeforeCall(String shortName, * @return Instance * @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 single Instance object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public Instance getInstanceByShortName(String shortName) throws ApiException { + public Instance getInstanceByShortName(@javax.annotation.Nonnull String shortName) throws ApiException { ApiResponse localVarResp = getInstanceByShortNameWithHttpInfo(shortName); return localVarResp.getData(); } @@ -597,14 +610,15 @@ public Instance getInstanceByShortName(String shortName) throws ApiException { * @return ApiResponse<Instance> * @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 single Instance object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public ApiResponse getInstanceByShortNameWithHttpInfo(String shortName) throws ApiException { + public ApiResponse getInstanceByShortNameWithHttpInfo(@javax.annotation.Nonnull String shortName) throws ApiException { okhttp3.Call localVarCall = getInstanceByShortNameValidateBeforeCall(shortName, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -618,14 +632,15 @@ public ApiResponse getInstanceByShortNameWithHttpInfo(String shortName * @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 single Instance object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public okhttp3.Call getInstanceByShortNameAsync(String shortName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInstanceByShortNameAsync(@javax.annotation.Nonnull String shortName, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getInstanceByShortNameValidateBeforeCall(shortName, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -640,13 +655,14 @@ public okhttp3.Call getInstanceByShortNameAsync(String shortName, final ApiCallb * @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 list of LocationIDs. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getRecentLocationsCall(Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRecentLocationsCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -699,7 +715,7 @@ public okhttp3.Call getRecentLocationsCall(Integer n, Integer offset, final ApiC } @SuppressWarnings("rawtypes") - private okhttp3.Call getRecentLocationsValidateBeforeCall(Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getRecentLocationsValidateBeforeCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { return getRecentLocationsCall(n, offset, _callback); } @@ -712,13 +728,14 @@ private okhttp3.Call getRecentLocationsValidateBeforeCall(Integer n, Integer off * @return List<String> * @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 list of LocationIDs. -
401 Error response due to missing auth cookie. -
*/ - public List getRecentLocations(Integer n, Integer offset) throws ApiException { + public List getRecentLocations(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = getRecentLocationsWithHttpInfo(n, offset); return localVarResp.getData(); } @@ -731,13 +748,14 @@ public List getRecentLocations(Integer n, Integer offset) throws ApiExce * @return ApiResponse<List<String>> * @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 list of LocationIDs. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getRecentLocationsWithHttpInfo(Integer n, Integer offset) throws ApiException { + public ApiResponse> getRecentLocationsWithHttpInfo(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getRecentLocationsValidateBeforeCall(n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -752,13 +770,14 @@ public ApiResponse> getRecentLocationsWithHttpInfo(Integer n, Integ * @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 list of LocationIDs. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getRecentLocationsAsync(Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getRecentLocationsAsync(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getRecentLocationsValidateBeforeCall(n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -773,13 +792,14 @@ public okhttp3.Call getRecentLocationsAsync(Integer n, Integer offset, final Api * @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 an instance secureName and/or shortName. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getShortNameCall(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getShortNameCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -826,7 +846,7 @@ public okhttp3.Call getShortNameCall(String worldId, String instanceId, final Ap } @SuppressWarnings("rawtypes") - private okhttp3.Call getShortNameValidateBeforeCall(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getShortNameValidateBeforeCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling getShortName(Async)"); @@ -849,13 +869,14 @@ private okhttp3.Call getShortNameValidateBeforeCall(String worldId, String insta * @return InstanceShortNameResponse * @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 an instance secureName and/or shortName. -
401 Error response due to missing auth cookie. -
*/ - public InstanceShortNameResponse getShortName(String worldId, String instanceId) throws ApiException { + public InstanceShortNameResponse getShortName(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId) throws ApiException { ApiResponse localVarResp = getShortNameWithHttpInfo(worldId, instanceId); return localVarResp.getData(); } @@ -868,13 +889,14 @@ public InstanceShortNameResponse getShortName(String worldId, String instanceId) * @return ApiResponse<InstanceShortNameResponse> * @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 an instance secureName and/or shortName. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getShortNameWithHttpInfo(String worldId, String instanceId) throws ApiException { + public ApiResponse getShortNameWithHttpInfo(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId) throws ApiException { okhttp3.Call localVarCall = getShortNameValidateBeforeCall(worldId, instanceId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -889,13 +911,14 @@ public ApiResponse getShortNameWithHttpInfo(String wo * @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 an instance secureName and/or shortName. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getShortNameAsync(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getShortNameAsync(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getShortNameValidateBeforeCall(worldId, instanceId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/InventoryApi.java b/src/main/java/io/github/vrchatapi/api/InventoryApi.java index 2ba6e56c..ac007f8d 100644 --- a/src/main/java/io/github/vrchatapi/api/InventoryApi.java +++ b/src/main/java/io/github/vrchatapi/api/InventoryApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -49,7 +49,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class InventoryApi { private ApiClient localVarApiClient; @@ -95,14 +94,15 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 an InventoryConsumptionResults object. -
400 Error response when trying to consume an InventoryItem lacking the consumable flag. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call consumeOwnInventoryItemCall(String inventoryItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call consumeOwnInventoryItemCall(@javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -148,7 +148,7 @@ public okhttp3.Call consumeOwnInventoryItemCall(String inventoryItemId, final Ap } @SuppressWarnings("rawtypes") - private okhttp3.Call consumeOwnInventoryItemValidateBeforeCall(String inventoryItemId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call consumeOwnInventoryItemValidateBeforeCall(@javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'inventoryItemId' is set if (inventoryItemId == null) { throw new ApiException("Missing the required parameter 'inventoryItemId' when calling consumeOwnInventoryItem(Async)"); @@ -165,14 +165,15 @@ private okhttp3.Call consumeOwnInventoryItemValidateBeforeCall(String inventoryI * @return InventoryConsumptionResults * @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 an InventoryConsumptionResults object. -
400 Error response when trying to consume an InventoryItem lacking the consumable flag. -
401 Error response due to missing auth cookie. -
*/ - public InventoryConsumptionResults consumeOwnInventoryItem(String inventoryItemId) throws ApiException { + public InventoryConsumptionResults consumeOwnInventoryItem(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { ApiResponse localVarResp = consumeOwnInventoryItemWithHttpInfo(inventoryItemId); return localVarResp.getData(); } @@ -184,14 +185,15 @@ public InventoryConsumptionResults consumeOwnInventoryItem(String inventoryItemI * @return ApiResponse<InventoryConsumptionResults> * @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 an InventoryConsumptionResults object. -
400 Error response when trying to consume an InventoryItem lacking the consumable flag. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse consumeOwnInventoryItemWithHttpInfo(String inventoryItemId) throws ApiException { + public ApiResponse consumeOwnInventoryItemWithHttpInfo(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { okhttp3.Call localVarCall = consumeOwnInventoryItemValidateBeforeCall(inventoryItemId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -205,14 +207,15 @@ public ApiResponse consumeOwnInventoryItemWithHttpI * @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 an InventoryConsumptionResults object. -
400 Error response when trying to consume an InventoryItem lacking the consumable flag. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call consumeOwnInventoryItemAsync(String inventoryItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call consumeOwnInventoryItemAsync(@javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = consumeOwnInventoryItemValidateBeforeCall(inventoryItemId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -226,13 +229,14 @@ public okhttp3.Call consumeOwnInventoryItemAsync(String inventoryItemId, final A * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteOwnInventoryItemCall(String inventoryItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteOwnInventoryItemCall(@javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -278,7 +282,7 @@ public okhttp3.Call deleteOwnInventoryItemCall(String inventoryItemId, final Api } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteOwnInventoryItemValidateBeforeCall(String inventoryItemId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteOwnInventoryItemValidateBeforeCall(@javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'inventoryItemId' is set if (inventoryItemId == null) { throw new ApiException("Missing the required parameter 'inventoryItemId' when calling deleteOwnInventoryItem(Async)"); @@ -295,13 +299,14 @@ private okhttp3.Call deleteOwnInventoryItemValidateBeforeCall(String inventoryIt * @return SuccessFlag * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public SuccessFlag deleteOwnInventoryItem(String inventoryItemId) throws ApiException { + public SuccessFlag deleteOwnInventoryItem(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { ApiResponse localVarResp = deleteOwnInventoryItemWithHttpInfo(inventoryItemId); return localVarResp.getData(); } @@ -313,13 +318,14 @@ public SuccessFlag deleteOwnInventoryItem(String inventoryItemId) throws ApiExce * @return ApiResponse<SuccessFlag> * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse deleteOwnInventoryItemWithHttpInfo(String inventoryItemId) throws ApiException { + public ApiResponse deleteOwnInventoryItemWithHttpInfo(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { okhttp3.Call localVarCall = deleteOwnInventoryItemValidateBeforeCall(inventoryItemId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -333,13 +339,14 @@ public ApiResponse deleteOwnInventoryItemWithHttpInfo(String invent * @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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteOwnInventoryItemAsync(String inventoryItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteOwnInventoryItemAsync(@javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteOwnInventoryItemValidateBeforeCall(inventoryItemId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -354,14 +361,15 @@ public okhttp3.Call deleteOwnInventoryItemAsync(String inventoryItemId, final Ap * @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 an InventoryItem object. -
400 Error response when trying to equip an InventoryItem lacking the equippable flag. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call equipOwnInventoryItemCall(String inventoryItemId, EquipInventoryItemRequest equipInventoryItemRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call equipOwnInventoryItemCall(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable EquipInventoryItemRequest equipInventoryItemRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -408,7 +416,7 @@ public okhttp3.Call equipOwnInventoryItemCall(String inventoryItemId, EquipInven } @SuppressWarnings("rawtypes") - private okhttp3.Call equipOwnInventoryItemValidateBeforeCall(String inventoryItemId, EquipInventoryItemRequest equipInventoryItemRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call equipOwnInventoryItemValidateBeforeCall(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable EquipInventoryItemRequest equipInventoryItemRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'inventoryItemId' is set if (inventoryItemId == null) { throw new ApiException("Missing the required parameter 'inventoryItemId' when calling equipOwnInventoryItem(Async)"); @@ -426,14 +434,15 @@ private okhttp3.Call equipOwnInventoryItemValidateBeforeCall(String inventoryIte * @return InventoryItem * @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 an InventoryItem object. -
400 Error response when trying to equip an InventoryItem lacking the equippable flag. -
401 Error response due to missing auth cookie. -
*/ - public InventoryItem equipOwnInventoryItem(String inventoryItemId, EquipInventoryItemRequest equipInventoryItemRequest) throws ApiException { + public InventoryItem equipOwnInventoryItem(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable EquipInventoryItemRequest equipInventoryItemRequest) throws ApiException { ApiResponse localVarResp = equipOwnInventoryItemWithHttpInfo(inventoryItemId, equipInventoryItemRequest); return localVarResp.getData(); } @@ -446,14 +455,15 @@ public InventoryItem equipOwnInventoryItem(String inventoryItemId, EquipInventor * @return ApiResponse<InventoryItem> * @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 an InventoryItem object. -
400 Error response when trying to equip an InventoryItem lacking the equippable flag. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse equipOwnInventoryItemWithHttpInfo(String inventoryItemId, EquipInventoryItemRequest equipInventoryItemRequest) throws ApiException { + public ApiResponse equipOwnInventoryItemWithHttpInfo(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable EquipInventoryItemRequest equipInventoryItemRequest) throws ApiException { okhttp3.Call localVarCall = equipOwnInventoryItemValidateBeforeCall(inventoryItemId, equipInventoryItemRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -468,14 +478,15 @@ public ApiResponse equipOwnInventoryItemWithHttpInfo(String inven * @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 an InventoryItem object. -
400 Error response when trying to equip an InventoryItem lacking the equippable flag. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call equipOwnInventoryItemAsync(String inventoryItemId, EquipInventoryItemRequest equipInventoryItemRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call equipOwnInventoryItemAsync(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable EquipInventoryItemRequest equipInventoryItemRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = equipOwnInventoryItemValidateBeforeCall(inventoryItemId, equipInventoryItemRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -499,14 +510,15 @@ public okhttp3.Call equipOwnInventoryItemAsync(String inventoryItemId, EquipInve * @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 an Inventory object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public okhttp3.Call getInventoryCall(Integer n, Integer offset, String holderId, InventoryEquipSlot equipSlot, String order, String tags, InventoryItemType types, InventoryFlag flags, InventoryItemType notTypes, InventoryFlag notFlags, Boolean archived, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInventoryCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String holderId, @javax.annotation.Nullable InventoryEquipSlot equipSlot, @javax.annotation.Nullable String order, @javax.annotation.Nullable String tags, @javax.annotation.Nullable InventoryItemType types, @javax.annotation.Nullable InventoryFlag flags, @javax.annotation.Nullable InventoryItemType notTypes, @javax.annotation.Nullable InventoryFlag notFlags, @javax.annotation.Nullable Boolean archived, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -595,7 +607,7 @@ public okhttp3.Call getInventoryCall(Integer n, Integer offset, String holderId, } @SuppressWarnings("rawtypes") - private okhttp3.Call getInventoryValidateBeforeCall(Integer n, Integer offset, String holderId, InventoryEquipSlot equipSlot, String order, String tags, InventoryItemType types, InventoryFlag flags, InventoryItemType notTypes, InventoryFlag notFlags, Boolean archived, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInventoryValidateBeforeCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String holderId, @javax.annotation.Nullable InventoryEquipSlot equipSlot, @javax.annotation.Nullable String order, @javax.annotation.Nullable String tags, @javax.annotation.Nullable InventoryItemType types, @javax.annotation.Nullable InventoryFlag flags, @javax.annotation.Nullable InventoryItemType notTypes, @javax.annotation.Nullable InventoryFlag notFlags, @javax.annotation.Nullable Boolean archived, final ApiCallback _callback) throws ApiException { return getInventoryCall(n, offset, holderId, equipSlot, order, tags, types, flags, notTypes, notFlags, archived, _callback); } @@ -617,14 +629,15 @@ private okhttp3.Call getInventoryValidateBeforeCall(Integer n, Integer offset, S * @return Inventory * @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 an Inventory object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public Inventory getInventory(Integer n, Integer offset, String holderId, InventoryEquipSlot equipSlot, String order, String tags, InventoryItemType types, InventoryFlag flags, InventoryItemType notTypes, InventoryFlag notFlags, Boolean archived) throws ApiException { + public Inventory getInventory(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String holderId, @javax.annotation.Nullable InventoryEquipSlot equipSlot, @javax.annotation.Nullable String order, @javax.annotation.Nullable String tags, @javax.annotation.Nullable InventoryItemType types, @javax.annotation.Nullable InventoryFlag flags, @javax.annotation.Nullable InventoryItemType notTypes, @javax.annotation.Nullable InventoryFlag notFlags, @javax.annotation.Nullable Boolean archived) throws ApiException { ApiResponse localVarResp = getInventoryWithHttpInfo(n, offset, holderId, equipSlot, order, tags, types, flags, notTypes, notFlags, archived); return localVarResp.getData(); } @@ -646,14 +659,15 @@ public Inventory getInventory(Integer n, Integer offset, String holderId, Invent * @return ApiResponse<Inventory> * @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 an Inventory object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public ApiResponse getInventoryWithHttpInfo(Integer n, Integer offset, String holderId, InventoryEquipSlot equipSlot, String order, String tags, InventoryItemType types, InventoryFlag flags, InventoryItemType notTypes, InventoryFlag notFlags, Boolean archived) throws ApiException { + public ApiResponse getInventoryWithHttpInfo(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String holderId, @javax.annotation.Nullable InventoryEquipSlot equipSlot, @javax.annotation.Nullable String order, @javax.annotation.Nullable String tags, @javax.annotation.Nullable InventoryItemType types, @javax.annotation.Nullable InventoryFlag flags, @javax.annotation.Nullable InventoryItemType notTypes, @javax.annotation.Nullable InventoryFlag notFlags, @javax.annotation.Nullable Boolean archived) throws ApiException { okhttp3.Call localVarCall = getInventoryValidateBeforeCall(n, offset, holderId, equipSlot, order, tags, types, flags, notTypes, notFlags, archived, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -677,14 +691,15 @@ public ApiResponse getInventoryWithHttpInfo(Integer n, Integer offset * @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 an Inventory object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public okhttp3.Call getInventoryAsync(Integer n, Integer offset, String holderId, InventoryEquipSlot equipSlot, String order, String tags, InventoryItemType types, InventoryFlag flags, InventoryItemType notTypes, InventoryFlag notFlags, Boolean archived, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInventoryAsync(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String holderId, @javax.annotation.Nullable InventoryEquipSlot equipSlot, @javax.annotation.Nullable String order, @javax.annotation.Nullable String tags, @javax.annotation.Nullable InventoryItemType types, @javax.annotation.Nullable InventoryFlag flags, @javax.annotation.Nullable InventoryItemType notTypes, @javax.annotation.Nullable InventoryFlag notFlags, @javax.annotation.Nullable Boolean archived, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getInventoryValidateBeforeCall(n, offset, holderId, equipSlot, order, tags, types, flags, notTypes, notFlags, archived, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -697,7 +712,8 @@ public okhttp3.Call getInventoryAsync(Integer n, Integer offset, String holderId * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -759,7 +775,8 @@ private okhttp3.Call getInventoryCollectionsValidateBeforeCall(final ApiCallback * @return List<String> * @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 list of strings. -
401 Error response due to missing auth cookie. -
+
+ @@ -776,7 +793,8 @@ public List getInventoryCollections() throws ApiException { * @return ApiResponse<List<String>> * @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 list of strings. -
401 Error response due to missing auth cookie. -
+
+ @@ -795,7 +813,8 @@ public ApiResponse> getInventoryCollectionsWithHttpInfo() throws Ap * @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 list of strings. -
401 Error response due to missing auth cookie. -
+
+ @@ -815,13 +834,14 @@ public okhttp3.Call getInventoryCollectionsAsync(final ApiCallback> * @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 list of strings. -
401 Error response due to missing auth cookie. -
+
+
Response Details
Status Code Description Response Headers
200 Returns a list of InventoryDrop objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getInventoryDropsCall(Boolean active, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInventoryDropsCall(@javax.annotation.Nullable Boolean active, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -870,7 +890,7 @@ public okhttp3.Call getInventoryDropsCall(Boolean active, final ApiCallback _cal } @SuppressWarnings("rawtypes") - private okhttp3.Call getInventoryDropsValidateBeforeCall(Boolean active, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInventoryDropsValidateBeforeCall(@javax.annotation.Nullable Boolean active, final ApiCallback _callback) throws ApiException { return getInventoryDropsCall(active, _callback); } @@ -882,13 +902,14 @@ private okhttp3.Call getInventoryDropsValidateBeforeCall(Boolean active, final A * @return List<InventoryDrop> * @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 list of InventoryDrop objects. -
401 Error response due to missing auth cookie. -
*/ - public List getInventoryDrops(Boolean active) throws ApiException { + public List getInventoryDrops(@javax.annotation.Nullable Boolean active) throws ApiException { ApiResponse> localVarResp = getInventoryDropsWithHttpInfo(active); return localVarResp.getData(); } @@ -900,13 +921,14 @@ public List getInventoryDrops(Boolean active) throws ApiException * @return ApiResponse<List<InventoryDrop>> * @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 list of InventoryDrop objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getInventoryDropsWithHttpInfo(Boolean active) throws ApiException { + public ApiResponse> getInventoryDropsWithHttpInfo(@javax.annotation.Nullable Boolean active) throws ApiException { okhttp3.Call localVarCall = getInventoryDropsValidateBeforeCall(active, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -920,13 +942,14 @@ public ApiResponse> getInventoryDropsWithHttpInfo(Boolean ac * @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 list of InventoryDrop objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getInventoryDropsAsync(Boolean active, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getInventoryDropsAsync(@javax.annotation.Nullable Boolean active, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getInventoryDropsValidateBeforeCall(active, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -940,13 +963,14 @@ public okhttp3.Call getInventoryDropsAsync(Boolean active, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns an InventoryTemplate object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getInventoryTemplateCall(String inventoryTemplateId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInventoryTemplateCall(@javax.annotation.Nonnull String inventoryTemplateId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -992,7 +1016,7 @@ public okhttp3.Call getInventoryTemplateCall(String inventoryTemplateId, final A } @SuppressWarnings("rawtypes") - private okhttp3.Call getInventoryTemplateValidateBeforeCall(String inventoryTemplateId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInventoryTemplateValidateBeforeCall(@javax.annotation.Nonnull String inventoryTemplateId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'inventoryTemplateId' is set if (inventoryTemplateId == null) { throw new ApiException("Missing the required parameter 'inventoryTemplateId' when calling getInventoryTemplate(Async)"); @@ -1009,13 +1033,14 @@ private okhttp3.Call getInventoryTemplateValidateBeforeCall(String inventoryTemp * @return InventoryTemplate * @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 an InventoryTemplate object. -
401 Error response due to missing auth cookie. -
*/ - public InventoryTemplate getInventoryTemplate(String inventoryTemplateId) throws ApiException { + public InventoryTemplate getInventoryTemplate(@javax.annotation.Nonnull String inventoryTemplateId) throws ApiException { ApiResponse localVarResp = getInventoryTemplateWithHttpInfo(inventoryTemplateId); return localVarResp.getData(); } @@ -1027,13 +1052,14 @@ public InventoryTemplate getInventoryTemplate(String inventoryTemplateId) throws * @return ApiResponse<InventoryTemplate> * @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 an InventoryTemplate object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getInventoryTemplateWithHttpInfo(String inventoryTemplateId) throws ApiException { + public ApiResponse getInventoryTemplateWithHttpInfo(@javax.annotation.Nonnull String inventoryTemplateId) throws ApiException { okhttp3.Call localVarCall = getInventoryTemplateValidateBeforeCall(inventoryTemplateId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1047,13 +1073,14 @@ public ApiResponse getInventoryTemplateWithHttpInfo(String in * @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 an InventoryTemplate object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getInventoryTemplateAsync(String inventoryTemplateId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInventoryTemplateAsync(@javax.annotation.Nonnull String inventoryTemplateId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getInventoryTemplateValidateBeforeCall(inventoryTemplateId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1067,13 +1094,14 @@ public okhttp3.Call getInventoryTemplateAsync(String inventoryTemplateId, final * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getOwnInventoryItemCall(String inventoryItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getOwnInventoryItemCall(@javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1119,7 +1147,7 @@ public okhttp3.Call getOwnInventoryItemCall(String inventoryItemId, final ApiCal } @SuppressWarnings("rawtypes") - private okhttp3.Call getOwnInventoryItemValidateBeforeCall(String inventoryItemId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getOwnInventoryItemValidateBeforeCall(@javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'inventoryItemId' is set if (inventoryItemId == null) { throw new ApiException("Missing the required parameter 'inventoryItemId' when calling getOwnInventoryItem(Async)"); @@ -1136,13 +1164,14 @@ private okhttp3.Call getOwnInventoryItemValidateBeforeCall(String inventoryItemI * @return InventoryItem * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public InventoryItem getOwnInventoryItem(String inventoryItemId) throws ApiException { + public InventoryItem getOwnInventoryItem(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { ApiResponse localVarResp = getOwnInventoryItemWithHttpInfo(inventoryItemId); return localVarResp.getData(); } @@ -1154,13 +1183,14 @@ public InventoryItem getOwnInventoryItem(String inventoryItemId) throws ApiExcep * @return ApiResponse<InventoryItem> * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getOwnInventoryItemWithHttpInfo(String inventoryItemId) throws ApiException { + public ApiResponse getOwnInventoryItemWithHttpInfo(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { okhttp3.Call localVarCall = getOwnInventoryItemValidateBeforeCall(inventoryItemId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1174,13 +1204,14 @@ public ApiResponse getOwnInventoryItemWithHttpInfo(String invento * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getOwnInventoryItemAsync(String inventoryItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getOwnInventoryItemAsync(@javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getOwnInventoryItemValidateBeforeCall(inventoryItemId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1195,13 +1226,14 @@ public okhttp3.Call getOwnInventoryItemAsync(String inventoryItemId, final ApiCa * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserInventoryItemCall(String userId, String inventoryItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserInventoryItemCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1248,7 +1280,7 @@ public okhttp3.Call getUserInventoryItemCall(String userId, String inventoryItem } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserInventoryItemValidateBeforeCall(String userId, String inventoryItemId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserInventoryItemValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String inventoryItemId, 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 getUserInventoryItem(Async)"); @@ -1271,13 +1303,14 @@ private okhttp3.Call getUserInventoryItemValidateBeforeCall(String userId, Strin * @return InventoryItem * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public InventoryItem getUserInventoryItem(String userId, String inventoryItemId) throws ApiException { + public InventoryItem getUserInventoryItem(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String inventoryItemId) throws ApiException { ApiResponse localVarResp = getUserInventoryItemWithHttpInfo(userId, inventoryItemId); return localVarResp.getData(); } @@ -1290,13 +1323,14 @@ public InventoryItem getUserInventoryItem(String userId, String inventoryItemId) * @return ApiResponse<InventoryItem> * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getUserInventoryItemWithHttpInfo(String userId, String inventoryItemId) throws ApiException { + public ApiResponse getUserInventoryItemWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String inventoryItemId) throws ApiException { okhttp3.Call localVarCall = getUserInventoryItemValidateBeforeCall(userId, inventoryItemId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1311,13 +1345,14 @@ public ApiResponse getUserInventoryItemWithHttpInfo(String userId * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserInventoryItemAsync(String userId, String inventoryItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserInventoryItemAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserInventoryItemValidateBeforeCall(userId, inventoryItemId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1331,13 +1366,14 @@ public okhttp3.Call getUserInventoryItemAsync(String userId, String inventoryIte * @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 single RewardRedemptionResult object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call redeemRewardCall(RewardRedemptionRequest rewardRedemptionRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call redeemRewardCall(@javax.annotation.Nonnull RewardRedemptionRequest rewardRedemptionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1383,7 +1419,7 @@ public okhttp3.Call redeemRewardCall(RewardRedemptionRequest rewardRedemptionReq } @SuppressWarnings("rawtypes") - private okhttp3.Call redeemRewardValidateBeforeCall(RewardRedemptionRequest rewardRedemptionRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call redeemRewardValidateBeforeCall(@javax.annotation.Nonnull RewardRedemptionRequest rewardRedemptionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'rewardRedemptionRequest' is set if (rewardRedemptionRequest == null) { throw new ApiException("Missing the required parameter 'rewardRedemptionRequest' when calling redeemReward(Async)"); @@ -1400,13 +1436,14 @@ private okhttp3.Call redeemRewardValidateBeforeCall(RewardRedemptionRequest rewa * @return List<RewardRedemptionResult> * @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 single RewardRedemptionResult object. -
401 Error response due to missing auth cookie. -
*/ - public List redeemReward(RewardRedemptionRequest rewardRedemptionRequest) throws ApiException { + public List redeemReward(@javax.annotation.Nonnull RewardRedemptionRequest rewardRedemptionRequest) throws ApiException { ApiResponse> localVarResp = redeemRewardWithHttpInfo(rewardRedemptionRequest); return localVarResp.getData(); } @@ -1418,13 +1455,14 @@ public List redeemReward(RewardRedemptionRequest rewardR * @return ApiResponse<List<RewardRedemptionResult>> * @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 single RewardRedemptionResult object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> redeemRewardWithHttpInfo(RewardRedemptionRequest rewardRedemptionRequest) throws ApiException { + public ApiResponse> redeemRewardWithHttpInfo(@javax.annotation.Nonnull RewardRedemptionRequest rewardRedemptionRequest) throws ApiException { okhttp3.Call localVarCall = redeemRewardValidateBeforeCall(rewardRedemptionRequest, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1438,13 +1476,14 @@ public ApiResponse> redeemRewardWithHttpInfo(Reward * @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 single RewardRedemptionResult object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call redeemRewardAsync(RewardRedemptionRequest rewardRedemptionRequest, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call redeemRewardAsync(@javax.annotation.Nonnull RewardRedemptionRequest rewardRedemptionRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = redeemRewardValidateBeforeCall(rewardRedemptionRequest, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1460,13 +1499,14 @@ public okhttp3.Call redeemRewardAsync(RewardRedemptionRequest rewardRedemptionRe * @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 an OkStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call shareInventoryItemDirectCall(String itemId, Integer duration, ShareInventoryItemDirectRequest shareInventoryItemDirectRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call shareInventoryItemDirectCall(@javax.annotation.Nonnull String itemId, @javax.annotation.Nonnull Integer duration, @javax.annotation.Nonnull ShareInventoryItemDirectRequest shareInventoryItemDirectRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1520,7 +1560,7 @@ public okhttp3.Call shareInventoryItemDirectCall(String itemId, Integer duration } @SuppressWarnings("rawtypes") - private okhttp3.Call shareInventoryItemDirectValidateBeforeCall(String itemId, Integer duration, ShareInventoryItemDirectRequest shareInventoryItemDirectRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call shareInventoryItemDirectValidateBeforeCall(@javax.annotation.Nonnull String itemId, @javax.annotation.Nonnull Integer duration, @javax.annotation.Nonnull ShareInventoryItemDirectRequest shareInventoryItemDirectRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'itemId' is set if (itemId == null) { throw new ApiException("Missing the required parameter 'itemId' when calling shareInventoryItemDirect(Async)"); @@ -1549,13 +1589,14 @@ private okhttp3.Call shareInventoryItemDirectValidateBeforeCall(String itemId, I * @return OkStatus * @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 an OkStatus object. -
401 Error response due to missing auth cookie. -
*/ - public OkStatus shareInventoryItemDirect(String itemId, Integer duration, ShareInventoryItemDirectRequest shareInventoryItemDirectRequest) throws ApiException { + public OkStatus shareInventoryItemDirect(@javax.annotation.Nonnull String itemId, @javax.annotation.Nonnull Integer duration, @javax.annotation.Nonnull ShareInventoryItemDirectRequest shareInventoryItemDirectRequest) throws ApiException { ApiResponse localVarResp = shareInventoryItemDirectWithHttpInfo(itemId, duration, shareInventoryItemDirectRequest); return localVarResp.getData(); } @@ -1569,13 +1610,14 @@ public OkStatus shareInventoryItemDirect(String itemId, Integer duration, ShareI * @return ApiResponse<OkStatus> * @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 an OkStatus object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse shareInventoryItemDirectWithHttpInfo(String itemId, Integer duration, ShareInventoryItemDirectRequest shareInventoryItemDirectRequest) throws ApiException { + public ApiResponse shareInventoryItemDirectWithHttpInfo(@javax.annotation.Nonnull String itemId, @javax.annotation.Nonnull Integer duration, @javax.annotation.Nonnull ShareInventoryItemDirectRequest shareInventoryItemDirectRequest) throws ApiException { okhttp3.Call localVarCall = shareInventoryItemDirectValidateBeforeCall(itemId, duration, shareInventoryItemDirectRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1591,13 +1633,14 @@ public ApiResponse shareInventoryItemDirectWithHttpInfo(String itemId, * @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 an OkStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call shareInventoryItemDirectAsync(String itemId, Integer duration, ShareInventoryItemDirectRequest shareInventoryItemDirectRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call shareInventoryItemDirectAsync(@javax.annotation.Nonnull String itemId, @javax.annotation.Nonnull Integer duration, @javax.annotation.Nonnull ShareInventoryItemDirectRequest shareInventoryItemDirectRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = shareInventoryItemDirectValidateBeforeCall(itemId, duration, shareInventoryItemDirectRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1612,13 +1655,14 @@ public okhttp3.Call shareInventoryItemDirectAsync(String itemId, Integer duratio * @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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call shareInventoryItemPedestalCall(String itemId, Integer duration, final ApiCallback _callback) throws ApiException { + public okhttp3.Call shareInventoryItemPedestalCall(@javax.annotation.Nonnull String itemId, @javax.annotation.Nonnull Integer duration, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1671,7 +1715,7 @@ public okhttp3.Call shareInventoryItemPedestalCall(String itemId, Integer durati } @SuppressWarnings("rawtypes") - private okhttp3.Call shareInventoryItemPedestalValidateBeforeCall(String itemId, Integer duration, final ApiCallback _callback) throws ApiException { + private okhttp3.Call shareInventoryItemPedestalValidateBeforeCall(@javax.annotation.Nonnull String itemId, @javax.annotation.Nonnull Integer duration, final ApiCallback _callback) throws ApiException { // verify the required parameter 'itemId' is set if (itemId == null) { throw new ApiException("Missing the required parameter 'itemId' when calling shareInventoryItemPedestal(Async)"); @@ -1694,13 +1738,14 @@ private okhttp3.Call shareInventoryItemPedestalValidateBeforeCall(String itemId, * @return InventorySpawn * @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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
*/ - public InventorySpawn shareInventoryItemPedestal(String itemId, Integer duration) throws ApiException { + public InventorySpawn shareInventoryItemPedestal(@javax.annotation.Nonnull String itemId, @javax.annotation.Nonnull Integer duration) throws ApiException { ApiResponse localVarResp = shareInventoryItemPedestalWithHttpInfo(itemId, duration); return localVarResp.getData(); } @@ -1713,13 +1758,14 @@ public InventorySpawn shareInventoryItemPedestal(String itemId, Integer duration * @return ApiResponse<InventorySpawn> * @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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse shareInventoryItemPedestalWithHttpInfo(String itemId, Integer duration) throws ApiException { + public ApiResponse shareInventoryItemPedestalWithHttpInfo(@javax.annotation.Nonnull String itemId, @javax.annotation.Nonnull Integer duration) throws ApiException { okhttp3.Call localVarCall = shareInventoryItemPedestalValidateBeforeCall(itemId, duration, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1734,13 +1780,14 @@ public ApiResponse shareInventoryItemPedestalWithHttpInfo(String * @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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call shareInventoryItemPedestalAsync(String itemId, Integer duration, final ApiCallback _callback) throws ApiException { + public okhttp3.Call shareInventoryItemPedestalAsync(@javax.annotation.Nonnull String itemId, @javax.annotation.Nonnull Integer duration, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = shareInventoryItemPedestalValidateBeforeCall(itemId, duration, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1754,13 +1801,14 @@ public okhttp3.Call shareInventoryItemPedestalAsync(String itemId, Integer durat * @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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call spawnInventoryItemCall(String id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call spawnInventoryItemCall(@javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1809,7 +1857,7 @@ public okhttp3.Call spawnInventoryItemCall(String id, final ApiCallback _callbac } @SuppressWarnings("rawtypes") - private okhttp3.Call spawnInventoryItemValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call spawnInventoryItemValidateBeforeCall(@javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling spawnInventoryItem(Async)"); @@ -1826,13 +1874,14 @@ private okhttp3.Call spawnInventoryItemValidateBeforeCall(String id, final ApiCa * @return InventorySpawn * @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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
*/ - public InventorySpawn spawnInventoryItem(String id) throws ApiException { + public InventorySpawn spawnInventoryItem(@javax.annotation.Nonnull String id) throws ApiException { ApiResponse localVarResp = spawnInventoryItemWithHttpInfo(id); return localVarResp.getData(); } @@ -1844,13 +1893,14 @@ public InventorySpawn spawnInventoryItem(String id) throws ApiException { * @return ApiResponse<InventorySpawn> * @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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse spawnInventoryItemWithHttpInfo(String id) throws ApiException { + public ApiResponse spawnInventoryItemWithHttpInfo(@javax.annotation.Nonnull String id) throws ApiException { okhttp3.Call localVarCall = spawnInventoryItemValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1864,13 +1914,14 @@ public ApiResponse spawnInventoryItemWithHttpInfo(String id) thr * @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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call spawnInventoryItemAsync(String id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call spawnInventoryItemAsync(@javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = spawnInventoryItemValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1884,13 +1935,14 @@ public okhttp3.Call spawnInventoryItemAsync(String id, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a string. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call unequipOwnInventorySlotCall(InventoryEquipSlot inventoryItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unequipOwnInventorySlotCall(@javax.annotation.Nonnull InventoryEquipSlot inventoryItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1936,7 +1988,7 @@ public okhttp3.Call unequipOwnInventorySlotCall(InventoryEquipSlot inventoryItem } @SuppressWarnings("rawtypes") - private okhttp3.Call unequipOwnInventorySlotValidateBeforeCall(InventoryEquipSlot inventoryItemId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call unequipOwnInventorySlotValidateBeforeCall(@javax.annotation.Nonnull InventoryEquipSlot inventoryItemId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'inventoryItemId' is set if (inventoryItemId == null) { throw new ApiException("Missing the required parameter 'inventoryItemId' when calling unequipOwnInventorySlot(Async)"); @@ -1953,13 +2005,14 @@ private okhttp3.Call unequipOwnInventorySlotValidateBeforeCall(InventoryEquipSlo * @return String * @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 string. -
401 Error response due to missing auth cookie. -
*/ - public String unequipOwnInventorySlot(InventoryEquipSlot inventoryItemId) throws ApiException { + public String unequipOwnInventorySlot(@javax.annotation.Nonnull InventoryEquipSlot inventoryItemId) throws ApiException { ApiResponse localVarResp = unequipOwnInventorySlotWithHttpInfo(inventoryItemId); return localVarResp.getData(); } @@ -1971,13 +2024,14 @@ public String unequipOwnInventorySlot(InventoryEquipSlot inventoryItemId) throws * @return ApiResponse<String> * @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 string. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse unequipOwnInventorySlotWithHttpInfo(InventoryEquipSlot inventoryItemId) throws ApiException { + public ApiResponse unequipOwnInventorySlotWithHttpInfo(@javax.annotation.Nonnull InventoryEquipSlot inventoryItemId) throws ApiException { okhttp3.Call localVarCall = unequipOwnInventorySlotValidateBeforeCall(inventoryItemId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1991,13 +2045,14 @@ public ApiResponse unequipOwnInventorySlotWithHttpInfo(InventoryEquipSlo * @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 string. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call unequipOwnInventorySlotAsync(InventoryEquipSlot inventoryItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unequipOwnInventorySlotAsync(@javax.annotation.Nonnull InventoryEquipSlot inventoryItemId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = unequipOwnInventorySlotValidateBeforeCall(inventoryItemId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2012,13 +2067,14 @@ public okhttp3.Call unequipOwnInventorySlotAsync(InventoryEquipSlot inventoryIte * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateOwnInventoryItemCall(String inventoryItemId, UpdateInventoryItemRequest updateInventoryItemRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateOwnInventoryItemCall(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable UpdateInventoryItemRequest updateInventoryItemRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2065,7 +2121,7 @@ public okhttp3.Call updateOwnInventoryItemCall(String inventoryItemId, UpdateInv } @SuppressWarnings("rawtypes") - private okhttp3.Call updateOwnInventoryItemValidateBeforeCall(String inventoryItemId, UpdateInventoryItemRequest updateInventoryItemRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateOwnInventoryItemValidateBeforeCall(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable UpdateInventoryItemRequest updateInventoryItemRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'inventoryItemId' is set if (inventoryItemId == null) { throw new ApiException("Missing the required parameter 'inventoryItemId' when calling updateOwnInventoryItem(Async)"); @@ -2083,13 +2139,14 @@ private okhttp3.Call updateOwnInventoryItemValidateBeforeCall(String inventoryIt * @return InventoryItem * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public InventoryItem updateOwnInventoryItem(String inventoryItemId, UpdateInventoryItemRequest updateInventoryItemRequest) throws ApiException { + public InventoryItem updateOwnInventoryItem(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable UpdateInventoryItemRequest updateInventoryItemRequest) throws ApiException { ApiResponse localVarResp = updateOwnInventoryItemWithHttpInfo(inventoryItemId, updateInventoryItemRequest); return localVarResp.getData(); } @@ -2102,13 +2159,14 @@ public InventoryItem updateOwnInventoryItem(String inventoryItemId, UpdateInvent * @return ApiResponse<InventoryItem> * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse updateOwnInventoryItemWithHttpInfo(String inventoryItemId, UpdateInventoryItemRequest updateInventoryItemRequest) throws ApiException { + public ApiResponse updateOwnInventoryItemWithHttpInfo(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable UpdateInventoryItemRequest updateInventoryItemRequest) throws ApiException { okhttp3.Call localVarCall = updateOwnInventoryItemValidateBeforeCall(inventoryItemId, updateInventoryItemRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2123,13 +2181,14 @@ public ApiResponse updateOwnInventoryItemWithHttpInfo(String inve * @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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateOwnInventoryItemAsync(String inventoryItemId, UpdateInventoryItemRequest updateInventoryItemRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateOwnInventoryItemAsync(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable UpdateInventoryItemRequest updateInventoryItemRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateOwnInventoryItemValidateBeforeCall(inventoryItemId, updateInventoryItemRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/InviteApi.java b/src/main/java/io/github/vrchatapi/api/InviteApi.java index b02ab9c6..e709f8a0 100644 --- a/src/main/java/io/github/vrchatapi/api/InviteApi.java +++ b/src/main/java/io/github/vrchatapi/api/InviteApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -42,7 +42,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class InviteApi { private ApiClient localVarApiClient; @@ -90,7 +89,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -98,7 +98,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
Response Details
Status Code Description Response Headers
200 Returns a single InviteMessage object. -
400 Error response when trying to get an Invite Message with a negative slot number. -
404 Error response when trying to get an Invite Message with a too high slot number. -
*/ - public okhttp3.Call getInviteMessageCall(String userId, InviteMessageType messageType, Integer slot, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInviteMessageCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -146,7 +146,7 @@ public okhttp3.Call getInviteMessageCall(String userId, InviteMessageType messag } @SuppressWarnings("rawtypes") - private okhttp3.Call getInviteMessageValidateBeforeCall(String userId, InviteMessageType messageType, Integer slot, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInviteMessageValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot, 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 getInviteMessage(Async)"); @@ -175,7 +175,8 @@ private okhttp3.Call getInviteMessageValidateBeforeCall(String userId, InviteMes * @return InviteMessage * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -183,7 +184,7 @@ private okhttp3.Call getInviteMessageValidateBeforeCall(String userId, InviteMes
Response Details
Status Code Description Response Headers
200 Returns a single InviteMessage object. -
400 Error response when trying to get an Invite Message with a negative slot number. -
404 Error response when trying to get an Invite Message with a too high slot number. -
*/ - public InviteMessage getInviteMessage(String userId, InviteMessageType messageType, Integer slot) throws ApiException { + public InviteMessage getInviteMessage(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot) throws ApiException { ApiResponse localVarResp = getInviteMessageWithHttpInfo(userId, messageType, slot); return localVarResp.getData(); } @@ -197,7 +198,8 @@ public InviteMessage getInviteMessage(String userId, InviteMessageType messageTy * @return ApiResponse<InviteMessage> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -205,7 +207,7 @@ public InviteMessage getInviteMessage(String userId, InviteMessageType messageTy
Response Details
Status Code Description Response Headers
200 Returns a single InviteMessage object. -
400 Error response when trying to get an Invite Message with a negative slot number. -
404 Error response when trying to get an Invite Message with a too high slot number. -
*/ - public ApiResponse getInviteMessageWithHttpInfo(String userId, InviteMessageType messageType, Integer slot) throws ApiException { + public ApiResponse getInviteMessageWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot) throws ApiException { okhttp3.Call localVarCall = getInviteMessageValidateBeforeCall(userId, messageType, slot, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -221,7 +223,8 @@ public ApiResponse getInviteMessageWithHttpInfo(String userId, In * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -229,7 +232,7 @@ public ApiResponse getInviteMessageWithHttpInfo(String userId, In
Response Details
Status Code Description Response Headers
200 Returns a single InviteMessage object. -
400 Error response when trying to get an Invite Message with a negative slot number. -
404 Error response when trying to get an Invite Message with a too high slot number. -
*/ - public okhttp3.Call getInviteMessageAsync(String userId, InviteMessageType messageType, Integer slot, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInviteMessageAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getInviteMessageValidateBeforeCall(userId, messageType, slot, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -244,14 +247,15 @@ public okhttp3.Call getInviteMessageAsync(String userId, InviteMessageType messa * @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 list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
401 Error response due to missing authorization to perform that action. -
*/ - public okhttp3.Call getInviteMessagesCall(String userId, InviteMessageType messageType, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInviteMessagesCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -298,7 +302,7 @@ public okhttp3.Call getInviteMessagesCall(String userId, InviteMessageType messa } @SuppressWarnings("rawtypes") - private okhttp3.Call getInviteMessagesValidateBeforeCall(String userId, InviteMessageType messageType, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInviteMessagesValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, 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 getInviteMessages(Async)"); @@ -321,14 +325,15 @@ private okhttp3.Call getInviteMessagesValidateBeforeCall(String userId, InviteMe * @return List<InviteMessage> * @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 list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
401 Error response due to missing authorization to perform that action. -
*/ - public List getInviteMessages(String userId, InviteMessageType messageType) throws ApiException { + public List getInviteMessages(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType) throws ApiException { ApiResponse> localVarResp = getInviteMessagesWithHttpInfo(userId, messageType); return localVarResp.getData(); } @@ -341,14 +346,15 @@ public List getInviteMessages(String userId, InviteMessageType me * @return ApiResponse<List<InviteMessage>> * @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 list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
401 Error response due to missing authorization to perform that action. -
*/ - public ApiResponse> getInviteMessagesWithHttpInfo(String userId, InviteMessageType messageType) throws ApiException { + public ApiResponse> getInviteMessagesWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType) throws ApiException { okhttp3.Call localVarCall = getInviteMessagesValidateBeforeCall(userId, messageType, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -363,14 +369,15 @@ public ApiResponse> getInviteMessagesWithHttpInfo(String use * @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 list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
401 Error response due to missing authorization to perform that action. -
*/ - public okhttp3.Call getInviteMessagesAsync(String userId, InviteMessageType messageType, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getInviteMessagesAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getInviteMessagesValidateBeforeCall(userId, messageType, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -385,14 +392,15 @@ public okhttp3.Call getInviteMessagesAsync(String userId, InviteMessageType mess * @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 single SentNotifcation object. -
200 Returns a single SentNotification object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public okhttp3.Call inviteMyselfToCall(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call inviteMyselfToCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -439,7 +447,7 @@ public okhttp3.Call inviteMyselfToCall(String worldId, String instanceId, final } @SuppressWarnings("rawtypes") - private okhttp3.Call inviteMyselfToValidateBeforeCall(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call inviteMyselfToValidateBeforeCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling inviteMyselfTo(Async)"); @@ -462,14 +470,15 @@ private okhttp3.Call inviteMyselfToValidateBeforeCall(String worldId, String ins * @return SentNotification * @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 single SentNotifcation object. -
200 Returns a single SentNotification object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public SentNotification inviteMyselfTo(String worldId, String instanceId) throws ApiException { + public SentNotification inviteMyselfTo(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId) throws ApiException { ApiResponse localVarResp = inviteMyselfToWithHttpInfo(worldId, instanceId); return localVarResp.getData(); } @@ -482,14 +491,15 @@ public SentNotification inviteMyselfTo(String worldId, String instanceId) throws * @return ApiResponse<SentNotification> * @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 single SentNotifcation object. -
200 Returns a single SentNotification object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public ApiResponse inviteMyselfToWithHttpInfo(String worldId, String instanceId) throws ApiException { + public ApiResponse inviteMyselfToWithHttpInfo(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId) throws ApiException { okhttp3.Call localVarCall = inviteMyselfToValidateBeforeCall(worldId, instanceId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -504,14 +514,15 @@ public ApiResponse inviteMyselfToWithHttpInfo(String worldId, * @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 single SentNotifcation object. -
200 Returns a single SentNotification object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existant instance -
404 Error response due to non existent instance -
*/ - public okhttp3.Call inviteMyselfToAsync(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call inviteMyselfToAsync(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = inviteMyselfToValidateBeforeCall(worldId, instanceId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -526,13 +537,14 @@ public okhttp3.Call inviteMyselfToAsync(String worldId, String instanceId, final * @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 single SentNotifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public okhttp3.Call inviteUserCall(String userId, InviteRequest inviteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call inviteUserCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteRequest inviteRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -579,7 +591,7 @@ public okhttp3.Call inviteUserCall(String userId, InviteRequest inviteRequest, f } @SuppressWarnings("rawtypes") - private okhttp3.Call inviteUserValidateBeforeCall(String userId, InviteRequest inviteRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call inviteUserValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteRequest inviteRequest, 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 inviteUser(Async)"); @@ -602,13 +614,14 @@ private okhttp3.Call inviteUserValidateBeforeCall(String userId, InviteRequest i * @return SentNotification * @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 single SentNotifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public SentNotification inviteUser(String userId, InviteRequest inviteRequest) throws ApiException { + public SentNotification inviteUser(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteRequest inviteRequest) throws ApiException { ApiResponse localVarResp = inviteUserWithHttpInfo(userId, inviteRequest); return localVarResp.getData(); } @@ -621,13 +634,14 @@ public SentNotification inviteUser(String userId, InviteRequest inviteRequest) t * @return ApiResponse<SentNotification> * @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 single SentNotifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public ApiResponse inviteUserWithHttpInfo(String userId, InviteRequest inviteRequest) throws ApiException { + public ApiResponse inviteUserWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteRequest inviteRequest) throws ApiException { okhttp3.Call localVarCall = inviteUserValidateBeforeCall(userId, inviteRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -642,13 +656,14 @@ public ApiResponse inviteUserWithHttpInfo(String userId, Invit * @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 single SentNotifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public okhttp3.Call inviteUserAsync(String userId, InviteRequest inviteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call inviteUserAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteRequest inviteRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = inviteUserValidateBeforeCall(userId, inviteRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -664,13 +679,14 @@ public okhttp3.Call inviteUserAsync(String userId, InviteRequest inviteRequest, * @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 single SentNotifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public okhttp3.Call inviteUserWithPhotoCall(String userId, InviteRequest data, File image, final ApiCallback _callback) throws ApiException { + public okhttp3.Call inviteUserWithPhotoCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteRequest data, @javax.annotation.Nonnull File image, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -725,7 +741,7 @@ public okhttp3.Call inviteUserWithPhotoCall(String userId, InviteRequest data, F } @SuppressWarnings("rawtypes") - private okhttp3.Call inviteUserWithPhotoValidateBeforeCall(String userId, InviteRequest data, File image, final ApiCallback _callback) throws ApiException { + private okhttp3.Call inviteUserWithPhotoValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteRequest data, @javax.annotation.Nonnull File image, 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 inviteUserWithPhoto(Async)"); @@ -754,13 +770,14 @@ private okhttp3.Call inviteUserWithPhotoValidateBeforeCall(String userId, Invite * @return SentNotification * @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 single SentNotifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public SentNotification inviteUserWithPhoto(String userId, InviteRequest data, File image) throws ApiException { + public SentNotification inviteUserWithPhoto(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteRequest data, @javax.annotation.Nonnull File image) throws ApiException { ApiResponse localVarResp = inviteUserWithPhotoWithHttpInfo(userId, data, image); return localVarResp.getData(); } @@ -774,13 +791,14 @@ public SentNotification inviteUserWithPhoto(String userId, InviteRequest data, F * @return ApiResponse<SentNotification> * @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 single SentNotifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public ApiResponse inviteUserWithPhotoWithHttpInfo(String userId, InviteRequest data, File image) throws ApiException { + public ApiResponse inviteUserWithPhotoWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteRequest data, @javax.annotation.Nonnull File image) throws ApiException { okhttp3.Call localVarCall = inviteUserWithPhotoValidateBeforeCall(userId, data, image, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -796,13 +814,14 @@ public ApiResponse inviteUserWithPhotoWithHttpInfo(String user * @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 single SentNotifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public okhttp3.Call inviteUserWithPhotoAsync(String userId, InviteRequest data, File image, final ApiCallback _callback) throws ApiException { + public okhttp3.Call inviteUserWithPhotoAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteRequest data, @javax.annotation.Nonnull File image, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = inviteUserWithPhotoValidateBeforeCall(userId, data, image, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -817,13 +836,14 @@ public okhttp3.Call inviteUserWithPhotoAsync(String userId, InviteRequest data, * @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 single Notifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public okhttp3.Call requestInviteCall(String userId, RequestInviteRequest requestInviteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call requestInviteCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable RequestInviteRequest requestInviteRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -870,7 +890,7 @@ public okhttp3.Call requestInviteCall(String userId, RequestInviteRequest reques } @SuppressWarnings("rawtypes") - private okhttp3.Call requestInviteValidateBeforeCall(String userId, RequestInviteRequest requestInviteRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call requestInviteValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable RequestInviteRequest requestInviteRequest, 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 requestInvite(Async)"); @@ -888,13 +908,14 @@ private okhttp3.Call requestInviteValidateBeforeCall(String userId, RequestInvit * @return Notification * @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 single Notifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public Notification requestInvite(String userId, RequestInviteRequest requestInviteRequest) throws ApiException { + public Notification requestInvite(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable RequestInviteRequest requestInviteRequest) throws ApiException { ApiResponse localVarResp = requestInviteWithHttpInfo(userId, requestInviteRequest); return localVarResp.getData(); } @@ -907,13 +928,14 @@ public Notification requestInvite(String userId, RequestInviteRequest requestInv * @return ApiResponse<Notification> * @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 single Notifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public ApiResponse requestInviteWithHttpInfo(String userId, RequestInviteRequest requestInviteRequest) throws ApiException { + public ApiResponse requestInviteWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable RequestInviteRequest requestInviteRequest) throws ApiException { okhttp3.Call localVarCall = requestInviteValidateBeforeCall(userId, requestInviteRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -928,13 +950,14 @@ public ApiResponse requestInviteWithHttpInfo(String userId, Reques * @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 single Notifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public okhttp3.Call requestInviteAsync(String userId, RequestInviteRequest requestInviteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call requestInviteAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable RequestInviteRequest requestInviteRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = requestInviteValidateBeforeCall(userId, requestInviteRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -950,13 +973,14 @@ public okhttp3.Call requestInviteAsync(String userId, RequestInviteRequest reque * @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 single Notifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public okhttp3.Call requestInviteWithPhotoCall(String userId, RequestInviteRequest data, File image, final ApiCallback _callback) throws ApiException { + public okhttp3.Call requestInviteWithPhotoCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull RequestInviteRequest data, @javax.annotation.Nonnull File image, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1011,7 +1035,7 @@ public okhttp3.Call requestInviteWithPhotoCall(String userId, RequestInviteReque } @SuppressWarnings("rawtypes") - private okhttp3.Call requestInviteWithPhotoValidateBeforeCall(String userId, RequestInviteRequest data, File image, final ApiCallback _callback) throws ApiException { + private okhttp3.Call requestInviteWithPhotoValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull RequestInviteRequest data, @javax.annotation.Nonnull File image, 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 requestInviteWithPhoto(Async)"); @@ -1040,13 +1064,14 @@ private okhttp3.Call requestInviteWithPhotoValidateBeforeCall(String userId, Req * @return Notification * @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 single Notifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public Notification requestInviteWithPhoto(String userId, RequestInviteRequest data, File image) throws ApiException { + public Notification requestInviteWithPhoto(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull RequestInviteRequest data, @javax.annotation.Nonnull File image) throws ApiException { ApiResponse localVarResp = requestInviteWithPhotoWithHttpInfo(userId, data, image); return localVarResp.getData(); } @@ -1060,13 +1085,14 @@ public Notification requestInviteWithPhoto(String userId, RequestInviteRequest d * @return ApiResponse<Notification> * @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 single Notifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public ApiResponse requestInviteWithPhotoWithHttpInfo(String userId, RequestInviteRequest data, File image) throws ApiException { + public ApiResponse requestInviteWithPhotoWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull RequestInviteRequest data, @javax.annotation.Nonnull File image) throws ApiException { okhttp3.Call localVarCall = requestInviteWithPhotoValidateBeforeCall(userId, data, image, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1082,13 +1108,14 @@ public ApiResponse requestInviteWithPhotoWithHttpInfo(String userI * @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 single Notifcation object. -
403 Error response when trying to invite someome whom you are not friends with. -
200 Returns a single Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
*/ - public okhttp3.Call requestInviteWithPhotoAsync(String userId, RequestInviteRequest data, File image, final ApiCallback _callback) throws ApiException { + public okhttp3.Call requestInviteWithPhotoAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull RequestInviteRequest data, @javax.annotation.Nonnull File image, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = requestInviteWithPhotoValidateBeforeCall(userId, data, image, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1104,16 +1131,17 @@ public okhttp3.Call requestInviteWithPhotoAsync(String userId, RequestInviteRequ * @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 list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
401 Error response due to missing authorization to perform that action. -
404 Error response when trying to reset an Invite Message whos slot doesn't exist. -
404 Error response when trying to reset an Invite Message whose slot doesn't exist. -
429 Error response when trying to update an Invite Message before the cooldown has expired. -
*/ - public okhttp3.Call resetInviteMessageCall(String userId, InviteMessageType messageType, Integer slot, final ApiCallback _callback) throws ApiException { + public okhttp3.Call resetInviteMessageCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1161,7 +1189,7 @@ public okhttp3.Call resetInviteMessageCall(String userId, InviteMessageType mess } @SuppressWarnings("rawtypes") - private okhttp3.Call resetInviteMessageValidateBeforeCall(String userId, InviteMessageType messageType, Integer slot, final ApiCallback _callback) throws ApiException { + private okhttp3.Call resetInviteMessageValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot, 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 resetInviteMessage(Async)"); @@ -1190,16 +1218,17 @@ private okhttp3.Call resetInviteMessageValidateBeforeCall(String userId, InviteM * @return List<InviteMessage> * @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 list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
401 Error response due to missing authorization to perform that action. -
404 Error response when trying to reset an Invite Message whos slot doesn't exist. -
404 Error response when trying to reset an Invite Message whose slot doesn't exist. -
429 Error response when trying to update an Invite Message before the cooldown has expired. -
*/ - public List resetInviteMessage(String userId, InviteMessageType messageType, Integer slot) throws ApiException { + public List resetInviteMessage(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot) throws ApiException { ApiResponse> localVarResp = resetInviteMessageWithHttpInfo(userId, messageType, slot); return localVarResp.getData(); } @@ -1213,16 +1242,17 @@ public List resetInviteMessage(String userId, InviteMessageType m * @return ApiResponse<List<InviteMessage>> * @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 list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
401 Error response due to missing authorization to perform that action. -
404 Error response when trying to reset an Invite Message whos slot doesn't exist. -
404 Error response when trying to reset an Invite Message whose slot doesn't exist. -
429 Error response when trying to update an Invite Message before the cooldown has expired. -
*/ - public ApiResponse> resetInviteMessageWithHttpInfo(String userId, InviteMessageType messageType, Integer slot) throws ApiException { + public ApiResponse> resetInviteMessageWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot) throws ApiException { okhttp3.Call localVarCall = resetInviteMessageValidateBeforeCall(userId, messageType, slot, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1238,16 +1268,17 @@ public ApiResponse> resetInviteMessageWithHttpInfo(String us * @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 list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
401 Error response due to missing authorization to perform that action. -
404 Error response when trying to reset an Invite Message whos slot doesn't exist. -
404 Error response when trying to reset an Invite Message whose slot doesn't exist. -
429 Error response when trying to update an Invite Message before the cooldown has expired. -
*/ - public okhttp3.Call resetInviteMessageAsync(String userId, InviteMessageType messageType, Integer slot, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call resetInviteMessageAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = resetInviteMessageValidateBeforeCall(userId, messageType, slot, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1262,13 +1293,14 @@ public okhttp3.Call resetInviteMessageAsync(String userId, InviteMessageType mes * @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 single Notifcation object. -
200 Returns a single Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
*/ - public okhttp3.Call respondInviteCall(String notificationId, InviteResponse inviteResponse, final ApiCallback _callback) throws ApiException { + public okhttp3.Call respondInviteCall(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull InviteResponse inviteResponse, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1315,7 +1347,7 @@ public okhttp3.Call respondInviteCall(String notificationId, InviteResponse invi } @SuppressWarnings("rawtypes") - private okhttp3.Call respondInviteValidateBeforeCall(String notificationId, InviteResponse inviteResponse, final ApiCallback _callback) throws ApiException { + private okhttp3.Call respondInviteValidateBeforeCall(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull InviteResponse inviteResponse, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling respondInvite(Async)"); @@ -1338,13 +1370,14 @@ private okhttp3.Call respondInviteValidateBeforeCall(String notificationId, Invi * @return Notification * @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 single Notifcation object. -
200 Returns a single Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
*/ - public Notification respondInvite(String notificationId, InviteResponse inviteResponse) throws ApiException { + public Notification respondInvite(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull InviteResponse inviteResponse) throws ApiException { ApiResponse localVarResp = respondInviteWithHttpInfo(notificationId, inviteResponse); return localVarResp.getData(); } @@ -1357,13 +1390,14 @@ public Notification respondInvite(String notificationId, InviteResponse inviteRe * @return ApiResponse<Notification> * @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 single Notifcation object. -
200 Returns a single Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
*/ - public ApiResponse respondInviteWithHttpInfo(String notificationId, InviteResponse inviteResponse) throws ApiException { + public ApiResponse respondInviteWithHttpInfo(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull InviteResponse inviteResponse) throws ApiException { okhttp3.Call localVarCall = respondInviteValidateBeforeCall(notificationId, inviteResponse, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1378,13 +1412,14 @@ public ApiResponse respondInviteWithHttpInfo(String notificationId * @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 single Notifcation object. -
200 Returns a single Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
*/ - public okhttp3.Call respondInviteAsync(String notificationId, InviteResponse inviteResponse, final ApiCallback _callback) throws ApiException { + public okhttp3.Call respondInviteAsync(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull InviteResponse inviteResponse, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = respondInviteValidateBeforeCall(notificationId, inviteResponse, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1400,13 +1435,14 @@ public okhttp3.Call respondInviteAsync(String notificationId, InviteResponse inv * @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 single Notifcation object. -
200 Returns a single Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
*/ - public okhttp3.Call respondInviteWithPhotoCall(String notificationId, InviteResponse data, File image, final ApiCallback _callback) throws ApiException { + public okhttp3.Call respondInviteWithPhotoCall(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull InviteResponse data, @javax.annotation.Nonnull File image, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1461,7 +1497,7 @@ public okhttp3.Call respondInviteWithPhotoCall(String notificationId, InviteResp } @SuppressWarnings("rawtypes") - private okhttp3.Call respondInviteWithPhotoValidateBeforeCall(String notificationId, InviteResponse data, File image, final ApiCallback _callback) throws ApiException { + private okhttp3.Call respondInviteWithPhotoValidateBeforeCall(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull InviteResponse data, @javax.annotation.Nonnull File image, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling respondInviteWithPhoto(Async)"); @@ -1490,13 +1526,14 @@ private okhttp3.Call respondInviteWithPhotoValidateBeforeCall(String notificatio * @return Notification * @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 single Notifcation object. -
200 Returns a single Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
*/ - public Notification respondInviteWithPhoto(String notificationId, InviteResponse data, File image) throws ApiException { + public Notification respondInviteWithPhoto(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull InviteResponse data, @javax.annotation.Nonnull File image) throws ApiException { ApiResponse localVarResp = respondInviteWithPhotoWithHttpInfo(notificationId, data, image); return localVarResp.getData(); } @@ -1510,13 +1547,14 @@ public Notification respondInviteWithPhoto(String notificationId, InviteResponse * @return ApiResponse<Notification> * @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 single Notifcation object. -
200 Returns a single Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
*/ - public ApiResponse respondInviteWithPhotoWithHttpInfo(String notificationId, InviteResponse data, File image) throws ApiException { + public ApiResponse respondInviteWithPhotoWithHttpInfo(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull InviteResponse data, @javax.annotation.Nonnull File image) throws ApiException { okhttp3.Call localVarCall = respondInviteWithPhotoValidateBeforeCall(notificationId, data, image, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1532,13 +1570,14 @@ public ApiResponse respondInviteWithPhotoWithHttpInfo(String notif * @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 single Notifcation object. -
200 Returns a single Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
*/ - public okhttp3.Call respondInviteWithPhotoAsync(String notificationId, InviteResponse data, File image, final ApiCallback _callback) throws ApiException { + public okhttp3.Call respondInviteWithPhotoAsync(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull InviteResponse data, @javax.annotation.Nonnull File image, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = respondInviteWithPhotoValidateBeforeCall(notificationId, data, image, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1555,7 +1594,8 @@ public okhttp3.Call respondInviteWithPhotoAsync(String notificationId, InviteRes * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1563,7 +1603,7 @@ public okhttp3.Call respondInviteWithPhotoAsync(String notificationId, InviteRes
Response Details
Status Code Description Response Headers
200 Returns a list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
429 Error response when trying to update an Invite Message before the cooldown has expired. -
*/ - public okhttp3.Call updateInviteMessageCall(String userId, InviteMessageType messageType, Integer slot, UpdateInviteMessageRequest updateInviteMessageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateInviteMessageCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot, @javax.annotation.Nullable UpdateInviteMessageRequest updateInviteMessageRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1612,7 +1652,7 @@ public okhttp3.Call updateInviteMessageCall(String userId, InviteMessageType mes } @SuppressWarnings("rawtypes") - private okhttp3.Call updateInviteMessageValidateBeforeCall(String userId, InviteMessageType messageType, Integer slot, UpdateInviteMessageRequest updateInviteMessageRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateInviteMessageValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot, @javax.annotation.Nullable UpdateInviteMessageRequest updateInviteMessageRequest, 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 updateInviteMessage(Async)"); @@ -1642,7 +1682,8 @@ private okhttp3.Call updateInviteMessageValidateBeforeCall(String userId, Invite * @return List<InviteMessage> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -1650,7 +1691,7 @@ private okhttp3.Call updateInviteMessageValidateBeforeCall(String userId, Invite
Response Details
Status Code Description Response Headers
200 Returns a list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
429 Error response when trying to update an Invite Message before the cooldown has expired. -
*/ - public List updateInviteMessage(String userId, InviteMessageType messageType, Integer slot, UpdateInviteMessageRequest updateInviteMessageRequest) throws ApiException { + public List updateInviteMessage(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot, @javax.annotation.Nullable UpdateInviteMessageRequest updateInviteMessageRequest) throws ApiException { ApiResponse> localVarResp = updateInviteMessageWithHttpInfo(userId, messageType, slot, updateInviteMessageRequest); return localVarResp.getData(); } @@ -1665,7 +1706,8 @@ public List updateInviteMessage(String userId, InviteMessageType * @return ApiResponse<List<InviteMessage>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -1673,7 +1715,7 @@ public List updateInviteMessage(String userId, InviteMessageType
Response Details
Status Code Description Response Headers
200 Returns a list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
429 Error response when trying to update an Invite Message before the cooldown has expired. -
*/ - public ApiResponse> updateInviteMessageWithHttpInfo(String userId, InviteMessageType messageType, Integer slot, UpdateInviteMessageRequest updateInviteMessageRequest) throws ApiException { + public ApiResponse> updateInviteMessageWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot, @javax.annotation.Nullable UpdateInviteMessageRequest updateInviteMessageRequest) throws ApiException { okhttp3.Call localVarCall = updateInviteMessageValidateBeforeCall(userId, messageType, slot, updateInviteMessageRequest, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1690,7 +1732,8 @@ public ApiResponse> updateInviteMessageWithHttpInfo(String u * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -1698,7 +1741,7 @@ public ApiResponse> updateInviteMessageWithHttpInfo(String u
Response Details
Status Code Description Response Headers
200 Returns a list of InviteMessage objects. -
400 Error response when trying to update an Invite Message with an invalid slot number. -
429 Error response when trying to update an Invite Message before the cooldown has expired. -
*/ - public okhttp3.Call updateInviteMessageAsync(String userId, InviteMessageType messageType, Integer slot, UpdateInviteMessageRequest updateInviteMessageRequest, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call updateInviteMessageAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteMessageType messageType, @javax.annotation.Nonnull Integer slot, @javax.annotation.Nullable UpdateInviteMessageRequest updateInviteMessageRequest, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = updateInviteMessageValidateBeforeCall(userId, messageType, slot, updateInviteMessageRequest, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/JamsApi.java b/src/main/java/io/github/vrchatapi/api/JamsApi.java index 64e91e33..18d6d8d2 100644 --- a/src/main/java/io/github/vrchatapi/api/JamsApi.java +++ b/src/main/java/io/github/vrchatapi/api/JamsApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -37,7 +37,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class JamsApi { private ApiClient localVarApiClient; @@ -84,7 +83,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -92,7 +92,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
Response Details
Status Code Description Response Headers
200 Returns an Success object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public okhttp3.Call deleteJamSubmissionCall(String jamId, String jamSubmissionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteJamSubmissionCall(@javax.annotation.Nonnull String jamId, @javax.annotation.Nonnull String jamSubmissionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -139,7 +139,7 @@ public okhttp3.Call deleteJamSubmissionCall(String jamId, String jamSubmissionId } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteJamSubmissionValidateBeforeCall(String jamId, String jamSubmissionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteJamSubmissionValidateBeforeCall(@javax.annotation.Nonnull String jamId, @javax.annotation.Nonnull String jamSubmissionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'jamId' is set if (jamId == null) { throw new ApiException("Missing the required parameter 'jamId' when calling deleteJamSubmission(Async)"); @@ -162,7 +162,8 @@ private okhttp3.Call deleteJamSubmissionValidateBeforeCall(String jamId, String * @return Success * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -170,7 +171,7 @@ private okhttp3.Call deleteJamSubmissionValidateBeforeCall(String jamId, String
Response Details
Status Code Description Response Headers
200 Returns an Success object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public Success deleteJamSubmission(String jamId, String jamSubmissionId) throws ApiException { + public Success deleteJamSubmission(@javax.annotation.Nonnull String jamId, @javax.annotation.Nonnull String jamSubmissionId) throws ApiException { ApiResponse localVarResp = deleteJamSubmissionWithHttpInfo(jamId, jamSubmissionId); return localVarResp.getData(); } @@ -183,7 +184,8 @@ public Success deleteJamSubmission(String jamId, String jamSubmissionId) throws * @return ApiResponse<Success> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -191,7 +193,7 @@ public Success deleteJamSubmission(String jamId, String jamSubmissionId) throws
Response Details
Status Code Description Response Headers
200 Returns an Success object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public ApiResponse deleteJamSubmissionWithHttpInfo(String jamId, String jamSubmissionId) throws ApiException { + public ApiResponse deleteJamSubmissionWithHttpInfo(@javax.annotation.Nonnull String jamId, @javax.annotation.Nonnull String jamSubmissionId) throws ApiException { okhttp3.Call localVarCall = deleteJamSubmissionValidateBeforeCall(jamId, jamSubmissionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -206,7 +208,8 @@ public ApiResponse deleteJamSubmissionWithHttpInfo(String jamId, String * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -214,7 +217,7 @@ public ApiResponse deleteJamSubmissionWithHttpInfo(String jamId, String
Response Details
Status Code Description Response Headers
200 Returns an Success object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public okhttp3.Call deleteJamSubmissionAsync(String jamId, String jamSubmissionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteJamSubmissionAsync(@javax.annotation.Nonnull String jamId, @javax.annotation.Nonnull String jamSubmissionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteJamSubmissionValidateBeforeCall(jamId, jamSubmissionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -228,13 +231,14 @@ public okhttp3.Call deleteJamSubmissionAsync(String jamId, String jamSubmissionI * @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 Jam object. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public okhttp3.Call getJamCall(String jamId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getJamCall(@javax.annotation.Nonnull String jamId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -280,7 +284,7 @@ public okhttp3.Call getJamCall(String jamId, final ApiCallback _callback) throws } @SuppressWarnings("rawtypes") - private okhttp3.Call getJamValidateBeforeCall(String jamId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getJamValidateBeforeCall(@javax.annotation.Nonnull String jamId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'jamId' is set if (jamId == null) { throw new ApiException("Missing the required parameter 'jamId' when calling getJam(Async)"); @@ -297,13 +301,14 @@ private okhttp3.Call getJamValidateBeforeCall(String jamId, final ApiCallback _c * @return Jam * @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 Jam object. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public Jam getJam(String jamId) throws ApiException { + public Jam getJam(@javax.annotation.Nonnull String jamId) throws ApiException { ApiResponse localVarResp = getJamWithHttpInfo(jamId); return localVarResp.getData(); } @@ -315,13 +320,14 @@ public Jam getJam(String jamId) throws ApiException { * @return ApiResponse<Jam> * @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 Jam object. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public ApiResponse getJamWithHttpInfo(String jamId) throws ApiException { + public ApiResponse getJamWithHttpInfo(@javax.annotation.Nonnull String jamId) throws ApiException { okhttp3.Call localVarCall = getJamValidateBeforeCall(jamId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -335,13 +341,14 @@ public ApiResponse getJamWithHttpInfo(String jamId) throws ApiException { * @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 Jam object. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public okhttp3.Call getJamAsync(String jamId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getJamAsync(@javax.annotation.Nonnull String jamId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getJamValidateBeforeCall(jamId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -357,13 +364,14 @@ public okhttp3.Call getJamAsync(String jamId, final ApiCallback _callback) * @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 list of JamSubmission objects. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public okhttp3.Call getJamSubmissionsCall(String jamId, String contentId, String submitterId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getJamSubmissionsCall(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable String contentId, @javax.annotation.Nullable String submitterId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -417,7 +425,7 @@ public okhttp3.Call getJamSubmissionsCall(String jamId, String contentId, String } @SuppressWarnings("rawtypes") - private okhttp3.Call getJamSubmissionsValidateBeforeCall(String jamId, String contentId, String submitterId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getJamSubmissionsValidateBeforeCall(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable String contentId, @javax.annotation.Nullable String submitterId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'jamId' is set if (jamId == null) { throw new ApiException("Missing the required parameter 'jamId' when calling getJamSubmissions(Async)"); @@ -436,13 +444,14 @@ private okhttp3.Call getJamSubmissionsValidateBeforeCall(String jamId, String co * @return List<JamSubmission> * @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 list of JamSubmission objects. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public List getJamSubmissions(String jamId, String contentId, String submitterId) throws ApiException { + public List getJamSubmissions(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable String contentId, @javax.annotation.Nullable String submitterId) throws ApiException { ApiResponse> localVarResp = getJamSubmissionsWithHttpInfo(jamId, contentId, submitterId); return localVarResp.getData(); } @@ -456,13 +465,14 @@ public List getJamSubmissions(String jamId, String contentId, Str * @return ApiResponse<List<JamSubmission>> * @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 list of JamSubmission objects. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public ApiResponse> getJamSubmissionsWithHttpInfo(String jamId, String contentId, String submitterId) throws ApiException { + public ApiResponse> getJamSubmissionsWithHttpInfo(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable String contentId, @javax.annotation.Nullable String submitterId) throws ApiException { okhttp3.Call localVarCall = getJamSubmissionsValidateBeforeCall(jamId, contentId, submitterId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -478,13 +488,14 @@ public ApiResponse> getJamSubmissionsWithHttpInfo(String jam * @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 list of JamSubmission objects. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public okhttp3.Call getJamSubmissionsAsync(String jamId, String contentId, String submitterId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getJamSubmissionsAsync(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable String contentId, @javax.annotation.Nullable String submitterId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getJamSubmissionsValidateBeforeCall(jamId, contentId, submitterId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -498,12 +509,13 @@ public okhttp3.Call getJamSubmissionsAsync(String jamId, String contentId, Strin * @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 list of Jam objects. -
*/ - public okhttp3.Call getJamsCall(String type, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getJamsCall(@javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -552,7 +564,7 @@ public okhttp3.Call getJamsCall(String type, final ApiCallback _callback) throws } @SuppressWarnings("rawtypes") - private okhttp3.Call getJamsValidateBeforeCall(String type, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getJamsValidateBeforeCall(@javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { return getJamsCall(type, _callback); } @@ -564,12 +576,13 @@ private okhttp3.Call getJamsValidateBeforeCall(String type, final ApiCallback _c * @return List<Jam> * @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 list of Jam objects. -
*/ - public List getJams(String type) throws ApiException { + public List getJams(@javax.annotation.Nullable String type) throws ApiException { ApiResponse> localVarResp = getJamsWithHttpInfo(type); return localVarResp.getData(); } @@ -581,12 +594,13 @@ public List getJams(String type) throws ApiException { * @return ApiResponse<List<Jam>> * @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 list of Jam objects. -
*/ - public ApiResponse> getJamsWithHttpInfo(String type) throws ApiException { + public ApiResponse> getJamsWithHttpInfo(@javax.annotation.Nullable String type) throws ApiException { okhttp3.Call localVarCall = getJamsValidateBeforeCall(type, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -600,12 +614,13 @@ public ApiResponse> getJamsWithHttpInfo(String type) throws ApiExcepti * @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 list of Jam objects. -
*/ - public okhttp3.Call getJamsAsync(String type, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getJamsAsync(@javax.annotation.Nullable String type, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getJamsValidateBeforeCall(type, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -620,14 +635,15 @@ public okhttp3.Call getJamsAsync(String type, final ApiCallback> _call * @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 single JamSubmission object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public okhttp3.Call submitJamContentCall(String jamId, CreateJamSubmissionRequest createJamSubmissionRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call submitJamContentCall(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable CreateJamSubmissionRequest createJamSubmissionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -674,7 +690,7 @@ public okhttp3.Call submitJamContentCall(String jamId, CreateJamSubmissionReques } @SuppressWarnings("rawtypes") - private okhttp3.Call submitJamContentValidateBeforeCall(String jamId, CreateJamSubmissionRequest createJamSubmissionRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call submitJamContentValidateBeforeCall(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable CreateJamSubmissionRequest createJamSubmissionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'jamId' is set if (jamId == null) { throw new ApiException("Missing the required parameter 'jamId' when calling submitJamContent(Async)"); @@ -692,14 +708,15 @@ private okhttp3.Call submitJamContentValidateBeforeCall(String jamId, CreateJamS * @return JamSubmission * @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 single JamSubmission object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public JamSubmission submitJamContent(String jamId, CreateJamSubmissionRequest createJamSubmissionRequest) throws ApiException { + public JamSubmission submitJamContent(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable CreateJamSubmissionRequest createJamSubmissionRequest) throws ApiException { ApiResponse localVarResp = submitJamContentWithHttpInfo(jamId, createJamSubmissionRequest); return localVarResp.getData(); } @@ -712,14 +729,15 @@ public JamSubmission submitJamContent(String jamId, CreateJamSubmissionRequest c * @return ApiResponse<JamSubmission> * @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 single JamSubmission object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public ApiResponse submitJamContentWithHttpInfo(String jamId, CreateJamSubmissionRequest createJamSubmissionRequest) throws ApiException { + public ApiResponse submitJamContentWithHttpInfo(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable CreateJamSubmissionRequest createJamSubmissionRequest) throws ApiException { okhttp3.Call localVarCall = submitJamContentValidateBeforeCall(jamId, createJamSubmissionRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -734,14 +752,15 @@ public ApiResponse submitJamContentWithHttpInfo(String jamId, Cre * @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 single JamSubmission object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent jam. -
*/ - public okhttp3.Call submitJamContentAsync(String jamId, CreateJamSubmissionRequest createJamSubmissionRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call submitJamContentAsync(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable CreateJamSubmissionRequest createJamSubmissionRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = submitJamContentValidateBeforeCall(jamId, createJamSubmissionRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/MiscellaneousApi.java b/src/main/java/io/github/vrchatapi/api/MiscellaneousApi.java index 48062e83..06544289 100644 --- a/src/main/java/io/github/vrchatapi/api/MiscellaneousApi.java +++ b/src/main/java/io/github/vrchatapi/api/MiscellaneousApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,7 +38,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class MiscellaneousApi { private ApiClient localVarApiClient; @@ -83,7 +82,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -145,7 +145,8 @@ private okhttp3.Call getAssignedPermissionsValidateBeforeCall(final ApiCallback * @return List<Permission> * @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 list of Permission objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -162,7 +163,8 @@ public List getAssignedPermissions() throws ApiException { * @return ApiResponse<List<Permission>> * @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 list of Permission objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -181,7 +183,8 @@ public ApiResponse> getAssignedPermissionsWithHttpInfo() throws * @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 list of Permission objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -202,13 +205,14 @@ public okhttp3.Call getAssignedPermissionsAsync(final ApiCallback +
Response Details
Status Code Description Response Headers
200 Returns a list of Permission objects. -
401 Error response due to missing auth cookie. -
+
Response Details
Status Code Description Response Headers
200 **Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively. -
400 Error response when trying to download non-public and non-main JavaScript or CSS without Admin Credentials. -
*/ - public okhttp3.Call getCSSCall(String variant, String branch, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCSSCall(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -262,7 +266,7 @@ public okhttp3.Call getCSSCall(String variant, String branch, final ApiCallback } @SuppressWarnings("rawtypes") - private okhttp3.Call getCSSValidateBeforeCall(String variant, String branch, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCSSValidateBeforeCall(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch, final ApiCallback _callback) throws ApiException { return getCSSCall(variant, branch, _callback); } @@ -275,13 +279,14 @@ private okhttp3.Call getCSSValidateBeforeCall(String variant, String branch, fin * @return String * @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 **Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively. -
400 Error response when trying to download non-public and non-main JavaScript or CSS without Admin Credentials. -
*/ - public String getCSS(String variant, String branch) throws ApiException { + public String getCSS(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch) throws ApiException { ApiResponse localVarResp = getCSSWithHttpInfo(variant, branch); return localVarResp.getData(); } @@ -294,13 +299,14 @@ public String getCSS(String variant, String branch) throws ApiException { * @return ApiResponse<String> * @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 **Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively. -
400 Error response when trying to download non-public and non-main JavaScript or CSS without Admin Credentials. -
*/ - public ApiResponse getCSSWithHttpInfo(String variant, String branch) throws ApiException { + public ApiResponse getCSSWithHttpInfo(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch) throws ApiException { okhttp3.Call localVarCall = getCSSValidateBeforeCall(variant, branch, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -315,13 +321,14 @@ public ApiResponse getCSSWithHttpInfo(String variant, String branch) thr * @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 **Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively. -
400 Error response when trying to download non-public and non-main JavaScript or CSS without Admin Credentials. -
*/ - public okhttp3.Call getCSSAsync(String variant, String branch, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCSSAsync(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCSSValidateBeforeCall(variant, branch, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -334,7 +341,8 @@ public okhttp3.Call getCSSAsync(String variant, String branch, final ApiCallback * @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 the API's config. -
@@ -395,7 +403,8 @@ private okhttp3.Call getConfigValidateBeforeCall(final ApiCallback _callback) th * @return APIConfig * @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 the API's config. -
@@ -411,7 +420,8 @@ public APIConfig getConfig() throws ApiException { * @return ApiResponse<APIConfig> * @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 the API's config. -
@@ -429,7 +439,8 @@ public ApiResponse getConfigWithHttpInfo() throws ApiException { * @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 the API's config. -
@@ -447,7 +458,8 @@ public okhttp3.Call getConfigAsync(final ApiCallback _callback) throw * @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 -
@@ -508,7 +520,8 @@ private okhttp3.Call getCurrentOnlineUsersValidateBeforeCall(final ApiCallback _ * @return Integer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
@@ -524,7 +537,8 @@ public Integer getCurrentOnlineUsers() throws ApiException { * @return ApiResponse<Integer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
@@ -542,7 +556,8 @@ public ApiResponse getCurrentOnlineUsersWithHttpInfo() throws ApiExcept * @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 -
@@ -560,7 +575,8 @@ public okhttp3.Call getCurrentOnlineUsersAsync(final ApiCallback _callb * @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 the API's health. -
@@ -624,7 +640,8 @@ private okhttp3.Call getHealthValidateBeforeCall(final ApiCallback _callback) th * @return APIHealth * @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 the API's health. -
@@ -642,7 +659,8 @@ public APIHealth getHealth() throws ApiException { * @return ApiResponse<APIHealth> * @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 the API's health. -
@@ -662,7 +680,8 @@ public ApiResponse getHealthWithHttpInfo() throws ApiException { * @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 the API's health. -
@@ -684,12 +703,13 @@ public okhttp3.Call getHealthAsync(final ApiCallback _callback) throw * @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 list of InfoPush objects. -
*/ - public okhttp3.Call getInfoPushCall(String require, String include, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInfoPushCall(@javax.annotation.Nullable String require, @javax.annotation.Nullable String include, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -742,7 +762,7 @@ public okhttp3.Call getInfoPushCall(String require, String include, final ApiCal } @SuppressWarnings("rawtypes") - private okhttp3.Call getInfoPushValidateBeforeCall(String require, String include, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInfoPushValidateBeforeCall(@javax.annotation.Nullable String require, @javax.annotation.Nullable String include, final ApiCallback _callback) throws ApiException { return getInfoPushCall(require, include, _callback); } @@ -755,12 +775,13 @@ private okhttp3.Call getInfoPushValidateBeforeCall(String require, String includ * @return List<InfoPush> * @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 list of InfoPush objects. -
*/ - public List getInfoPush(String require, String include) throws ApiException { + public List getInfoPush(@javax.annotation.Nullable String require, @javax.annotation.Nullable String include) throws ApiException { ApiResponse> localVarResp = getInfoPushWithHttpInfo(require, include); return localVarResp.getData(); } @@ -773,12 +794,13 @@ public List getInfoPush(String require, String include) throws ApiExce * @return ApiResponse<List<InfoPush>> * @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 list of InfoPush objects. -
*/ - public ApiResponse> getInfoPushWithHttpInfo(String require, String include) throws ApiException { + public ApiResponse> getInfoPushWithHttpInfo(@javax.annotation.Nullable String require, @javax.annotation.Nullable String include) throws ApiException { okhttp3.Call localVarCall = getInfoPushValidateBeforeCall(require, include, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -793,12 +815,13 @@ public ApiResponse> getInfoPushWithHttpInfo(String require, Strin * @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 list of InfoPush objects. -
*/ - public okhttp3.Call getInfoPushAsync(String require, String include, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getInfoPushAsync(@javax.annotation.Nullable String require, @javax.annotation.Nullable String include, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getInfoPushValidateBeforeCall(require, include, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -813,13 +836,14 @@ public okhttp3.Call getInfoPushAsync(String require, String include, final ApiCa * @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 **Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively. -
400 Error response when trying to download non-public and non-main JavaScript or CSS without Admin Credentials. -
*/ - public okhttp3.Call getJavaScriptCall(String variant, String branch, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getJavaScriptCall(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -873,7 +897,7 @@ public okhttp3.Call getJavaScriptCall(String variant, String branch, final ApiCa } @SuppressWarnings("rawtypes") - private okhttp3.Call getJavaScriptValidateBeforeCall(String variant, String branch, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getJavaScriptValidateBeforeCall(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch, final ApiCallback _callback) throws ApiException { return getJavaScriptCall(variant, branch, _callback); } @@ -886,13 +910,14 @@ private okhttp3.Call getJavaScriptValidateBeforeCall(String variant, String bran * @return String * @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 **Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively. -
400 Error response when trying to download non-public and non-main JavaScript or CSS without Admin Credentials. -
*/ - public String getJavaScript(String variant, String branch) throws ApiException { + public String getJavaScript(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch) throws ApiException { ApiResponse localVarResp = getJavaScriptWithHttpInfo(variant, branch); return localVarResp.getData(); } @@ -905,13 +930,14 @@ public String getJavaScript(String variant, String branch) throws ApiException { * @return ApiResponse<String> * @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 **Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively. -
400 Error response when trying to download non-public and non-main JavaScript or CSS without Admin Credentials. -
*/ - public ApiResponse getJavaScriptWithHttpInfo(String variant, String branch) throws ApiException { + public ApiResponse getJavaScriptWithHttpInfo(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch) throws ApiException { okhttp3.Call localVarCall = getJavaScriptValidateBeforeCall(variant, branch, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -926,13 +952,14 @@ public ApiResponse getJavaScriptWithHttpInfo(String variant, String bran * @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 **Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively. -
400 Error response when trying to download non-public and non-main JavaScript or CSS without Admin Credentials. -
*/ - public okhttp3.Call getJavaScriptAsync(String variant, String branch, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getJavaScriptAsync(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getJavaScriptValidateBeforeCall(variant, branch, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -946,13 +973,14 @@ public okhttp3.Call getJavaScriptAsync(String variant, String branch, final ApiC * @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 single Permission object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getPermissionCall(String permissionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPermissionCall(@javax.annotation.Nonnull String permissionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -998,7 +1026,7 @@ public okhttp3.Call getPermissionCall(String permissionId, final ApiCallback _ca } @SuppressWarnings("rawtypes") - private okhttp3.Call getPermissionValidateBeforeCall(String permissionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPermissionValidateBeforeCall(@javax.annotation.Nonnull String permissionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'permissionId' is set if (permissionId == null) { throw new ApiException("Missing the required parameter 'permissionId' when calling getPermission(Async)"); @@ -1015,13 +1043,14 @@ private okhttp3.Call getPermissionValidateBeforeCall(String permissionId, final * @return Permission * @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 single Permission object. -
401 Error response due to missing auth cookie. -
*/ - public Permission getPermission(String permissionId) throws ApiException { + public Permission getPermission(@javax.annotation.Nonnull String permissionId) throws ApiException { ApiResponse localVarResp = getPermissionWithHttpInfo(permissionId); return localVarResp.getData(); } @@ -1033,13 +1062,14 @@ public Permission getPermission(String permissionId) throws ApiException { * @return ApiResponse<Permission> * @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 single Permission object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getPermissionWithHttpInfo(String permissionId) throws ApiException { + public ApiResponse getPermissionWithHttpInfo(@javax.annotation.Nonnull String permissionId) throws ApiException { okhttp3.Call localVarCall = getPermissionValidateBeforeCall(permissionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1053,13 +1083,14 @@ public ApiResponse getPermissionWithHttpInfo(String permissionId) th * @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 single Permission object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getPermissionAsync(String permissionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPermissionAsync(@javax.annotation.Nonnull String permissionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPermissionValidateBeforeCall(permissionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1072,7 +1103,8 @@ public okhttp3.Call getPermissionAsync(String permissionId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 OK -
@@ -1133,7 +1165,8 @@ private okhttp3.Call getSystemTimeValidateBeforeCall(final ApiCallback _callback * @return OffsetDateTime * @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 -
@@ -1149,7 +1182,8 @@ public OffsetDateTime getSystemTime() throws ApiException { * @return ApiResponse<OffsetDateTime> * @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 -
@@ -1167,7 +1201,8 @@ public ApiResponse getSystemTimeWithHttpInfo() throws ApiExcepti * @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 -
diff --git a/src/main/java/io/github/vrchatapi/api/NotificationsApi.java b/src/main/java/io/github/vrchatapi/api/NotificationsApi.java index 118fcd99..10f3ad9f 100644 --- a/src/main/java/io/github/vrchatapi/api/NotificationsApi.java +++ b/src/main/java/io/github/vrchatapi/api/NotificationsApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -37,7 +37,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class NotificationsApi { private ApiClient localVarApiClient; @@ -83,14 +82,15 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 Successful response after friending a user. -
401 Error response due to missing auth cookie. -
404 Error response when trying to accept a non-existent friend request. -
*/ - public okhttp3.Call acceptFriendRequestCall(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call acceptFriendRequestCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -136,7 +136,7 @@ public okhttp3.Call acceptFriendRequestCall(String notificationId, final ApiCall } @SuppressWarnings("rawtypes") - private okhttp3.Call acceptFriendRequestValidateBeforeCall(String notificationId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call acceptFriendRequestValidateBeforeCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling acceptFriendRequest(Async)"); @@ -153,14 +153,15 @@ private okhttp3.Call acceptFriendRequestValidateBeforeCall(String notificationId * @return Success * @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 Successful response after friending a user. -
401 Error response due to missing auth cookie. -
404 Error response when trying to accept a non-existent friend request. -
*/ - public Success acceptFriendRequest(String notificationId) throws ApiException { + public Success acceptFriendRequest(@javax.annotation.Nonnull String notificationId) throws ApiException { ApiResponse localVarResp = acceptFriendRequestWithHttpInfo(notificationId); return localVarResp.getData(); } @@ -172,14 +173,15 @@ public Success acceptFriendRequest(String notificationId) throws ApiException { * @return ApiResponse<Success> * @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 Successful response after friending a user. -
401 Error response due to missing auth cookie. -
404 Error response when trying to accept a non-existent friend request. -
*/ - public ApiResponse acceptFriendRequestWithHttpInfo(String notificationId) throws ApiException { + public ApiResponse acceptFriendRequestWithHttpInfo(@javax.annotation.Nonnull String notificationId) throws ApiException { okhttp3.Call localVarCall = acceptFriendRequestValidateBeforeCall(notificationId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -193,14 +195,15 @@ public ApiResponse acceptFriendRequestWithHttpInfo(String notificationI * @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 Successful response after friending a user. -
401 Error response due to missing auth cookie. -
404 Error response when trying to accept a non-existent friend request. -
*/ - public okhttp3.Call acceptFriendRequestAsync(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call acceptFriendRequestAsync(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = acceptFriendRequestValidateBeforeCall(notificationId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -214,14 +217,15 @@ public okhttp3.Call acceptFriendRequestAsync(String notificationId, final ApiCal * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public okhttp3.Call acknowledgeNotificationV2Call(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call acknowledgeNotificationV2Call(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -267,7 +271,7 @@ public okhttp3.Call acknowledgeNotificationV2Call(String notificationId, final A } @SuppressWarnings("rawtypes") - private okhttp3.Call acknowledgeNotificationV2ValidateBeforeCall(String notificationId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call acknowledgeNotificationV2ValidateBeforeCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling acknowledgeNotificationV2(Async)"); @@ -284,14 +288,15 @@ private okhttp3.Call acknowledgeNotificationV2ValidateBeforeCall(String notifica * @return NotificationV2 * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public NotificationV2 acknowledgeNotificationV2(String notificationId) throws ApiException { + public NotificationV2 acknowledgeNotificationV2(@javax.annotation.Nonnull String notificationId) throws ApiException { ApiResponse localVarResp = acknowledgeNotificationV2WithHttpInfo(notificationId); return localVarResp.getData(); } @@ -303,14 +308,15 @@ public NotificationV2 acknowledgeNotificationV2(String notificationId) throws Ap * @return ApiResponse<NotificationV2> * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public ApiResponse acknowledgeNotificationV2WithHttpInfo(String notificationId) throws ApiException { + public ApiResponse acknowledgeNotificationV2WithHttpInfo(@javax.annotation.Nonnull String notificationId) throws ApiException { okhttp3.Call localVarCall = acknowledgeNotificationV2ValidateBeforeCall(notificationId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -324,14 +330,15 @@ public ApiResponse acknowledgeNotificationV2WithHttpInfo(String * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public okhttp3.Call acknowledgeNotificationV2Async(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call acknowledgeNotificationV2Async(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = acknowledgeNotificationV2ValidateBeforeCall(notificationId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -344,7 +351,8 @@ public okhttp3.Call acknowledgeNotificationV2Async(String notificationId, final * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -406,7 +414,8 @@ private okhttp3.Call clearNotificationsValidateBeforeCall(final ApiCallback _cal * @return Success * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+
+ @@ -423,7 +432,8 @@ public Success clearNotifications() throws ApiException { * @return ApiResponse<Success> * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+
+ @@ -442,7 +452,8 @@ public ApiResponse clearNotificationsWithHttpInfo() throws ApiException * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+
+ @@ -461,7 +472,8 @@ public okhttp3.Call clearNotificationsAsync(final ApiCallback _callback * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+
+ @@ -523,7 +535,8 @@ private okhttp3.Call deleteAllNotificationV2sValidateBeforeCall(final ApiCallbac * @return Success * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+
+ @@ -540,7 +553,8 @@ public Success deleteAllNotificationV2s() throws ApiException { * @return ApiResponse<Success> * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+
+ @@ -559,7 +573,8 @@ public ApiResponse deleteAllNotificationV2sWithHttpInfo() throws ApiExc * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+
+ @@ -579,13 +594,14 @@ public okhttp3.Call deleteAllNotificationV2sAsync(final ApiCallback _ca * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+
+ - +
Response Details
Status Code Description Response Headers
200 Returns a single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteNotificationCall(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteNotificationCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -631,7 +647,7 @@ public okhttp3.Call deleteNotificationCall(String notificationId, final ApiCallb } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNotificationValidateBeforeCall(String notificationId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteNotificationValidateBeforeCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling deleteNotification(Async)"); @@ -648,13 +664,14 @@ private okhttp3.Call deleteNotificationValidateBeforeCall(String notificationId, * @return Notification * @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 single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
*/ - public Notification deleteNotification(String notificationId) throws ApiException { + public Notification deleteNotification(@javax.annotation.Nonnull String notificationId) throws ApiException { ApiResponse localVarResp = deleteNotificationWithHttpInfo(notificationId); return localVarResp.getData(); } @@ -666,13 +683,14 @@ public Notification deleteNotification(String notificationId) throws ApiExceptio * @return ApiResponse<Notification> * @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 single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse deleteNotificationWithHttpInfo(String notificationId) throws ApiException { + public ApiResponse deleteNotificationWithHttpInfo(@javax.annotation.Nonnull String notificationId) throws ApiException { okhttp3.Call localVarCall = deleteNotificationValidateBeforeCall(notificationId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -686,13 +704,14 @@ public ApiResponse deleteNotificationWithHttpInfo(String notificat * @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 single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteNotificationAsync(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteNotificationAsync(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteNotificationValidateBeforeCall(notificationId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -706,7 +725,8 @@ public okhttp3.Call deleteNotificationAsync(String notificationId, final ApiCall * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -714,7 +734,7 @@ public okhttp3.Call deleteNotificationAsync(String notificationId, final ApiCall
Response Details
Status Code Description Response Headers
200 Successful response after clearing a notification. -
400 Error response when trying to perform an invalid operations on a notification. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public okhttp3.Call deleteNotificationV2Call(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteNotificationV2Call(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -760,7 +780,7 @@ public okhttp3.Call deleteNotificationV2Call(String notificationId, final ApiCal } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNotificationV2ValidateBeforeCall(String notificationId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteNotificationV2ValidateBeforeCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling deleteNotificationV2(Async)"); @@ -777,7 +797,8 @@ private okhttp3.Call deleteNotificationV2ValidateBeforeCall(String notificationI * @return Success * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -785,7 +806,7 @@ private okhttp3.Call deleteNotificationV2ValidateBeforeCall(String notificationI
Response Details
Status Code Description Response Headers
200 Successful response after clearing a notification. -
400 Error response when trying to perform an invalid operations on a notification. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public Success deleteNotificationV2(String notificationId) throws ApiException { + public Success deleteNotificationV2(@javax.annotation.Nonnull String notificationId) throws ApiException { ApiResponse localVarResp = deleteNotificationV2WithHttpInfo(notificationId); return localVarResp.getData(); } @@ -797,7 +818,8 @@ public Success deleteNotificationV2(String notificationId) throws ApiException { * @return ApiResponse<Success> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -805,7 +827,7 @@ public Success deleteNotificationV2(String notificationId) throws ApiException {
Response Details
Status Code Description Response Headers
200 Successful response after clearing a notification. -
400 Error response when trying to perform an invalid operations on a notification. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public ApiResponse deleteNotificationV2WithHttpInfo(String notificationId) throws ApiException { + public ApiResponse deleteNotificationV2WithHttpInfo(@javax.annotation.Nonnull String notificationId) throws ApiException { okhttp3.Call localVarCall = deleteNotificationV2ValidateBeforeCall(notificationId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -819,7 +841,8 @@ public ApiResponse deleteNotificationV2WithHttpInfo(String notification * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -827,7 +850,7 @@ public ApiResponse deleteNotificationV2WithHttpInfo(String notification
Response Details
Status Code Description Response Headers
200 Successful response after clearing a notification. -
400 Error response when trying to perform an invalid operations on a notification. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public okhttp3.Call deleteNotificationV2Async(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteNotificationV2Async(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteNotificationV2ValidateBeforeCall(notificationId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -841,14 +864,15 @@ public okhttp3.Call deleteNotificationV2Async(String notificationId, final ApiCa * @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 single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public okhttp3.Call getNotificationCall(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNotificationCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -894,7 +918,7 @@ public okhttp3.Call getNotificationCall(String notificationId, final ApiCallback } @SuppressWarnings("rawtypes") - private okhttp3.Call getNotificationValidateBeforeCall(String notificationId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getNotificationValidateBeforeCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling getNotification(Async)"); @@ -911,14 +935,15 @@ private okhttp3.Call getNotificationValidateBeforeCall(String notificationId, fi * @return Notification * @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 single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public Notification getNotification(String notificationId) throws ApiException { + public Notification getNotification(@javax.annotation.Nonnull String notificationId) throws ApiException { ApiResponse localVarResp = getNotificationWithHttpInfo(notificationId); return localVarResp.getData(); } @@ -930,14 +955,15 @@ public Notification getNotification(String notificationId) throws ApiException { * @return ApiResponse<Notification> * @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 single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public ApiResponse getNotificationWithHttpInfo(String notificationId) throws ApiException { + public ApiResponse getNotificationWithHttpInfo(@javax.annotation.Nonnull String notificationId) throws ApiException { okhttp3.Call localVarCall = getNotificationValidateBeforeCall(notificationId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -951,14 +977,15 @@ public ApiResponse getNotificationWithHttpInfo(String notification * @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 single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public okhttp3.Call getNotificationAsync(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNotificationAsync(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getNotificationValidateBeforeCall(notificationId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -972,9 +999,10 @@ public okhttp3.Call getNotificationAsync(String notificationId, final ApiCallbac * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ - + @@ -982,7 +1010,7 @@ public okhttp3.Call getNotificationAsync(String notificationId, final ApiCallbac * @deprecated */ @Deprecated - public okhttp3.Call getNotificationV2Call(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNotificationV2Call(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1029,7 +1057,7 @@ public okhttp3.Call getNotificationV2Call(String notificationId, final ApiCallba @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getNotificationV2ValidateBeforeCall(String notificationId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getNotificationV2ValidateBeforeCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling getNotificationV2(Async)"); @@ -1046,9 +1074,10 @@ private okhttp3.Call getNotificationV2ValidateBeforeCall(String notificationId, * @return NotificationV2 * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
404 Error response when trying to perform operations on a non-existing notification. -
+
+ - + @@ -1056,7 +1085,7 @@ private okhttp3.Call getNotificationV2ValidateBeforeCall(String notificationId, * @deprecated */ @Deprecated - public NotificationV2 getNotificationV2(String notificationId) throws ApiException { + public NotificationV2 getNotificationV2(@javax.annotation.Nonnull String notificationId) throws ApiException { ApiResponse localVarResp = getNotificationV2WithHttpInfo(notificationId); return localVarResp.getData(); } @@ -1068,9 +1097,10 @@ public NotificationV2 getNotificationV2(String notificationId) throws ApiExcepti * @return ApiResponse<NotificationV2> * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
404 Error response when trying to perform operations on a non-existing notification. -
+
+ - + @@ -1078,7 +1108,7 @@ public NotificationV2 getNotificationV2(String notificationId) throws ApiExcepti * @deprecated */ @Deprecated - public ApiResponse getNotificationV2WithHttpInfo(String notificationId) throws ApiException { + public ApiResponse getNotificationV2WithHttpInfo(@javax.annotation.Nonnull String notificationId) throws ApiException { okhttp3.Call localVarCall = getNotificationV2ValidateBeforeCall(notificationId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1092,9 +1122,10 @@ public ApiResponse getNotificationV2WithHttpInfo(String notifica * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
404 Error response when trying to perform operations on a non-existing notification. -
+
+ - + @@ -1102,7 +1133,7 @@ public ApiResponse getNotificationV2WithHttpInfo(String notifica * @deprecated */ @Deprecated - public okhttp3.Call getNotificationV2Async(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNotificationV2Async(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getNotificationV2ValidateBeforeCall(notificationId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1116,13 +1147,14 @@ public okhttp3.Call getNotificationV2Async(String notificationId, final ApiCallb * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
404 Error response when trying to perform operations on a non-existing notification. -
+
+ - +
Response Details
Status Code Description Response Headers
200 Returns a list of NotifcationV2 objects. -
200 Returns a list of NotificationV2 objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getNotificationV2sCall(Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNotificationV2sCall(@javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1171,7 +1203,7 @@ public okhttp3.Call getNotificationV2sCall(Integer limit, final ApiCallback _cal } @SuppressWarnings("rawtypes") - private okhttp3.Call getNotificationV2sValidateBeforeCall(Integer limit, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getNotificationV2sValidateBeforeCall(@javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { return getNotificationV2sCall(limit, _callback); } @@ -1183,13 +1215,14 @@ private okhttp3.Call getNotificationV2sValidateBeforeCall(Integer limit, final A * @return List<NotificationV2> * @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 list of NotifcationV2 objects. -
200 Returns a list of NotificationV2 objects. -
401 Error response due to missing auth cookie. -
*/ - public List getNotificationV2s(Integer limit) throws ApiException { + public List getNotificationV2s(@javax.annotation.Nullable Integer limit) throws ApiException { ApiResponse> localVarResp = getNotificationV2sWithHttpInfo(limit); return localVarResp.getData(); } @@ -1201,13 +1234,14 @@ public List getNotificationV2s(Integer limit) throws ApiExceptio * @return ApiResponse<List<NotificationV2>> * @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 list of NotifcationV2 objects. -
200 Returns a list of NotificationV2 objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getNotificationV2sWithHttpInfo(Integer limit) throws ApiException { + public ApiResponse> getNotificationV2sWithHttpInfo(@javax.annotation.Nullable Integer limit) throws ApiException { okhttp3.Call localVarCall = getNotificationV2sValidateBeforeCall(limit, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1221,13 +1255,14 @@ public ApiResponse> getNotificationV2sWithHttpInfo(Integer * @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 list of NotifcationV2 objects. -
200 Returns a list of NotificationV2 objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getNotificationV2sAsync(Integer limit, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getNotificationV2sAsync(@javax.annotation.Nullable Integer limit, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getNotificationV2sValidateBeforeCall(limit, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1246,13 +1281,14 @@ public okhttp3.Call getNotificationV2sAsync(Integer limit, final ApiCallback + + - +
Response Details
Status Code Description Response Headers
200 Returns a list of Notifcation objects. -
200 Returns a list of Notification objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getNotificationsCall(String type, Boolean sent, Boolean hidden, String after, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNotificationsCall(@javax.annotation.Nullable String type, @javax.annotation.Nullable Boolean sent, @javax.annotation.Nullable Boolean hidden, @javax.annotation.Nullable String after, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1321,7 +1357,7 @@ public okhttp3.Call getNotificationsCall(String type, Boolean sent, Boolean hidd } @SuppressWarnings("rawtypes") - private okhttp3.Call getNotificationsValidateBeforeCall(String type, Boolean sent, Boolean hidden, String after, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getNotificationsValidateBeforeCall(@javax.annotation.Nullable String type, @javax.annotation.Nullable Boolean sent, @javax.annotation.Nullable Boolean hidden, @javax.annotation.Nullable String after, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { return getNotificationsCall(type, sent, hidden, after, n, offset, _callback); } @@ -1338,13 +1374,14 @@ private okhttp3.Call getNotificationsValidateBeforeCall(String type, Boolean sen * @return List<Notification> * @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 list of Notifcation objects. -
200 Returns a list of Notification objects. -
401 Error response due to missing auth cookie. -
*/ - public List getNotifications(String type, Boolean sent, Boolean hidden, String after, Integer n, Integer offset) throws ApiException { + public List getNotifications(@javax.annotation.Nullable String type, @javax.annotation.Nullable Boolean sent, @javax.annotation.Nullable Boolean hidden, @javax.annotation.Nullable String after, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = getNotificationsWithHttpInfo(type, sent, hidden, after, n, offset); return localVarResp.getData(); } @@ -1361,13 +1398,14 @@ public List getNotifications(String type, Boolean sent, Boolean hi * @return ApiResponse<List<Notification>> * @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 list of Notifcation objects. -
200 Returns a list of Notification objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getNotificationsWithHttpInfo(String type, Boolean sent, Boolean hidden, String after, Integer n, Integer offset) throws ApiException { + public ApiResponse> getNotificationsWithHttpInfo(@javax.annotation.Nullable String type, @javax.annotation.Nullable Boolean sent, @javax.annotation.Nullable Boolean hidden, @javax.annotation.Nullable String after, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getNotificationsValidateBeforeCall(type, sent, hidden, after, n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1386,13 +1424,14 @@ public ApiResponse> getNotificationsWithHttpInfo(String type, * @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 list of Notifcation objects. -
200 Returns a list of Notification objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getNotificationsAsync(String type, Boolean sent, Boolean hidden, String after, Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getNotificationsAsync(@javax.annotation.Nullable String type, @javax.annotation.Nullable Boolean sent, @javax.annotation.Nullable Boolean hidden, @javax.annotation.Nullable String after, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getNotificationsValidateBeforeCall(type, sent, hidden, after, n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1406,13 +1445,14 @@ public okhttp3.Call getNotificationsAsync(String type, Boolean sent, Boolean hid * @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 single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call markNotificationAsReadCall(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call markNotificationAsReadCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1458,7 +1498,7 @@ public okhttp3.Call markNotificationAsReadCall(String notificationId, final ApiC } @SuppressWarnings("rawtypes") - private okhttp3.Call markNotificationAsReadValidateBeforeCall(String notificationId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call markNotificationAsReadValidateBeforeCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling markNotificationAsRead(Async)"); @@ -1475,13 +1515,14 @@ private okhttp3.Call markNotificationAsReadValidateBeforeCall(String notificatio * @return Notification * @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 single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
*/ - public Notification markNotificationAsRead(String notificationId) throws ApiException { + public Notification markNotificationAsRead(@javax.annotation.Nonnull String notificationId) throws ApiException { ApiResponse localVarResp = markNotificationAsReadWithHttpInfo(notificationId); return localVarResp.getData(); } @@ -1493,13 +1534,14 @@ public Notification markNotificationAsRead(String notificationId) throws ApiExce * @return ApiResponse<Notification> * @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 single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse markNotificationAsReadWithHttpInfo(String notificationId) throws ApiException { + public ApiResponse markNotificationAsReadWithHttpInfo(@javax.annotation.Nonnull String notificationId) throws ApiException { okhttp3.Call localVarCall = markNotificationAsReadValidateBeforeCall(notificationId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1513,13 +1555,14 @@ public ApiResponse markNotificationAsReadWithHttpInfo(String notif * @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 single Notifcation object. -
200 Returns a single Notification object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call markNotificationAsReadAsync(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call markNotificationAsReadAsync(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = markNotificationAsReadValidateBeforeCall(notificationId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1534,15 +1577,16 @@ public okhttp3.Call markNotificationAsReadAsync(String notificationId, final Api * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
400 Error response when trying to perform an invalid operations on a notification. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public okhttp3.Call replyNotificationV2Call(String notificationId, Object body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call replyNotificationV2Call(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull Object body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1589,7 +1633,7 @@ public okhttp3.Call replyNotificationV2Call(String notificationId, Object body, } @SuppressWarnings("rawtypes") - private okhttp3.Call replyNotificationV2ValidateBeforeCall(String notificationId, Object body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call replyNotificationV2ValidateBeforeCall(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull Object body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling replyNotificationV2(Async)"); @@ -1612,15 +1656,16 @@ private okhttp3.Call replyNotificationV2ValidateBeforeCall(String notificationId * @return NotificationV2 * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
400 Error response when trying to perform an invalid operations on a notification. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public NotificationV2 replyNotificationV2(String notificationId, Object body) throws ApiException { + public NotificationV2 replyNotificationV2(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull Object body) throws ApiException { ApiResponse localVarResp = replyNotificationV2WithHttpInfo(notificationId, body); return localVarResp.getData(); } @@ -1633,15 +1678,16 @@ public NotificationV2 replyNotificationV2(String notificationId, Object body) th * @return ApiResponse<NotificationV2> * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
400 Error response when trying to perform an invalid operations on a notification. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public ApiResponse replyNotificationV2WithHttpInfo(String notificationId, Object body) throws ApiException { + public ApiResponse replyNotificationV2WithHttpInfo(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull Object body) throws ApiException { okhttp3.Call localVarCall = replyNotificationV2ValidateBeforeCall(notificationId, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1656,15 +1702,16 @@ public ApiResponse replyNotificationV2WithHttpInfo(String notifi * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
400 Error response when trying to perform an invalid operations on a notification. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public okhttp3.Call replyNotificationV2Async(String notificationId, Object body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call replyNotificationV2Async(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull Object body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replyNotificationV2ValidateBeforeCall(notificationId, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1679,15 +1726,16 @@ public okhttp3.Call replyNotificationV2Async(String notificationId, Object body, * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
400 Error response when trying to perform an invalid operations on a notification. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public okhttp3.Call respondNotificationV2Call(String notificationId, RespondNotificationV2Request respondNotificationV2Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call respondNotificationV2Call(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull RespondNotificationV2Request respondNotificationV2Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1734,7 +1782,7 @@ public okhttp3.Call respondNotificationV2Call(String notificationId, RespondNoti } @SuppressWarnings("rawtypes") - private okhttp3.Call respondNotificationV2ValidateBeforeCall(String notificationId, RespondNotificationV2Request respondNotificationV2Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call respondNotificationV2ValidateBeforeCall(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull RespondNotificationV2Request respondNotificationV2Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'notificationId' is set if (notificationId == null) { throw new ApiException("Missing the required parameter 'notificationId' when calling respondNotificationV2(Async)"); @@ -1757,15 +1805,16 @@ private okhttp3.Call respondNotificationV2ValidateBeforeCall(String notification * @return NotificationV2 * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
400 Error response when trying to perform an invalid operations on a notification. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public NotificationV2 respondNotificationV2(String notificationId, RespondNotificationV2Request respondNotificationV2Request) throws ApiException { + public NotificationV2 respondNotificationV2(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull RespondNotificationV2Request respondNotificationV2Request) throws ApiException { ApiResponse localVarResp = respondNotificationV2WithHttpInfo(notificationId, respondNotificationV2Request); return localVarResp.getData(); } @@ -1778,15 +1827,16 @@ public NotificationV2 respondNotificationV2(String notificationId, RespondNotifi * @return ApiResponse<NotificationV2> * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
400 Error response when trying to perform an invalid operations on a notification. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public ApiResponse respondNotificationV2WithHttpInfo(String notificationId, RespondNotificationV2Request respondNotificationV2Request) throws ApiException { + public ApiResponse respondNotificationV2WithHttpInfo(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull RespondNotificationV2Request respondNotificationV2Request) throws ApiException { okhttp3.Call localVarCall = respondNotificationV2ValidateBeforeCall(notificationId, respondNotificationV2Request, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1801,15 +1851,16 @@ public ApiResponse respondNotificationV2WithHttpInfo(String noti * @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 single NotifcationV2 object. -
200 Returns a single NotificationV2 object. -
400 Error response when trying to perform an invalid operations on a notification. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing notification. -
*/ - public okhttp3.Call respondNotificationV2Async(String notificationId, RespondNotificationV2Request respondNotificationV2Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call respondNotificationV2Async(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull RespondNotificationV2Request respondNotificationV2Request, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = respondNotificationV2ValidateBeforeCall(notificationId, respondNotificationV2Request, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/PlayermoderationApi.java b/src/main/java/io/github/vrchatapi/api/PlayermoderationApi.java index 194f8c5a..ef6225f0 100644 --- a/src/main/java/io/github/vrchatapi/api/PlayermoderationApi.java +++ b/src/main/java/io/github/vrchatapi/api/PlayermoderationApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -37,7 +37,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class PlayermoderationApi { private ApiClient localVarApiClient; @@ -82,7 +81,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -144,7 +144,8 @@ private okhttp3.Call clearAllPlayerModerationsValidateBeforeCall(final ApiCallba * @return Success * @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 Success response after e.g. clearing all player moderations. -
401 Error response due to missing auth cookie. -
+
+ @@ -161,7 +162,8 @@ public Success clearAllPlayerModerations() throws ApiException { * @return ApiResponse<Success> * @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 Success response after e.g. clearing all player moderations. -
401 Error response due to missing auth cookie. -
+
+ @@ -180,7 +182,8 @@ public ApiResponse clearAllPlayerModerationsWithHttpInfo() throws ApiEx * @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 Success response after e.g. clearing all player moderations. -
401 Error response due to missing auth cookie. -
+
+ @@ -201,13 +204,14 @@ public okhttp3.Call clearAllPlayerModerationsAsync(final ApiCallback _c * @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 Success response after e.g. clearing all player moderations. -
401 Error response due to missing auth cookie. -
+
+
Response Details
Status Code Description Response Headers
200 Returns a list of PlayerModeration objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getPlayerModerationsCall(PlayerModerationType type, String targetUserId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPlayerModerationsCall(@javax.annotation.Nullable PlayerModerationType type, @javax.annotation.Nullable String targetUserId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -260,7 +264,7 @@ public okhttp3.Call getPlayerModerationsCall(PlayerModerationType type, String t } @SuppressWarnings("rawtypes") - private okhttp3.Call getPlayerModerationsValidateBeforeCall(PlayerModerationType type, String targetUserId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPlayerModerationsValidateBeforeCall(@javax.annotation.Nullable PlayerModerationType type, @javax.annotation.Nullable String targetUserId, final ApiCallback _callback) throws ApiException { return getPlayerModerationsCall(type, targetUserId, _callback); } @@ -273,13 +277,14 @@ private okhttp3.Call getPlayerModerationsValidateBeforeCall(PlayerModerationType * @return List<PlayerModeration> * @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 list of PlayerModeration objects. -
401 Error response due to missing auth cookie. -
*/ - public List getPlayerModerations(PlayerModerationType type, String targetUserId) throws ApiException { + public List getPlayerModerations(@javax.annotation.Nullable PlayerModerationType type, @javax.annotation.Nullable String targetUserId) throws ApiException { ApiResponse> localVarResp = getPlayerModerationsWithHttpInfo(type, targetUserId); return localVarResp.getData(); } @@ -292,13 +297,14 @@ public List getPlayerModerations(PlayerModerationType type, St * @return ApiResponse<List<PlayerModeration>> * @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 list of PlayerModeration objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getPlayerModerationsWithHttpInfo(PlayerModerationType type, String targetUserId) throws ApiException { + public ApiResponse> getPlayerModerationsWithHttpInfo(@javax.annotation.Nullable PlayerModerationType type, @javax.annotation.Nullable String targetUserId) throws ApiException { okhttp3.Call localVarCall = getPlayerModerationsValidateBeforeCall(type, targetUserId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -313,13 +319,14 @@ public ApiResponse> getPlayerModerationsWithHttpInfo(Play * @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 list of PlayerModeration objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getPlayerModerationsAsync(PlayerModerationType type, String targetUserId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getPlayerModerationsAsync(@javax.annotation.Nullable PlayerModerationType type, @javax.annotation.Nullable String targetUserId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getPlayerModerationsValidateBeforeCall(type, targetUserId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -333,13 +340,14 @@ public okhttp3.Call getPlayerModerationsAsync(PlayerModerationType type, String * @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 single PlayerModeration object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call moderateUserCall(ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call moderateUserCall(@javax.annotation.Nonnull ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -385,7 +393,7 @@ public okhttp3.Call moderateUserCall(ModerateUserRequest moderateUserRequest, fi } @SuppressWarnings("rawtypes") - private okhttp3.Call moderateUserValidateBeforeCall(ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call moderateUserValidateBeforeCall(@javax.annotation.Nonnull ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moderateUserRequest' is set if (moderateUserRequest == null) { throw new ApiException("Missing the required parameter 'moderateUserRequest' when calling moderateUser(Async)"); @@ -402,13 +410,14 @@ private okhttp3.Call moderateUserValidateBeforeCall(ModerateUserRequest moderate * @return PlayerModeration * @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 single PlayerModeration object. -
401 Error response due to missing auth cookie. -
*/ - public PlayerModeration moderateUser(ModerateUserRequest moderateUserRequest) throws ApiException { + public PlayerModeration moderateUser(@javax.annotation.Nonnull ModerateUserRequest moderateUserRequest) throws ApiException { ApiResponse localVarResp = moderateUserWithHttpInfo(moderateUserRequest); return localVarResp.getData(); } @@ -420,13 +429,14 @@ public PlayerModeration moderateUser(ModerateUserRequest moderateUserRequest) th * @return ApiResponse<PlayerModeration> * @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 single PlayerModeration object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse moderateUserWithHttpInfo(ModerateUserRequest moderateUserRequest) throws ApiException { + public ApiResponse moderateUserWithHttpInfo(@javax.annotation.Nonnull ModerateUserRequest moderateUserRequest) throws ApiException { okhttp3.Call localVarCall = moderateUserValidateBeforeCall(moderateUserRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -440,13 +450,14 @@ public ApiResponse moderateUserWithHttpInfo(ModerateUserReques * @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 single PlayerModeration object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call moderateUserAsync(ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call moderateUserAsync(@javax.annotation.Nonnull ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = moderateUserValidateBeforeCall(moderateUserRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -460,13 +471,14 @@ public okhttp3.Call moderateUserAsync(ModerateUserRequest moderateUserRequest, f * @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 Success response after unmoderating a player moderation. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call unmoderateUserCall(ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unmoderateUserCall(@javax.annotation.Nonnull ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -512,7 +524,7 @@ public okhttp3.Call unmoderateUserCall(ModerateUserRequest moderateUserRequest, } @SuppressWarnings("rawtypes") - private okhttp3.Call unmoderateUserValidateBeforeCall(ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call unmoderateUserValidateBeforeCall(@javax.annotation.Nonnull ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moderateUserRequest' is set if (moderateUserRequest == null) { throw new ApiException("Missing the required parameter 'moderateUserRequest' when calling unmoderateUser(Async)"); @@ -529,13 +541,14 @@ private okhttp3.Call unmoderateUserValidateBeforeCall(ModerateUserRequest modera * @return Success * @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 Success response after unmoderating a player moderation. -
401 Error response due to missing auth cookie. -
*/ - public Success unmoderateUser(ModerateUserRequest moderateUserRequest) throws ApiException { + public Success unmoderateUser(@javax.annotation.Nonnull ModerateUserRequest moderateUserRequest) throws ApiException { ApiResponse localVarResp = unmoderateUserWithHttpInfo(moderateUserRequest); return localVarResp.getData(); } @@ -547,13 +560,14 @@ public Success unmoderateUser(ModerateUserRequest moderateUserRequest) throws Ap * @return ApiResponse<Success> * @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 Success response after unmoderating a player moderation. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse unmoderateUserWithHttpInfo(ModerateUserRequest moderateUserRequest) throws ApiException { + public ApiResponse unmoderateUserWithHttpInfo(@javax.annotation.Nonnull ModerateUserRequest moderateUserRequest) throws ApiException { okhttp3.Call localVarCall = unmoderateUserValidateBeforeCall(moderateUserRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -567,13 +581,14 @@ public ApiResponse unmoderateUserWithHttpInfo(ModerateUserRequest moder * @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 Success response after unmoderating a player moderation. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call unmoderateUserAsync(ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unmoderateUserAsync(@javax.annotation.Nonnull ModerateUserRequest moderateUserRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = unmoderateUserValidateBeforeCall(moderateUserRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/PrintsApi.java b/src/main/java/io/github/vrchatapi/api/PrintsApi.java index 93055a3f..2a9490a4 100644 --- a/src/main/java/io/github/vrchatapi/api/PrintsApi.java +++ b/src/main/java/io/github/vrchatapi/api/PrintsApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -36,7 +36,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class PrintsApi { private ApiClient localVarApiClient; @@ -82,13 +81,14 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 Empty response if successful -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deletePrintCall(String printId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deletePrintCall(@javax.annotation.Nonnull String printId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -134,7 +134,7 @@ public okhttp3.Call deletePrintCall(String printId, final ApiCallback _callback) } @SuppressWarnings("rawtypes") - private okhttp3.Call deletePrintValidateBeforeCall(String printId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deletePrintValidateBeforeCall(@javax.annotation.Nonnull String printId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'printId' is set if (printId == null) { throw new ApiException("Missing the required parameter 'printId' when calling deletePrint(Async)"); @@ -150,13 +150,14 @@ private okhttp3.Call deletePrintValidateBeforeCall(String printId, final ApiCall * @param printId Print ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Empty response if successful -
401 Error response due to missing auth cookie. -
*/ - public void deletePrint(String printId) throws ApiException { + public void deletePrint(@javax.annotation.Nonnull String printId) throws ApiException { deletePrintWithHttpInfo(printId); } @@ -167,13 +168,14 @@ public void deletePrint(String printId) throws ApiException { * @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 Empty response if successful -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse deletePrintWithHttpInfo(String printId) throws ApiException { + public ApiResponse deletePrintWithHttpInfo(@javax.annotation.Nonnull String printId) throws ApiException { okhttp3.Call localVarCall = deletePrintValidateBeforeCall(printId, null); return localVarApiClient.execute(localVarCall); } @@ -186,13 +188,14 @@ public ApiResponse deletePrintWithHttpInfo(String printId) throws ApiExcep * @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 Empty response if successful -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deletePrintAsync(String printId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deletePrintAsync(@javax.annotation.Nonnull String printId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deletePrintValidateBeforeCall(printId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -207,13 +210,14 @@ public okhttp3.Call deletePrintAsync(String printId, final ApiCallback _ca * @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 single Print object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call editPrintCall(String printId, File image, String note, final ApiCallback _callback) throws ApiException { + public okhttp3.Call editPrintCall(@javax.annotation.Nonnull String printId, @javax.annotation.Nonnull File image, @javax.annotation.Nullable String note, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -268,7 +272,7 @@ public okhttp3.Call editPrintCall(String printId, File image, String note, final } @SuppressWarnings("rawtypes") - private okhttp3.Call editPrintValidateBeforeCall(String printId, File image, String note, final ApiCallback _callback) throws ApiException { + private okhttp3.Call editPrintValidateBeforeCall(@javax.annotation.Nonnull String printId, @javax.annotation.Nonnull File image, @javax.annotation.Nullable String note, final ApiCallback _callback) throws ApiException { // verify the required parameter 'printId' is set if (printId == null) { throw new ApiException("Missing the required parameter 'printId' when calling editPrint(Async)"); @@ -292,13 +296,14 @@ private okhttp3.Call editPrintValidateBeforeCall(String printId, File image, Str * @return Print * @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 single Print object. -
401 Error response due to missing auth cookie. -
*/ - public Print editPrint(String printId, File image, String note) throws ApiException { + public Print editPrint(@javax.annotation.Nonnull String printId, @javax.annotation.Nonnull File image, @javax.annotation.Nullable String note) throws ApiException { ApiResponse localVarResp = editPrintWithHttpInfo(printId, image, note); return localVarResp.getData(); } @@ -312,13 +317,14 @@ public Print editPrint(String printId, File image, String note) throws ApiExcept * @return ApiResponse<Print> * @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 single Print object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse editPrintWithHttpInfo(String printId, File image, String note) throws ApiException { + public ApiResponse editPrintWithHttpInfo(@javax.annotation.Nonnull String printId, @javax.annotation.Nonnull File image, @javax.annotation.Nullable String note) throws ApiException { okhttp3.Call localVarCall = editPrintValidateBeforeCall(printId, image, note, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -334,13 +340,14 @@ public ApiResponse editPrintWithHttpInfo(String printId, File image, Stri * @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 single Print object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call editPrintAsync(String printId, File image, String note, final ApiCallback _callback) throws ApiException { + public okhttp3.Call editPrintAsync(@javax.annotation.Nonnull String printId, @javax.annotation.Nonnull File image, @javax.annotation.Nullable String note, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = editPrintValidateBeforeCall(printId, image, note, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -354,13 +361,14 @@ public okhttp3.Call editPrintAsync(String printId, File image, String note, fina * @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 single Print object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getPrintCall(String printId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPrintCall(@javax.annotation.Nonnull String printId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -406,7 +414,7 @@ public okhttp3.Call getPrintCall(String printId, final ApiCallback _callback) th } @SuppressWarnings("rawtypes") - private okhttp3.Call getPrintValidateBeforeCall(String printId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPrintValidateBeforeCall(@javax.annotation.Nonnull String printId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'printId' is set if (printId == null) { throw new ApiException("Missing the required parameter 'printId' when calling getPrint(Async)"); @@ -423,13 +431,14 @@ private okhttp3.Call getPrintValidateBeforeCall(String printId, final ApiCallbac * @return Print * @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 single Print object. -
401 Error response due to missing auth cookie. -
*/ - public Print getPrint(String printId) throws ApiException { + public Print getPrint(@javax.annotation.Nonnull String printId) throws ApiException { ApiResponse localVarResp = getPrintWithHttpInfo(printId); return localVarResp.getData(); } @@ -441,13 +450,14 @@ public Print getPrint(String printId) throws ApiException { * @return ApiResponse<Print> * @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 single Print object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getPrintWithHttpInfo(String printId) throws ApiException { + public ApiResponse getPrintWithHttpInfo(@javax.annotation.Nonnull String printId) throws ApiException { okhttp3.Call localVarCall = getPrintValidateBeforeCall(printId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -461,13 +471,14 @@ public ApiResponse getPrintWithHttpInfo(String printId) throws ApiExcepti * @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 single Print object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getPrintAsync(String printId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPrintAsync(@javax.annotation.Nonnull String printId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPrintValidateBeforeCall(printId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -481,14 +492,15 @@ public okhttp3.Call getPrintAsync(String printId, final ApiCallback _call * @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 list of Print objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to request another user's prints. -
*/ - public okhttp3.Call getUserPrintsCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserPrintsCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -534,7 +546,7 @@ public okhttp3.Call getUserPrintsCall(String userId, final ApiCallback _callback } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserPrintsValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserPrintsValidateBeforeCall(@javax.annotation.Nonnull 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 getUserPrints(Async)"); @@ -551,14 +563,15 @@ private okhttp3.Call getUserPrintsValidateBeforeCall(String userId, final ApiCal * @return List<Print> * @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 list of Print objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to request another user's prints. -
*/ - public List getUserPrints(String userId) throws ApiException { + public List getUserPrints(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse> localVarResp = getUserPrintsWithHttpInfo(userId); return localVarResp.getData(); } @@ -570,14 +583,15 @@ public List getUserPrints(String userId) throws ApiException { * @return ApiResponse<List<Print>> * @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 list of Print objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to request another user's prints. -
*/ - public ApiResponse> getUserPrintsWithHttpInfo(String userId) throws ApiException { + public ApiResponse> getUserPrintsWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getUserPrintsValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -591,14 +605,15 @@ public ApiResponse> getUserPrintsWithHttpInfo(String userId) throws * @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 list of Print objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to request another user's prints. -
*/ - public okhttp3.Call getUserPrintsAsync(String userId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getUserPrintsAsync(@javax.annotation.Nonnull String userId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getUserPrintsValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -616,13 +631,14 @@ public okhttp3.Call getUserPrintsAsync(String userId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a single Print object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call uploadPrintCall(File image, OffsetDateTime timestamp, String note, String worldId, String worldName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadPrintCall(@javax.annotation.Nonnull File image, @javax.annotation.Nonnull OffsetDateTime timestamp, @javax.annotation.Nullable String note, @javax.annotation.Nullable String worldId, @javax.annotation.Nullable String worldName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -688,7 +704,7 @@ public okhttp3.Call uploadPrintCall(File image, OffsetDateTime timestamp, String } @SuppressWarnings("rawtypes") - private okhttp3.Call uploadPrintValidateBeforeCall(File image, OffsetDateTime timestamp, String note, String worldId, String worldName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call uploadPrintValidateBeforeCall(@javax.annotation.Nonnull File image, @javax.annotation.Nonnull OffsetDateTime timestamp, @javax.annotation.Nullable String note, @javax.annotation.Nullable String worldId, @javax.annotation.Nullable String worldName, final ApiCallback _callback) throws ApiException { // verify the required parameter 'image' is set if (image == null) { throw new ApiException("Missing the required parameter 'image' when calling uploadPrint(Async)"); @@ -714,13 +730,14 @@ private okhttp3.Call uploadPrintValidateBeforeCall(File image, OffsetDateTime ti * @return Print * @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 single Print object. -
401 Error response due to missing auth cookie. -
*/ - public Print uploadPrint(File image, OffsetDateTime timestamp, String note, String worldId, String worldName) throws ApiException { + public Print uploadPrint(@javax.annotation.Nonnull File image, @javax.annotation.Nonnull OffsetDateTime timestamp, @javax.annotation.Nullable String note, @javax.annotation.Nullable String worldId, @javax.annotation.Nullable String worldName) throws ApiException { ApiResponse localVarResp = uploadPrintWithHttpInfo(image, timestamp, note, worldId, worldName); return localVarResp.getData(); } @@ -736,13 +753,14 @@ public Print uploadPrint(File image, OffsetDateTime timestamp, String note, Stri * @return ApiResponse<Print> * @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 single Print object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse uploadPrintWithHttpInfo(File image, OffsetDateTime timestamp, String note, String worldId, String worldName) throws ApiException { + public ApiResponse uploadPrintWithHttpInfo(@javax.annotation.Nonnull File image, @javax.annotation.Nonnull OffsetDateTime timestamp, @javax.annotation.Nullable String note, @javax.annotation.Nullable String worldId, @javax.annotation.Nullable String worldName) throws ApiException { okhttp3.Call localVarCall = uploadPrintValidateBeforeCall(image, timestamp, note, worldId, worldName, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -760,13 +778,14 @@ public ApiResponse uploadPrintWithHttpInfo(File image, OffsetDateTime tim * @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 single Print object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call uploadPrintAsync(File image, OffsetDateTime timestamp, String note, String worldId, String worldName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadPrintAsync(@javax.annotation.Nonnull File image, @javax.annotation.Nonnull OffsetDateTime timestamp, @javax.annotation.Nullable String note, @javax.annotation.Nullable String worldId, @javax.annotation.Nullable String worldName, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = uploadPrintValidateBeforeCall(image, timestamp, note, worldId, worldName, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/PropsApi.java b/src/main/java/io/github/vrchatapi/api/PropsApi.java index 5ea28550..be63a71a 100644 --- a/src/main/java/io/github/vrchatapi/api/PropsApi.java +++ b/src/main/java/io/github/vrchatapi/api/PropsApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -37,7 +37,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class PropsApi { private ApiClient localVarApiClient; @@ -83,14 +82,15 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 single Prop object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public okhttp3.Call createPropCall(CreatePropRequest createPropRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createPropCall(@javax.annotation.Nonnull CreatePropRequest createPropRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -136,7 +136,7 @@ public okhttp3.Call createPropCall(CreatePropRequest createPropRequest, final Ap } @SuppressWarnings("rawtypes") - private okhttp3.Call createPropValidateBeforeCall(CreatePropRequest createPropRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createPropValidateBeforeCall(@javax.annotation.Nonnull CreatePropRequest createPropRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createPropRequest' is set if (createPropRequest == null) { throw new ApiException("Missing the required parameter 'createPropRequest' when calling createProp(Async)"); @@ -153,14 +153,15 @@ private okhttp3.Call createPropValidateBeforeCall(CreatePropRequest createPropRe * @return Prop * @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 single Prop object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public Prop createProp(CreatePropRequest createPropRequest) throws ApiException { + public Prop createProp(@javax.annotation.Nonnull CreatePropRequest createPropRequest) throws ApiException { ApiResponse localVarResp = createPropWithHttpInfo(createPropRequest); return localVarResp.getData(); } @@ -172,14 +173,15 @@ public Prop createProp(CreatePropRequest createPropRequest) throws ApiException * @return ApiResponse<Prop> * @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 single Prop object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public ApiResponse createPropWithHttpInfo(CreatePropRequest createPropRequest) throws ApiException { + public ApiResponse createPropWithHttpInfo(@javax.annotation.Nonnull CreatePropRequest createPropRequest) throws ApiException { okhttp3.Call localVarCall = createPropValidateBeforeCall(createPropRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -193,14 +195,15 @@ public ApiResponse createPropWithHttpInfo(CreatePropRequest createPropRequ * @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 single Prop object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public okhttp3.Call createPropAsync(CreatePropRequest createPropRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createPropAsync(@javax.annotation.Nonnull CreatePropRequest createPropRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createPropValidateBeforeCall(createPropRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -214,7 +217,8 @@ public okhttp3.Call createPropAsync(CreatePropRequest createPropRequest, final A * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -222,7 +226,7 @@ public okhttp3.Call createPropAsync(CreatePropRequest createPropRequest, final A
Response Details
Status Code Description Response Headers
200 The Prop is successfully deleted. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call deletePropCall(String propId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deletePropCall(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -268,7 +272,7 @@ public okhttp3.Call deletePropCall(String propId, final ApiCallback _callback) t } @SuppressWarnings("rawtypes") - private okhttp3.Call deletePropValidateBeforeCall(String propId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deletePropValidateBeforeCall(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'propId' is set if (propId == null) { throw new ApiException("Missing the required parameter 'propId' when calling deleteProp(Async)"); @@ -284,7 +288,8 @@ private okhttp3.Call deletePropValidateBeforeCall(String propId, final ApiCallba * @param propId Prop ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -292,7 +297,7 @@ private okhttp3.Call deletePropValidateBeforeCall(String propId, final ApiCallba
Response Details
Status Code Description Response Headers
200 The Prop is successfully deleted. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public void deleteProp(String propId) throws ApiException { + public void deleteProp(@javax.annotation.Nonnull String propId) throws ApiException { deletePropWithHttpInfo(propId); } @@ -303,7 +308,8 @@ public void deleteProp(String propId) throws ApiException { * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -311,7 +317,7 @@ public void deleteProp(String propId) throws ApiException {
Response Details
Status Code Description Response Headers
200 The Prop is successfully deleted. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public ApiResponse deletePropWithHttpInfo(String propId) throws ApiException { + public ApiResponse deletePropWithHttpInfo(@javax.annotation.Nonnull String propId) throws ApiException { okhttp3.Call localVarCall = deletePropValidateBeforeCall(propId, null); return localVarApiClient.execute(localVarCall); } @@ -324,7 +330,8 @@ public ApiResponse deletePropWithHttpInfo(String propId) throws ApiExcepti * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -332,7 +339,7 @@ public ApiResponse deletePropWithHttpInfo(String propId) throws ApiExcepti
Response Details
Status Code Description Response Headers
200 The Prop is successfully deleted. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call deletePropAsync(String propId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deletePropAsync(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deletePropValidateBeforeCall(propId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -345,14 +352,15 @@ public okhttp3.Call deletePropAsync(String propId, final ApiCallback _call * @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 single Prop object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call getPropCall(String propId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPropCall(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -398,7 +406,7 @@ public okhttp3.Call getPropCall(String propId, final ApiCallback _callback) thro } @SuppressWarnings("rawtypes") - private okhttp3.Call getPropValidateBeforeCall(String propId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPropValidateBeforeCall(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'propId' is set if (propId == null) { throw new ApiException("Missing the required parameter 'propId' when calling getProp(Async)"); @@ -415,14 +423,15 @@ private okhttp3.Call getPropValidateBeforeCall(String propId, final ApiCallback * @return Prop * @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 single Prop object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public Prop getProp(String propId) throws ApiException { + public Prop getProp(@javax.annotation.Nonnull String propId) throws ApiException { ApiResponse localVarResp = getPropWithHttpInfo(propId); return localVarResp.getData(); } @@ -434,14 +443,15 @@ public Prop getProp(String propId) throws ApiException { * @return ApiResponse<Prop> * @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 single Prop object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public ApiResponse getPropWithHttpInfo(String propId) throws ApiException { + public ApiResponse getPropWithHttpInfo(@javax.annotation.Nonnull String propId) throws ApiException { okhttp3.Call localVarCall = getPropValidateBeforeCall(propId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -455,14 +465,15 @@ public ApiResponse getPropWithHttpInfo(String propId) throws ApiException * @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 single Prop object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call getPropAsync(String propId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPropAsync(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPropValidateBeforeCall(propId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -476,7 +487,8 @@ public okhttp3.Call getPropAsync(String propId, final ApiCallback _callbac * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -484,7 +496,7 @@ public okhttp3.Call getPropAsync(String propId, final ApiCallback _callbac
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call getPropPublishStatusCall(String propId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPropPublishStatusCall(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -530,7 +542,7 @@ public okhttp3.Call getPropPublishStatusCall(String propId, final ApiCallback _c } @SuppressWarnings("rawtypes") - private okhttp3.Call getPropPublishStatusValidateBeforeCall(String propId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPropPublishStatusValidateBeforeCall(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'propId' is set if (propId == null) { throw new ApiException("Missing the required parameter 'propId' when calling getPropPublishStatus(Async)"); @@ -547,7 +559,8 @@ private okhttp3.Call getPropPublishStatusValidateBeforeCall(String propId, final * @return PropPublishStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -555,7 +568,7 @@ private okhttp3.Call getPropPublishStatusValidateBeforeCall(String propId, final
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public PropPublishStatus getPropPublishStatus(String propId) throws ApiException { + public PropPublishStatus getPropPublishStatus(@javax.annotation.Nonnull String propId) throws ApiException { ApiResponse localVarResp = getPropPublishStatusWithHttpInfo(propId); return localVarResp.getData(); } @@ -567,7 +580,8 @@ public PropPublishStatus getPropPublishStatus(String propId) throws ApiException * @return ApiResponse<PropPublishStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -575,7 +589,7 @@ public PropPublishStatus getPropPublishStatus(String propId) throws ApiException
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public ApiResponse getPropPublishStatusWithHttpInfo(String propId) throws ApiException { + public ApiResponse getPropPublishStatusWithHttpInfo(@javax.annotation.Nonnull String propId) throws ApiException { okhttp3.Call localVarCall = getPropPublishStatusValidateBeforeCall(propId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -589,7 +603,8 @@ public ApiResponse getPropPublishStatusWithHttpInfo(String pr * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -597,7 +612,7 @@ public ApiResponse getPropPublishStatusWithHttpInfo(String pr
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call getPropPublishStatusAsync(String propId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPropPublishStatusAsync(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPropPublishStatusValidateBeforeCall(propId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -613,14 +628,15 @@ public okhttp3.Call getPropPublishStatusAsync(String propId, final ApiCallback

+ +
Response Details
Status Code Description Response Headers
200 Returns a list of Prop objects. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public okhttp3.Call listPropsCall(String authorId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listPropsCall(@javax.annotation.Nonnull String authorId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -677,7 +693,7 @@ public okhttp3.Call listPropsCall(String authorId, Integer n, Integer offset, fi } @SuppressWarnings("rawtypes") - private okhttp3.Call listPropsValidateBeforeCall(String authorId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listPropsValidateBeforeCall(@javax.annotation.Nonnull String authorId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { // verify the required parameter 'authorId' is set if (authorId == null) { throw new ApiException("Missing the required parameter 'authorId' when calling listProps(Async)"); @@ -696,14 +712,15 @@ private okhttp3.Call listPropsValidateBeforeCall(String authorId, Integer n, Int * @return List<Prop> * @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 list of Prop objects. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public List listProps(String authorId, Integer n, Integer offset) throws ApiException { + public List listProps(@javax.annotation.Nonnull String authorId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = listPropsWithHttpInfo(authorId, n, offset); return localVarResp.getData(); } @@ -717,14 +734,15 @@ public List listProps(String authorId, Integer n, Integer offset) throws A * @return ApiResponse<List<Prop>> * @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 list of Prop objects. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public ApiResponse> listPropsWithHttpInfo(String authorId, Integer n, Integer offset) throws ApiException { + public ApiResponse> listPropsWithHttpInfo(@javax.annotation.Nonnull String authorId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = listPropsValidateBeforeCall(authorId, n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -740,14 +758,15 @@ public ApiResponse> listPropsWithHttpInfo(String authorId, Integer n, * @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 list of Prop objects. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
*/ - public okhttp3.Call listPropsAsync(String authorId, Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listPropsAsync(@javax.annotation.Nonnull String authorId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listPropsValidateBeforeCall(authorId, n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -761,7 +780,8 @@ public okhttp3.Call listPropsAsync(String authorId, Integer n, Integer offset, f * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -769,7 +789,7 @@ public okhttp3.Call listPropsAsync(String authorId, Integer n, Integer offset, f
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call publishPropCall(String propId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call publishPropCall(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -815,7 +835,7 @@ public okhttp3.Call publishPropCall(String propId, final ApiCallback _callback) } @SuppressWarnings("rawtypes") - private okhttp3.Call publishPropValidateBeforeCall(String propId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call publishPropValidateBeforeCall(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'propId' is set if (propId == null) { throw new ApiException("Missing the required parameter 'propId' when calling publishProp(Async)"); @@ -832,7 +852,8 @@ private okhttp3.Call publishPropValidateBeforeCall(String propId, final ApiCallb * @return PropPublishStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -840,7 +861,7 @@ private okhttp3.Call publishPropValidateBeforeCall(String propId, final ApiCallb
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public PropPublishStatus publishProp(String propId) throws ApiException { + public PropPublishStatus publishProp(@javax.annotation.Nonnull String propId) throws ApiException { ApiResponse localVarResp = publishPropWithHttpInfo(propId); return localVarResp.getData(); } @@ -852,7 +873,8 @@ public PropPublishStatus publishProp(String propId) throws ApiException { * @return ApiResponse<PropPublishStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -860,7 +882,7 @@ public PropPublishStatus publishProp(String propId) throws ApiException {
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public ApiResponse publishPropWithHttpInfo(String propId) throws ApiException { + public ApiResponse publishPropWithHttpInfo(@javax.annotation.Nonnull String propId) throws ApiException { okhttp3.Call localVarCall = publishPropValidateBeforeCall(propId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -874,7 +896,8 @@ public ApiResponse publishPropWithHttpInfo(String propId) thr * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -882,7 +905,7 @@ public ApiResponse publishPropWithHttpInfo(String propId) thr
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call publishPropAsync(String propId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call publishPropAsync(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = publishPropValidateBeforeCall(propId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -896,7 +919,8 @@ public okhttp3.Call publishPropAsync(String propId, final ApiCallback + + @@ -904,7 +928,7 @@ public okhttp3.Call publishPropAsync(String propId, final ApiCallback
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call unpublishPropCall(String propId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unpublishPropCall(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -950,7 +974,7 @@ public okhttp3.Call unpublishPropCall(String propId, final ApiCallback _callback } @SuppressWarnings("rawtypes") - private okhttp3.Call unpublishPropValidateBeforeCall(String propId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call unpublishPropValidateBeforeCall(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'propId' is set if (propId == null) { throw new ApiException("Missing the required parameter 'propId' when calling unpublishProp(Async)"); @@ -967,7 +991,8 @@ private okhttp3.Call unpublishPropValidateBeforeCall(String propId, final ApiCal * @return PropPublishStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -975,7 +1000,7 @@ private okhttp3.Call unpublishPropValidateBeforeCall(String propId, final ApiCal
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public PropPublishStatus unpublishProp(String propId) throws ApiException { + public PropPublishStatus unpublishProp(@javax.annotation.Nonnull String propId) throws ApiException { ApiResponse localVarResp = unpublishPropWithHttpInfo(propId); return localVarResp.getData(); } @@ -987,7 +1012,8 @@ public PropPublishStatus unpublishProp(String propId) throws ApiException { * @return ApiResponse<PropPublishStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -995,7 +1021,7 @@ public PropPublishStatus unpublishProp(String propId) throws ApiException {
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public ApiResponse unpublishPropWithHttpInfo(String propId) throws ApiException { + public ApiResponse unpublishPropWithHttpInfo(@javax.annotation.Nonnull String propId) throws ApiException { okhttp3.Call localVarCall = unpublishPropValidateBeforeCall(propId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1009,7 +1035,8 @@ public ApiResponse unpublishPropWithHttpInfo(String propId) t * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -1017,7 +1044,7 @@ public ApiResponse unpublishPropWithHttpInfo(String propId) t
Response Details
Status Code Description Response Headers
200 Returns a single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call unpublishPropAsync(String propId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unpublishPropAsync(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = unpublishPropValidateBeforeCall(propId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1032,7 +1059,8 @@ public okhttp3.Call unpublishPropAsync(String propId, final ApiCallback + + @@ -1040,7 +1068,7 @@ public okhttp3.Call unpublishPropAsync(String propId, final ApiCallback
Response Details
Status Code Description Response Headers
200 Returns a single Prop object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call updatePropCall(String propId, UpdatePropRequest updatePropRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updatePropCall(@javax.annotation.Nonnull String propId, @javax.annotation.Nonnull UpdatePropRequest updatePropRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1087,7 +1115,7 @@ public okhttp3.Call updatePropCall(String propId, UpdatePropRequest updatePropRe } @SuppressWarnings("rawtypes") - private okhttp3.Call updatePropValidateBeforeCall(String propId, UpdatePropRequest updatePropRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updatePropValidateBeforeCall(@javax.annotation.Nonnull String propId, @javax.annotation.Nonnull UpdatePropRequest updatePropRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'propId' is set if (propId == null) { throw new ApiException("Missing the required parameter 'propId' when calling updateProp(Async)"); @@ -1110,7 +1138,8 @@ private okhttp3.Call updatePropValidateBeforeCall(String propId, UpdatePropReque * @return Prop * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -1118,7 +1147,7 @@ private okhttp3.Call updatePropValidateBeforeCall(String propId, UpdatePropReque
Response Details
Status Code Description Response Headers
200 Returns a single Prop object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public Prop updateProp(String propId, UpdatePropRequest updatePropRequest) throws ApiException { + public Prop updateProp(@javax.annotation.Nonnull String propId, @javax.annotation.Nonnull UpdatePropRequest updatePropRequest) throws ApiException { ApiResponse localVarResp = updatePropWithHttpInfo(propId, updatePropRequest); return localVarResp.getData(); } @@ -1131,7 +1160,8 @@ public Prop updateProp(String propId, UpdatePropRequest updatePropRequest) throw * @return ApiResponse<Prop> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -1139,7 +1169,7 @@ public Prop updateProp(String propId, UpdatePropRequest updatePropRequest) throw
Response Details
Status Code Description Response Headers
200 Returns a single Prop object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public ApiResponse updatePropWithHttpInfo(String propId, UpdatePropRequest updatePropRequest) throws ApiException { + public ApiResponse updatePropWithHttpInfo(@javax.annotation.Nonnull String propId, @javax.annotation.Nonnull UpdatePropRequest updatePropRequest) throws ApiException { okhttp3.Call localVarCall = updatePropValidateBeforeCall(propId, updatePropRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1154,7 +1184,8 @@ public ApiResponse updatePropWithHttpInfo(String propId, UpdatePropRequest * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -1162,7 +1193,7 @@ public ApiResponse updatePropWithHttpInfo(String propId, UpdatePropRequest
Response Details
Status Code Description Response Headers
200 Returns a single Prop object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing prop. -
*/ - public okhttp3.Call updatePropAsync(String propId, UpdatePropRequest updatePropRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updatePropAsync(@javax.annotation.Nonnull String propId, @javax.annotation.Nonnull UpdatePropRequest updatePropRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updatePropValidateBeforeCall(propId, updatePropRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/UsersApi.java b/src/main/java/io/github/vrchatapi/api/UsersApi.java index aa64f96e..86c311f8 100644 --- a/src/main/java/io/github/vrchatapi/api/UsersApi.java +++ b/src/main/java/io/github/vrchatapi/api/UsersApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -37,6 +37,8 @@ import io.github.vrchatapi.model.LimitedUserSearch; import io.github.vrchatapi.model.MutualFriend; import io.github.vrchatapi.model.Mutuals; +import io.github.vrchatapi.model.PrivateProfile; +import io.github.vrchatapi.model.PublicProfile; import io.github.vrchatapi.model.RepresentedGroup; import io.github.vrchatapi.model.TutorialStatus; import io.github.vrchatapi.model.UpdateUserBadgeRequest; @@ -50,7 +52,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class UsersApi { private ApiClient localVarApiClient; @@ -97,14 +98,15 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 single CurrentUser object. -
400 Error response when a user attempts to add an invalid, restricted, or duplicate tag to their profile, attempts to add tags above the limit for their profile, or attempts to remove invalid, restricted, or absent tag from their profile. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call addTagsCall(String userId, ChangeUserTagsRequest changeUserTagsRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addTagsCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -151,7 +153,7 @@ public okhttp3.Call addTagsCall(String userId, ChangeUserTagsRequest changeUserT } @SuppressWarnings("rawtypes") - private okhttp3.Call addTagsValidateBeforeCall(String userId, ChangeUserTagsRequest changeUserTagsRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call addTagsValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest, 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 addTags(Async)"); @@ -174,14 +176,15 @@ private okhttp3.Call addTagsValidateBeforeCall(String userId, ChangeUserTagsRequ * @return CurrentUser * @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 single CurrentUser object. -
400 Error response when a user attempts to add an invalid, restricted, or duplicate tag to their profile, attempts to add tags above the limit for their profile, or attempts to remove invalid, restricted, or absent tag from their profile. -
401 Error response due to missing auth cookie. -
*/ - public CurrentUser addTags(String userId, ChangeUserTagsRequest changeUserTagsRequest) throws ApiException { + public CurrentUser addTags(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest) throws ApiException { ApiResponse localVarResp = addTagsWithHttpInfo(userId, changeUserTagsRequest); return localVarResp.getData(); } @@ -194,14 +197,15 @@ public CurrentUser addTags(String userId, ChangeUserTagsRequest changeUserTagsRe * @return ApiResponse<CurrentUser> * @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 single CurrentUser object. -
400 Error response when a user attempts to add an invalid, restricted, or duplicate tag to their profile, attempts to add tags above the limit for their profile, or attempts to remove invalid, restricted, or absent tag from their profile. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse addTagsWithHttpInfo(String userId, ChangeUserTagsRequest changeUserTagsRequest) throws ApiException { + public ApiResponse addTagsWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest) throws ApiException { okhttp3.Call localVarCall = addTagsValidateBeforeCall(userId, changeUserTagsRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -216,14 +220,15 @@ public ApiResponse addTagsWithHttpInfo(String userId, ChangeUserTag * @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 single CurrentUser object. -
400 Error response when a user attempts to add an invalid, restricted, or duplicate tag to their profile, attempts to add tags above the limit for their profile, or attempts to remove invalid, restricted, or absent tag from their profile. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call addTagsAsync(String userId, ChangeUserTagsRequest changeUserTagsRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addTagsAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addTagsValidateBeforeCall(userId, changeUserTagsRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -238,14 +243,15 @@ public okhttp3.Call addTagsAsync(String userId, ChangeUserTagsRequest changeUser * @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 The user has persistence data for the given world. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public okhttp3.Call checkUserPersistenceExistsCall(String userId, String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call checkUserPersistenceExistsCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -292,7 +298,7 @@ public okhttp3.Call checkUserPersistenceExistsCall(String userId, String worldId } @SuppressWarnings("rawtypes") - private okhttp3.Call checkUserPersistenceExistsValidateBeforeCall(String userId, String worldId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call checkUserPersistenceExistsValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, 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 checkUserPersistenceExists(Async)"); @@ -314,14 +320,15 @@ private okhttp3.Call checkUserPersistenceExistsValidateBeforeCall(String userId, * @param worldId Must be a valid world ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 The user has persistence data for the given world. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public void checkUserPersistenceExists(String userId, String worldId) throws ApiException { + public void checkUserPersistenceExists(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { checkUserPersistenceExistsWithHttpInfo(userId, worldId); } @@ -333,14 +340,15 @@ public void checkUserPersistenceExists(String userId, String worldId) throws Api * @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 The user has persistence data for the given world. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public ApiResponse checkUserPersistenceExistsWithHttpInfo(String userId, String worldId) throws ApiException { + public ApiResponse checkUserPersistenceExistsWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { okhttp3.Call localVarCall = checkUserPersistenceExistsValidateBeforeCall(userId, worldId, null); return localVarApiClient.execute(localVarCall); } @@ -354,14 +362,15 @@ public ApiResponse checkUserPersistenceExistsWithHttpInfo(String userId, S * @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 The user has persistence data for the given world. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public okhttp3.Call checkUserPersistenceExistsAsync(String userId, String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call checkUserPersistenceExistsAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = checkUserPersistenceExistsValidateBeforeCall(userId, worldId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -374,13 +383,14 @@ public okhttp3.Call checkUserPersistenceExistsAsync(String userId, String worldI * @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 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteAllUserPersistenceDataCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAllUserPersistenceDataCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -426,7 +436,7 @@ public okhttp3.Call deleteAllUserPersistenceDataCall(String userId, final ApiCal } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteAllUserPersistenceDataValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteAllUserPersistenceDataValidateBeforeCall(@javax.annotation.Nonnull 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 deleteAllUserPersistenceData(Async)"); @@ -442,13 +452,14 @@ private okhttp3.Call deleteAllUserPersistenceDataValidateBeforeCall(String userI * @param userId Must be a valid user ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
*/ - public void deleteAllUserPersistenceData(String userId) throws ApiException { + public void deleteAllUserPersistenceData(@javax.annotation.Nonnull String userId) throws ApiException { deleteAllUserPersistenceDataWithHttpInfo(userId); } @@ -459,13 +470,14 @@ public void deleteAllUserPersistenceData(String userId) throws ApiException { * @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 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse deleteAllUserPersistenceDataWithHttpInfo(String userId) throws ApiException { + public ApiResponse deleteAllUserPersistenceDataWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = deleteAllUserPersistenceDataValidateBeforeCall(userId, null); return localVarApiClient.execute(localVarCall); } @@ -478,13 +490,14 @@ public ApiResponse deleteAllUserPersistenceDataWithHttpInfo(String userId) * @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 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteAllUserPersistenceDataAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAllUserPersistenceDataAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteAllUserPersistenceDataValidateBeforeCall(userId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -498,14 +511,15 @@ public okhttp3.Call deleteAllUserPersistenceDataAsync(String userId, final ApiCa * @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 The user's persistence data for the given world is deleted. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public okhttp3.Call deleteUserPersistenceCall(String userId, String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteUserPersistenceCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -552,7 +566,7 @@ public okhttp3.Call deleteUserPersistenceCall(String userId, String worldId, fin } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserPersistenceValidateBeforeCall(String userId, String worldId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteUserPersistenceValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, 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 deleteUserPersistence(Async)"); @@ -574,14 +588,15 @@ private okhttp3.Call deleteUserPersistenceValidateBeforeCall(String userId, Stri * @param worldId Must be a valid world ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 The user's persistence data for the given world is deleted. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public void deleteUserPersistence(String userId, String worldId) throws ApiException { + public void deleteUserPersistence(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { deleteUserPersistenceWithHttpInfo(userId, worldId); } @@ -593,14 +608,15 @@ public void deleteUserPersistence(String userId, String worldId) throws ApiExcep * @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 The user's persistence data for the given world is deleted. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public ApiResponse deleteUserPersistenceWithHttpInfo(String userId, String worldId) throws ApiException { + public ApiResponse deleteUserPersistenceWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { okhttp3.Call localVarCall = deleteUserPersistenceValidateBeforeCall(userId, worldId, null); return localVarApiClient.execute(localVarCall); } @@ -614,14 +630,15 @@ public ApiResponse deleteUserPersistenceWithHttpInfo(String userId, String * @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 The user's persistence data for the given world is deleted. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public okhttp3.Call deleteUserPersistenceAsync(String userId, String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteUserPersistenceAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteUserPersistenceValidateBeforeCall(userId, worldId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -634,13 +651,14 @@ public okhttp3.Call deleteUserPersistenceAsync(String userId, String worldId, fi * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getBlockedGroupsCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getBlockedGroupsCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -686,7 +704,7 @@ public okhttp3.Call getBlockedGroupsCall(String userId, final ApiCallback _callb } @SuppressWarnings("rawtypes") - private okhttp3.Call getBlockedGroupsValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBlockedGroupsValidateBeforeCall(@javax.annotation.Nonnull 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 getBlockedGroups(Async)"); @@ -703,13 +721,14 @@ private okhttp3.Call getBlockedGroupsValidateBeforeCall(String userId, final Api * @return List<Group> * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public List getBlockedGroups(String userId) throws ApiException { + public List getBlockedGroups(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse> localVarResp = getBlockedGroupsWithHttpInfo(userId); return localVarResp.getData(); } @@ -721,13 +740,14 @@ public List getBlockedGroups(String userId) throws ApiException { * @return ApiResponse<List<Group>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getBlockedGroupsWithHttpInfo(String userId) throws ApiException { + public ApiResponse> getBlockedGroupsWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getBlockedGroupsValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -741,13 +761,14 @@ public ApiResponse> getBlockedGroupsWithHttpInfo(String userId) thro * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getBlockedGroupsAsync(String userId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getBlockedGroupsAsync(@javax.annotation.Nonnull String userId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getBlockedGroupsValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -761,13 +782,14 @@ public okhttp3.Call getBlockedGroupsAsync(String userId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getInvitedGroupsCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInvitedGroupsCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -813,7 +835,7 @@ public okhttp3.Call getInvitedGroupsCall(String userId, final ApiCallback _callb } @SuppressWarnings("rawtypes") - private okhttp3.Call getInvitedGroupsValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInvitedGroupsValidateBeforeCall(@javax.annotation.Nonnull 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 getInvitedGroups(Async)"); @@ -830,13 +852,14 @@ private okhttp3.Call getInvitedGroupsValidateBeforeCall(String userId, final Api * @return List<Group> * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public List getInvitedGroups(String userId) throws ApiException { + public List getInvitedGroups(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse> localVarResp = getInvitedGroupsWithHttpInfo(userId); return localVarResp.getData(); } @@ -848,13 +871,14 @@ public List getInvitedGroups(String userId) throws ApiException { * @return ApiResponse<List<Group>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getInvitedGroupsWithHttpInfo(String userId) throws ApiException { + public ApiResponse> getInvitedGroupsWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getInvitedGroupsValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -868,13 +892,14 @@ public ApiResponse> getInvitedGroupsWithHttpInfo(String userId) thro * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getInvitedGroupsAsync(String userId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getInvitedGroupsAsync(@javax.annotation.Nonnull String userId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getInvitedGroupsValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -890,13 +915,14 @@ public okhttp3.Call getInvitedGroupsAsync(String userId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a list of MutualFriend objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getMutualFriendsCall(String userId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMutualFriendsCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -950,7 +976,7 @@ public okhttp3.Call getMutualFriendsCall(String userId, Integer n, Integer offse } @SuppressWarnings("rawtypes") - private okhttp3.Call getMutualFriendsValidateBeforeCall(String userId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getMutualFriendsValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, 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 getMutualFriends(Async)"); @@ -969,13 +995,14 @@ private okhttp3.Call getMutualFriendsValidateBeforeCall(String userId, Integer n * @return List<MutualFriend> * @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 list of MutualFriend objects. -
401 Error response due to missing auth cookie. -
*/ - public List getMutualFriends(String userId, Integer n, Integer offset) throws ApiException { + public List getMutualFriends(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = getMutualFriendsWithHttpInfo(userId, n, offset); return localVarResp.getData(); } @@ -989,13 +1016,14 @@ public List getMutualFriends(String userId, Integer n, Integer off * @return ApiResponse<List<MutualFriend>> * @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 list of MutualFriend objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getMutualFriendsWithHttpInfo(String userId, Integer n, Integer offset) throws ApiException { + public ApiResponse> getMutualFriendsWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getMutualFriendsValidateBeforeCall(userId, n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1011,13 +1039,14 @@ public ApiResponse> getMutualFriendsWithHttpInfo(String userI * @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 list of MutualFriend objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getMutualFriendsAsync(String userId, Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getMutualFriendsAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getMutualFriendsValidateBeforeCall(userId, n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1033,13 +1062,14 @@ public okhttp3.Call getMutualFriendsAsync(String userId, Integer n, Integer offs * @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 list of LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getMutualGroupsCall(String userId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMutualGroupsCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1093,7 +1123,7 @@ public okhttp3.Call getMutualGroupsCall(String userId, Integer n, Integer offset } @SuppressWarnings("rawtypes") - private okhttp3.Call getMutualGroupsValidateBeforeCall(String userId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getMutualGroupsValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, 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 getMutualGroups(Async)"); @@ -1112,13 +1142,14 @@ private okhttp3.Call getMutualGroupsValidateBeforeCall(String userId, Integer n, * @return List<LimitedUserGroups> * @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 list of LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
*/ - public List getMutualGroups(String userId, Integer n, Integer offset) throws ApiException { + public List getMutualGroups(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = getMutualGroupsWithHttpInfo(userId, n, offset); return localVarResp.getData(); } @@ -1132,13 +1163,14 @@ public List getMutualGroups(String userId, Integer n, Integer * @return ApiResponse<List<LimitedUserGroups>> * @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 list of LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getMutualGroupsWithHttpInfo(String userId, Integer n, Integer offset) throws ApiException { + public ApiResponse> getMutualGroupsWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getMutualGroupsValidateBeforeCall(userId, n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1154,13 +1186,14 @@ public ApiResponse> getMutualGroupsWithHttpInfo(String u * @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 list of LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getMutualGroupsAsync(String userId, Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getMutualGroupsAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getMutualGroupsValidateBeforeCall(userId, n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1174,13 +1207,14 @@ public okhttp3.Call getMutualGroupsAsync(String userId, Integer n, Integer offse * @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 single Mutuals object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getMutualsCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMutualsCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1226,7 +1260,7 @@ public okhttp3.Call getMutualsCall(String userId, final ApiCallback _callback) t } @SuppressWarnings("rawtypes") - private okhttp3.Call getMutualsValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getMutualsValidateBeforeCall(@javax.annotation.Nonnull 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 getMutuals(Async)"); @@ -1243,13 +1277,14 @@ private okhttp3.Call getMutualsValidateBeforeCall(String userId, final ApiCallba * @return Mutuals * @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 single Mutuals object. -
401 Error response due to missing auth cookie. -
*/ - public Mutuals getMutuals(String userId) throws ApiException { + public Mutuals getMutuals(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getMutualsWithHttpInfo(userId); return localVarResp.getData(); } @@ -1261,13 +1296,14 @@ public Mutuals getMutuals(String userId) throws ApiException { * @return ApiResponse<Mutuals> * @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 single Mutuals object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getMutualsWithHttpInfo(String userId) throws ApiException { + public ApiResponse getMutualsWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getMutualsValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1281,19 +1317,282 @@ public ApiResponse getMutualsWithHttpInfo(String userId) throws ApiExce * @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 single Mutuals object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getMutualsAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMutualsAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getMutualsValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getPrivateProfile + * @param userId Must be a valid user ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Returns profile data visible to the authenticated user. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getPrivateProfileCall(@javax.annotation.Nonnull String userId, 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 = "/profile/{userId}/private" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getPrivateProfileValidateBeforeCall(@javax.annotation.Nonnull 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 getPrivateProfile(Async)"); + } + + return getPrivateProfileCall(userId, _callback); + + } + + /** + * Get Private Profile + * Get profile information visible to the currently authenticated user. + * @param userId Must be a valid user ID. (required) + * @return PrivateProfile + * @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 profile data visible to the authenticated user. -
401 Error response due to missing auth cookie. -
+ */ + public PrivateProfile getPrivateProfile(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getPrivateProfileWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get Private Profile + * Get profile information visible to the currently authenticated user. + * @param userId Must be a valid user ID. (required) + * @return ApiResponse<PrivateProfile> + * @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 profile data visible to the authenticated user. -
401 Error response due to missing auth cookie. -
+ */ + public ApiResponse getPrivateProfileWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getPrivateProfileValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Private Profile (asynchronously) + * Get profile information visible to the currently authenticated user. + * @param userId Must be a valid user ID. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Returns profile data visible to the authenticated user. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getPrivateProfileAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getPrivateProfileValidateBeforeCall(userId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getPublicProfile + * @param userId Must be a valid user ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Returns a user's public profile. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getPublicProfileCall(@javax.annotation.Nonnull String userId, 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 = "/profile/{userId}" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getPublicProfileValidateBeforeCall(@javax.annotation.Nonnull 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 getPublicProfile(Async)"); + } + + return getPublicProfileCall(userId, _callback); + + } + + /** + * Get Public Profile + * Get a user's public profile information. + * @param userId Must be a valid user ID. (required) + * @return PublicProfile + * @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 user's public profile. -
401 Error response due to missing auth cookie. -
+ */ + public PublicProfile getPublicProfile(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getPublicProfileWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get Public Profile + * Get a user's public profile information. + * @param userId Must be a valid user ID. (required) + * @return ApiResponse<PublicProfile> + * @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 user's public profile. -
401 Error response due to missing auth cookie. -
+ */ + public ApiResponse getPublicProfileWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getPublicProfileValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Public Profile (asynchronously) + * Get a user's public profile information. + * @param userId Must be a valid user ID. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Returns a user's public profile. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getPublicProfileAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getPublicProfileValidateBeforeCall(userId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getUser * @param userId Must be a valid user ID. (required) @@ -1301,13 +1600,14 @@ public okhttp3.Call getMutualsAsync(String userId, final ApiCallback _c * @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 single User object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1353,7 +1653,7 @@ public okhttp3.Call getUserCall(String userId, final ApiCallback _callback) thro } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserValidateBeforeCall(@javax.annotation.Nonnull 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 getUser(Async)"); @@ -1370,13 +1670,14 @@ private okhttp3.Call getUserValidateBeforeCall(String userId, final ApiCallback * @return User * @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 single User object. -
401 Error response due to missing auth cookie. -
*/ - public User getUser(String userId) throws ApiException { + public User getUser(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getUserWithHttpInfo(userId); return localVarResp.getData(); } @@ -1388,13 +1689,14 @@ public User getUser(String userId) throws ApiException { * @return ApiResponse<User> * @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 single User object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getUserWithHttpInfo(String userId) throws ApiException { + public ApiResponse getUserWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getUserValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1408,13 +1710,14 @@ public ApiResponse getUserWithHttpInfo(String userId) throws ApiException * @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 single User object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1429,13 +1732,14 @@ public okhttp3.Call getUserAsync(String userId, final ApiCallback _callbac * @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 The group permissions the user has for every joined group. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserAllGroupPermissionsCall(String userId, String groupIds, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserAllGroupPermissionsCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String groupIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1485,7 +1789,7 @@ public okhttp3.Call getUserAllGroupPermissionsCall(String userId, String groupId } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserAllGroupPermissionsValidateBeforeCall(String userId, String groupIds, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserAllGroupPermissionsValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String groupIds, 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 getUserAllGroupPermissions(Async)"); @@ -1503,13 +1807,14 @@ private okhttp3.Call getUserAllGroupPermissionsValidateBeforeCall(String userId, * @return Map<String, List<GroupPermissions>> * @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 The group permissions the user has for every joined group. -
401 Error response due to missing auth cookie. -
*/ - public Map> getUserAllGroupPermissions(String userId, String groupIds) throws ApiException { + public Map> getUserAllGroupPermissions(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String groupIds) throws ApiException { ApiResponse>> localVarResp = getUserAllGroupPermissionsWithHttpInfo(userId, groupIds); return localVarResp.getData(); } @@ -1522,13 +1827,14 @@ public Map> getUserAllGroupPermissions(String use * @return ApiResponse<Map<String, List<GroupPermissions>>> * @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 The group permissions the user has for every joined group. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse>> getUserAllGroupPermissionsWithHttpInfo(String userId, String groupIds) throws ApiException { + public ApiResponse>> getUserAllGroupPermissionsWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String groupIds) throws ApiException { okhttp3.Call localVarCall = getUserAllGroupPermissionsValidateBeforeCall(userId, groupIds, null); Type localVarReturnType = new TypeToken>>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1543,13 +1849,14 @@ public ApiResponse>> getUserAllGroupPermissio * @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 The group permissions the user has for every joined group. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserAllGroupPermissionsAsync(String userId, String groupIds, final ApiCallback>> _callback) throws ApiException { + public okhttp3.Call getUserAllGroupPermissionsAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String groupIds, final ApiCallback>> _callback) throws ApiException { okhttp3.Call localVarCall = getUserAllGroupPermissionsValidateBeforeCall(userId, groupIds, _callback); Type localVarReturnType = new TypeToken>>(){}.getType(); @@ -1563,7 +1870,8 @@ public okhttp3.Call getUserAllGroupPermissionsAsync(String userId, String groupI * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1571,7 +1879,7 @@ public okhttp3.Call getUserAllGroupPermissionsAsync(String userId, String groupI * @deprecated */ @Deprecated - public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserByNameCall(@javax.annotation.Nonnull String username, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1618,7 +1926,7 @@ public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callba @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserByNameValidateBeforeCall(@javax.annotation.Nonnull String username, final ApiCallback _callback) throws ApiException { // verify the required parameter 'username' is set if (username == null) { throw new ApiException("Missing the required parameter 'username' when calling getUserByName(Async)"); @@ -1635,7 +1943,8 @@ private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ApiC * @return User * @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 single User object. -
401 Error response due to missing auth cookie. -
+
+ @@ -1643,7 +1952,7 @@ private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ApiC * @deprecated */ @Deprecated - public User getUserByName(String username) throws ApiException { + public User getUserByName(@javax.annotation.Nonnull String username) throws ApiException { ApiResponse localVarResp = getUserByNameWithHttpInfo(username); return localVarResp.getData(); } @@ -1655,7 +1964,8 @@ public User getUserByName(String username) throws ApiException { * @return ApiResponse<User> * @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 single User object. -
401 Error response due to missing auth cookie. -
+
+ @@ -1663,7 +1973,7 @@ public User getUserByName(String username) throws ApiException { * @deprecated */ @Deprecated - public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { + public ApiResponse getUserByNameWithHttpInfo(@javax.annotation.Nonnull String username) throws ApiException { okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1677,7 +1987,8 @@ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiEx * @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 single User object. -
401 Error response due to missing auth cookie. -
+
+ @@ -1685,7 +1996,7 @@ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiEx * @deprecated */ @Deprecated - public okhttp3.Call getUserByNameAsync(String username, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserByNameAsync(@javax.annotation.Nonnull String username, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1702,7 +2013,8 @@ public okhttp3.Call getUserByNameAsync(String username, final ApiCallback * @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 single User object. -
401 Error response due to missing auth cookie. -
+
+ @@ -1710,7 +2022,7 @@ public okhttp3.Call getUserByNameAsync(String username, final ApiCallback * @deprecated */ @Deprecated - public okhttp3.Call getUserFeedbackCall(String userId, String contentId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserFeedbackCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String contentId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1769,7 +2081,7 @@ public okhttp3.Call getUserFeedbackCall(String userId, String contentId, Integer @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getUserFeedbackValidateBeforeCall(String userId, String contentId, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserFeedbackValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String contentId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, 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 getUserFeedback(Async)"); @@ -1789,7 +2101,8 @@ private okhttp3.Call getUserFeedbackValidateBeforeCall(String userId, String con * @return List<Feedback> * @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 list of Feedback objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -1797,7 +2110,7 @@ private okhttp3.Call getUserFeedbackValidateBeforeCall(String userId, String con * @deprecated */ @Deprecated - public List getUserFeedback(String userId, String contentId, Integer n, Integer offset) throws ApiException { + public List getUserFeedback(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String contentId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = getUserFeedbackWithHttpInfo(userId, contentId, n, offset); return localVarResp.getData(); } @@ -1812,7 +2125,8 @@ public List getUserFeedback(String userId, String contentId, Integer n * @return ApiResponse<List<Feedback>> * @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 list of Feedback objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -1820,7 +2134,7 @@ public List getUserFeedback(String userId, String contentId, Integer n * @deprecated */ @Deprecated - public ApiResponse> getUserFeedbackWithHttpInfo(String userId, String contentId, Integer n, Integer offset) throws ApiException { + public ApiResponse> getUserFeedbackWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String contentId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getUserFeedbackValidateBeforeCall(userId, contentId, n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1837,7 +2151,8 @@ public ApiResponse> getUserFeedbackWithHttpInfo(String userId, St * @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 list of Feedback objects. -
401 Error response due to missing auth cookie. -
+
+ @@ -1845,7 +2160,7 @@ public ApiResponse> getUserFeedbackWithHttpInfo(String userId, St * @deprecated */ @Deprecated - public okhttp3.Call getUserFeedbackAsync(String userId, String contentId, Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getUserFeedbackAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String contentId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getUserFeedbackValidateBeforeCall(userId, contentId, n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1859,14 +2174,15 @@ public okhttp3.Call getUserFeedbackAsync(String userId, String contentId, Intege * @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 list of Feedback objects. -
401 Error response due to missing auth cookie. -
+
+
Response Details
Status Code Description Response Headers
200 Returns a list of Instance objects with a fetched at time. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
*/ - public okhttp3.Call getUserGroupInstancesCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserGroupInstancesCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1912,7 +2228,7 @@ public okhttp3.Call getUserGroupInstancesCall(String userId, final ApiCallback _ } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserGroupInstancesValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserGroupInstancesValidateBeforeCall(@javax.annotation.Nonnull 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 getUserGroupInstances(Async)"); @@ -1929,14 +2245,15 @@ private okhttp3.Call getUserGroupInstancesValidateBeforeCall(String userId, fina * @return GetUserGroupInstances200Response * @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 list of Instance objects with a fetched at time. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
*/ - public GetUserGroupInstances200Response getUserGroupInstances(String userId) throws ApiException { + public GetUserGroupInstances200Response getUserGroupInstances(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getUserGroupInstancesWithHttpInfo(userId); return localVarResp.getData(); } @@ -1948,14 +2265,15 @@ public GetUserGroupInstances200Response getUserGroupInstances(String userId) thr * @return ApiResponse<GetUserGroupInstances200Response> * @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 list of Instance objects with a fetched at time. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
*/ - public ApiResponse getUserGroupInstancesWithHttpInfo(String userId) throws ApiException { + public ApiResponse getUserGroupInstancesWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getUserGroupInstancesValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1969,14 +2287,15 @@ public ApiResponse getUserGroupInstancesWithHt * @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 list of Instance objects with a fetched at time. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
*/ - public okhttp3.Call getUserGroupInstancesAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserGroupInstancesAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserGroupInstancesValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1991,14 +2310,15 @@ public okhttp3.Call getUserGroupInstancesAsync(String userId, final ApiCallback< * @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 list of Instance objects with a fetched at time. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
*/ - public okhttp3.Call getUserGroupInstancesForGroupCall(String userId, String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserGroupInstancesForGroupCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2045,7 +2365,7 @@ public okhttp3.Call getUserGroupInstancesForGroupCall(String userId, String grou } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserGroupInstancesForGroupValidateBeforeCall(String userId, String groupId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserGroupInstancesForGroupValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupId, 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 getUserGroupInstancesForGroup(Async)"); @@ -2068,14 +2388,15 @@ private okhttp3.Call getUserGroupInstancesForGroupValidateBeforeCall(String user * @return GetUserGroupInstances200Response * @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 list of Instance objects with a fetched at time. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
*/ - public GetUserGroupInstances200Response getUserGroupInstancesForGroup(String userId, String groupId) throws ApiException { + public GetUserGroupInstances200Response getUserGroupInstancesForGroup(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupId) throws ApiException { ApiResponse localVarResp = getUserGroupInstancesForGroupWithHttpInfo(userId, groupId); return localVarResp.getData(); } @@ -2088,14 +2409,15 @@ public GetUserGroupInstances200Response getUserGroupInstancesForGroup(String use * @return ApiResponse<GetUserGroupInstances200Response> * @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 list of Instance objects with a fetched at time. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
*/ - public ApiResponse getUserGroupInstancesForGroupWithHttpInfo(String userId, String groupId) throws ApiException { + public ApiResponse getUserGroupInstancesForGroupWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupId) throws ApiException { okhttp3.Call localVarCall = getUserGroupInstancesForGroupValidateBeforeCall(userId, groupId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2110,14 +2432,15 @@ public ApiResponse getUserGroupInstancesForGro * @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 list of Instance objects with a fetched at time. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
*/ - public okhttp3.Call getUserGroupInstancesForGroupAsync(String userId, String groupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserGroupInstancesForGroupAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserGroupInstancesForGroupValidateBeforeCall(userId, groupId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2131,13 +2454,14 @@ public okhttp3.Call getUserGroupInstancesForGroupAsync(String userId, String gro * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserGroupRequestsCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserGroupRequestsCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2183,7 +2507,7 @@ public okhttp3.Call getUserGroupRequestsCall(String userId, final ApiCallback _c } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserGroupRequestsValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserGroupRequestsValidateBeforeCall(@javax.annotation.Nonnull 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 getUserGroupRequests(Async)"); @@ -2200,13 +2524,14 @@ private okhttp3.Call getUserGroupRequestsValidateBeforeCall(String userId, final * @return List<Group> * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public List getUserGroupRequests(String userId) throws ApiException { + public List getUserGroupRequests(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse> localVarResp = getUserGroupRequestsWithHttpInfo(userId); return localVarResp.getData(); } @@ -2218,13 +2543,14 @@ public List getUserGroupRequests(String userId) throws ApiException { * @return ApiResponse<List<Group>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getUserGroupRequestsWithHttpInfo(String userId) throws ApiException { + public ApiResponse> getUserGroupRequestsWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getUserGroupRequestsValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2238,13 +2564,14 @@ public ApiResponse> getUserGroupRequestsWithHttpInfo(String userId) * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserGroupRequestsAsync(String userId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getUserGroupRequestsAsync(@javax.annotation.Nonnull String userId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getUserGroupRequestsValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -2258,13 +2585,14 @@ public okhttp3.Call getUserGroupRequestsAsync(String userId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a list of LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserGroupsCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserGroupsCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2310,7 +2638,7 @@ public okhttp3.Call getUserGroupsCall(String userId, final ApiCallback _callback } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserGroupsValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserGroupsValidateBeforeCall(@javax.annotation.Nonnull 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 getUserGroups(Async)"); @@ -2327,13 +2655,14 @@ private okhttp3.Call getUserGroupsValidateBeforeCall(String userId, final ApiCal * @return List<LimitedUserGroups> * @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 list of LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
*/ - public List getUserGroups(String userId) throws ApiException { + public List getUserGroups(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse> localVarResp = getUserGroupsWithHttpInfo(userId); return localVarResp.getData(); } @@ -2345,13 +2674,14 @@ public List getUserGroups(String userId) throws ApiException * @return ApiResponse<List<LimitedUserGroups>> * @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 list of LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getUserGroupsWithHttpInfo(String userId) throws ApiException { + public ApiResponse> getUserGroupsWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getUserGroupsValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2365,13 +2695,14 @@ public ApiResponse> getUserGroupsWithHttpInfo(String use * @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 list of LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserGroupsAsync(String userId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getUserGroupsAsync(@javax.annotation.Nonnull String userId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getUserGroupsValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -2385,13 +2716,14 @@ public okhttp3.Call getUserGroupsAsync(String userId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a single UserNote object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserNoteCall(String userNoteId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserNoteCall(@javax.annotation.Nonnull String userNoteId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2437,7 +2769,7 @@ public okhttp3.Call getUserNoteCall(String userNoteId, final ApiCallback _callba } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserNoteValidateBeforeCall(String userNoteId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserNoteValidateBeforeCall(@javax.annotation.Nonnull String userNoteId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'userNoteId' is set if (userNoteId == null) { throw new ApiException("Missing the required parameter 'userNoteId' when calling getUserNote(Async)"); @@ -2454,13 +2786,14 @@ private okhttp3.Call getUserNoteValidateBeforeCall(String userNoteId, final ApiC * @return UserNote * @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 single UserNote object. -
401 Error response due to missing auth cookie. -
*/ - public UserNote getUserNote(String userNoteId) throws ApiException { + public UserNote getUserNote(@javax.annotation.Nonnull String userNoteId) throws ApiException { ApiResponse localVarResp = getUserNoteWithHttpInfo(userNoteId); return localVarResp.getData(); } @@ -2472,13 +2805,14 @@ public UserNote getUserNote(String userNoteId) throws ApiException { * @return ApiResponse<UserNote> * @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 single UserNote object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getUserNoteWithHttpInfo(String userNoteId) throws ApiException { + public ApiResponse getUserNoteWithHttpInfo(@javax.annotation.Nonnull String userNoteId) throws ApiException { okhttp3.Call localVarCall = getUserNoteValidateBeforeCall(userNoteId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2492,13 +2826,14 @@ public ApiResponse getUserNoteWithHttpInfo(String userNoteId) throws A * @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 single UserNote object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserNoteAsync(String userNoteId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserNoteAsync(@javax.annotation.Nonnull String userNoteId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserNoteValidateBeforeCall(userNoteId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2513,13 +2848,14 @@ public okhttp3.Call getUserNoteAsync(String userNoteId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 Returns a list of UserNote objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserNotesCall(Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserNotesCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2572,7 +2908,7 @@ public okhttp3.Call getUserNotesCall(Integer n, Integer offset, final ApiCallbac } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserNotesValidateBeforeCall(Integer n, Integer offset, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserNotesValidateBeforeCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { return getUserNotesCall(n, offset, _callback); } @@ -2585,13 +2921,14 @@ private okhttp3.Call getUserNotesValidateBeforeCall(Integer n, Integer offset, f * @return List<UserNote> * @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 list of UserNote objects. -
401 Error response due to missing auth cookie. -
*/ - public List getUserNotes(Integer n, Integer offset) throws ApiException { + public List getUserNotes(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { ApiResponse> localVarResp = getUserNotesWithHttpInfo(n, offset); return localVarResp.getData(); } @@ -2604,13 +2941,14 @@ public List getUserNotes(Integer n, Integer offset) throws ApiExceptio * @return ApiResponse<List<UserNote>> * @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 list of UserNote objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getUserNotesWithHttpInfo(Integer n, Integer offset) throws ApiException { + public ApiResponse> getUserNotesWithHttpInfo(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { okhttp3.Call localVarCall = getUserNotesValidateBeforeCall(n, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2625,13 +2963,14 @@ public ApiResponse> getUserNotesWithHttpInfo(Integer n, Integer o * @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 list of UserNote objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserNotesAsync(Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getUserNotesAsync(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getUserNotesValidateBeforeCall(n, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -2645,13 +2984,14 @@ public okhttp3.Call getUserNotesAsync(Integer n, Integer offset, final ApiCallba * @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 getUserRepresentedGroupCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserRepresentedGroupCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2697,7 +3037,7 @@ public okhttp3.Call getUserRepresentedGroupCall(String userId, final ApiCallback } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserRepresentedGroupValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserRepresentedGroupValidateBeforeCall(@javax.annotation.Nonnull 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 getUserRepresentedGroup(Async)"); @@ -2714,13 +3054,14 @@ private okhttp3.Call getUserRepresentedGroupValidateBeforeCall(String userId, fi * @return RepresentedGroup * @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 RepresentedGroup getUserRepresentedGroup(String userId) throws ApiException { + public RepresentedGroup getUserRepresentedGroup(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getUserRepresentedGroupWithHttpInfo(userId); return localVarResp.getData(); } @@ -2732,13 +3073,14 @@ public RepresentedGroup getUserRepresentedGroup(String userId) throws ApiExcepti * @return ApiResponse<RepresentedGroup> * @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 getUserRepresentedGroupWithHttpInfo(String userId) throws ApiException { + public ApiResponse getUserRepresentedGroupWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getUserRepresentedGroupValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2752,13 +3094,14 @@ public ApiResponse getUserRepresentedGroupWithHttpInfo(String * @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 getUserRepresentedGroupAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserRepresentedGroupAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserRepresentedGroupValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2772,13 +3115,14 @@ public okhttp3.Call getUserRepresentedGroupAsync(String userId, final ApiCallbac * @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 single TutorialStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserTutorialStatusCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserTutorialStatusCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2824,7 +3168,7 @@ public okhttp3.Call getUserTutorialStatusCall(String userId, final ApiCallback _ } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserTutorialStatusValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getUserTutorialStatusValidateBeforeCall(@javax.annotation.Nonnull 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 getUserTutorialStatus(Async)"); @@ -2841,13 +3185,14 @@ private okhttp3.Call getUserTutorialStatusValidateBeforeCall(String userId, fina * @return TutorialStatus * @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 single TutorialStatus object. -
401 Error response due to missing auth cookie. -
*/ - public TutorialStatus getUserTutorialStatus(String userId) throws ApiException { + public TutorialStatus getUserTutorialStatus(@javax.annotation.Nonnull String userId) throws ApiException { ApiResponse localVarResp = getUserTutorialStatusWithHttpInfo(userId); return localVarResp.getData(); } @@ -2859,13 +3204,14 @@ public TutorialStatus getUserTutorialStatus(String userId) throws ApiException { * @return ApiResponse<TutorialStatus> * @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 single TutorialStatus object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getUserTutorialStatusWithHttpInfo(String userId) throws ApiException { + public ApiResponse getUserTutorialStatusWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = getUserTutorialStatusValidateBeforeCall(userId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2879,13 +3225,14 @@ public ApiResponse getUserTutorialStatusWithHttpInfo(String user * @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 single TutorialStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserTutorialStatusAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserTutorialStatusAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUserTutorialStatusValidateBeforeCall(userId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2900,14 +3247,15 @@ public okhttp3.Call getUserTutorialStatusAsync(String userId, final ApiCallback< * @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 single CurrentUser object. -
400 Error response when a user attempts to add an invalid, restricted, or duplicate tag to their profile, attempts to add tags above the limit for their profile, or attempts to remove invalid, restricted, or absent tag from their profile. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call removeTagsCall(String userId, ChangeUserTagsRequest changeUserTagsRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call removeTagsCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2954,7 +3302,7 @@ public okhttp3.Call removeTagsCall(String userId, ChangeUserTagsRequest changeUs } @SuppressWarnings("rawtypes") - private okhttp3.Call removeTagsValidateBeforeCall(String userId, ChangeUserTagsRequest changeUserTagsRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call removeTagsValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest, 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 removeTags(Async)"); @@ -2977,14 +3325,15 @@ private okhttp3.Call removeTagsValidateBeforeCall(String userId, ChangeUserTagsR * @return CurrentUser * @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 single CurrentUser object. -
400 Error response when a user attempts to add an invalid, restricted, or duplicate tag to their profile, attempts to add tags above the limit for their profile, or attempts to remove invalid, restricted, or absent tag from their profile. -
401 Error response due to missing auth cookie. -
*/ - public CurrentUser removeTags(String userId, ChangeUserTagsRequest changeUserTagsRequest) throws ApiException { + public CurrentUser removeTags(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest) throws ApiException { ApiResponse localVarResp = removeTagsWithHttpInfo(userId, changeUserTagsRequest); return localVarResp.getData(); } @@ -2997,14 +3346,15 @@ public CurrentUser removeTags(String userId, ChangeUserTagsRequest changeUserTag * @return ApiResponse<CurrentUser> * @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 single CurrentUser object. -
400 Error response when a user attempts to add an invalid, restricted, or duplicate tag to their profile, attempts to add tags above the limit for their profile, or attempts to remove invalid, restricted, or absent tag from their profile. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse removeTagsWithHttpInfo(String userId, ChangeUserTagsRequest changeUserTagsRequest) throws ApiException { + public ApiResponse removeTagsWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest) throws ApiException { okhttp3.Call localVarCall = removeTagsValidateBeforeCall(userId, changeUserTagsRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3019,14 +3369,15 @@ public ApiResponse removeTagsWithHttpInfo(String userId, ChangeUser * @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 single CurrentUser object. -
400 Error response when a user attempts to add an invalid, restricted, or duplicate tag to their profile, attempts to add tags above the limit for their profile, or attempts to remove invalid, restricted, or absent tag from their profile. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call removeTagsAsync(String userId, ChangeUserTagsRequest changeUserTagsRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call removeTagsAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeTagsValidateBeforeCall(userId, changeUserTagsRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -3044,14 +3395,15 @@ public okhttp3.Call removeTagsAsync(String userId, ChangeUserTagsRequest changeU * @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 list of LimitedUserSearch objects. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchUsersCall(String search, String developerType, Integer n, Integer offset, Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchUsersCall(@javax.annotation.Nullable String search, @javax.annotation.Nullable String developerType, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3116,7 +3468,7 @@ public okhttp3.Call searchUsersCall(String search, String developerType, Integer } @SuppressWarnings("rawtypes") - private okhttp3.Call searchUsersValidateBeforeCall(String search, String developerType, Integer n, Integer offset, Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchUsersValidateBeforeCall(@javax.annotation.Nullable String search, @javax.annotation.Nullable String developerType, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean isInternalVariant, final ApiCallback _callback) throws ApiException { return searchUsersCall(search, developerType, n, offset, isInternalVariant, _callback); } @@ -3132,14 +3484,15 @@ private okhttp3.Call searchUsersValidateBeforeCall(String search, String develop * @return List<LimitedUserSearch> * @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 list of LimitedUserSearch objects. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
*/ - public List searchUsers(String search, String developerType, Integer n, Integer offset, Boolean isInternalVariant) throws ApiException { + public List searchUsers(@javax.annotation.Nullable String search, @javax.annotation.Nullable String developerType, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean isInternalVariant) throws ApiException { ApiResponse> localVarResp = searchUsersWithHttpInfo(search, developerType, n, offset, isInternalVariant); return localVarResp.getData(); } @@ -3155,14 +3508,15 @@ public List searchUsers(String search, String developerType, * @return ApiResponse<List<LimitedUserSearch>> * @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 list of LimitedUserSearch objects. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> searchUsersWithHttpInfo(String search, String developerType, Integer n, Integer offset, Boolean isInternalVariant) throws ApiException { + public ApiResponse> searchUsersWithHttpInfo(@javax.annotation.Nullable String search, @javax.annotation.Nullable String developerType, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean isInternalVariant) throws ApiException { okhttp3.Call localVarCall = searchUsersValidateBeforeCall(search, developerType, n, offset, isInternalVariant, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3180,14 +3534,15 @@ public ApiResponse> searchUsersWithHttpInfo(String searc * @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 list of LimitedUserSearch objects. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchUsersAsync(String search, String developerType, Integer n, Integer offset, Boolean isInternalVariant, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call searchUsersAsync(@javax.annotation.Nullable String search, @javax.annotation.Nullable String developerType, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Boolean isInternalVariant, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchUsersValidateBeforeCall(search, developerType, n, offset, isInternalVariant, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -3203,7 +3558,8 @@ public okhttp3.Call searchUsersAsync(String search, String developerType, Intege * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -3211,7 +3567,7 @@ public okhttp3.Call searchUsersAsync(String search, String developerType, Intege
Response Details
Status Code Description Response Headers
200 The user's badge is updated. -
401 Error response due to missing auth cookie. -
404 The user does not have the badge. -
*/ - public okhttp3.Call updateBadgeCall(String userId, String badgeId, UpdateUserBadgeRequest updateUserBadgeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateBadgeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String badgeId, @javax.annotation.Nonnull UpdateUserBadgeRequest updateUserBadgeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3259,7 +3615,7 @@ public okhttp3.Call updateBadgeCall(String userId, String badgeId, UpdateUserBad } @SuppressWarnings("rawtypes") - private okhttp3.Call updateBadgeValidateBeforeCall(String userId, String badgeId, UpdateUserBadgeRequest updateUserBadgeRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateBadgeValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String badgeId, @javax.annotation.Nonnull UpdateUserBadgeRequest updateUserBadgeRequest, 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 updateBadge(Async)"); @@ -3287,7 +3643,8 @@ private okhttp3.Call updateBadgeValidateBeforeCall(String userId, String badgeId * @param updateUserBadgeRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -3295,7 +3652,7 @@ private okhttp3.Call updateBadgeValidateBeforeCall(String userId, String badgeId
Response Details
Status Code Description Response Headers
200 The user's badge is updated. -
401 Error response due to missing auth cookie. -
404 The user does not have the badge. -
*/ - public void updateBadge(String userId, String badgeId, UpdateUserBadgeRequest updateUserBadgeRequest) throws ApiException { + public void updateBadge(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String badgeId, @javax.annotation.Nonnull UpdateUserBadgeRequest updateUserBadgeRequest) throws ApiException { updateBadgeWithHttpInfo(userId, badgeId, updateUserBadgeRequest); } @@ -3308,7 +3665,8 @@ public void updateBadge(String userId, String badgeId, UpdateUserBadgeRequest up * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -3316,7 +3674,7 @@ public void updateBadge(String userId, String badgeId, UpdateUserBadgeRequest up
Response Details
Status Code Description Response Headers
200 The user's badge is updated. -
401 Error response due to missing auth cookie. -
404 The user does not have the badge. -
*/ - public ApiResponse updateBadgeWithHttpInfo(String userId, String badgeId, UpdateUserBadgeRequest updateUserBadgeRequest) throws ApiException { + public ApiResponse updateBadgeWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String badgeId, @javax.annotation.Nonnull UpdateUserBadgeRequest updateUserBadgeRequest) throws ApiException { okhttp3.Call localVarCall = updateBadgeValidateBeforeCall(userId, badgeId, updateUserBadgeRequest, null); return localVarApiClient.execute(localVarCall); } @@ -3331,7 +3689,8 @@ public ApiResponse updateBadgeWithHttpInfo(String userId, String badgeId, * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ @@ -3339,7 +3698,7 @@ public ApiResponse updateBadgeWithHttpInfo(String userId, String badgeId,
Response Details
Status Code Description Response Headers
200 The user's badge is updated. -
401 Error response due to missing auth cookie. -
404 The user does not have the badge. -
*/ - public okhttp3.Call updateBadgeAsync(String userId, String badgeId, UpdateUserBadgeRequest updateUserBadgeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateBadgeAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String badgeId, @javax.annotation.Nonnull UpdateUserBadgeRequest updateUserBadgeRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateBadgeValidateBeforeCall(userId, badgeId, updateUserBadgeRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -3353,14 +3712,15 @@ public okhttp3.Call updateBadgeAsync(String userId, String badgeId, UpdateUserBa * @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 single CurrentUser object. -
400 Error response when a user attempts to change a property without supplying their current password. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateUserCall(String userId, UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateUserCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3407,7 +3767,7 @@ public okhttp3.Call updateUserCall(String userId, UpdateUserRequest updateUserRe } @SuppressWarnings("rawtypes") - private okhttp3.Call updateUserValidateBeforeCall(String userId, UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateUserValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateUserRequest updateUserRequest, 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 updateUser(Async)"); @@ -3425,14 +3785,15 @@ private okhttp3.Call updateUserValidateBeforeCall(String userId, UpdateUserReque * @return CurrentUser * @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 single CurrentUser object. -
400 Error response when a user attempts to change a property without supplying their current password. -
401 Error response due to missing auth cookie. -
*/ - public CurrentUser updateUser(String userId, UpdateUserRequest updateUserRequest) throws ApiException { + public CurrentUser updateUser(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateUserRequest updateUserRequest) throws ApiException { ApiResponse localVarResp = updateUserWithHttpInfo(userId, updateUserRequest); return localVarResp.getData(); } @@ -3445,14 +3806,15 @@ public CurrentUser updateUser(String userId, UpdateUserRequest updateUserRequest * @return ApiResponse<CurrentUser> * @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 single CurrentUser object. -
400 Error response when a user attempts to change a property without supplying their current password. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse updateUserWithHttpInfo(String userId, UpdateUserRequest updateUserRequest) throws ApiException { + public ApiResponse updateUserWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateUserRequest updateUserRequest) throws ApiException { okhttp3.Call localVarCall = updateUserValidateBeforeCall(userId, updateUserRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3467,14 +3829,15 @@ public ApiResponse updateUserWithHttpInfo(String userId, UpdateUser * @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 single CurrentUser object. -
400 Error response when a user attempts to change a property without supplying their current password. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateUserAsync(String userId, UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateUserAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateUserValidateBeforeCall(userId, updateUserRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -3488,13 +3851,14 @@ public okhttp3.Call updateUserAsync(String userId, UpdateUserRequest updateUserR * @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 single UserNote object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateUserNoteCall(UpdateUserNoteRequest updateUserNoteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateUserNoteCall(@javax.annotation.Nonnull UpdateUserNoteRequest updateUserNoteRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3540,7 +3904,7 @@ public okhttp3.Call updateUserNoteCall(UpdateUserNoteRequest updateUserNoteReque } @SuppressWarnings("rawtypes") - private okhttp3.Call updateUserNoteValidateBeforeCall(UpdateUserNoteRequest updateUserNoteRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateUserNoteValidateBeforeCall(@javax.annotation.Nonnull UpdateUserNoteRequest updateUserNoteRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'updateUserNoteRequest' is set if (updateUserNoteRequest == null) { throw new ApiException("Missing the required parameter 'updateUserNoteRequest' when calling updateUserNote(Async)"); @@ -3557,13 +3921,14 @@ private okhttp3.Call updateUserNoteValidateBeforeCall(UpdateUserNoteRequest upda * @return UserNote * @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 single UserNote object. -
401 Error response due to missing auth cookie. -
*/ - public UserNote updateUserNote(UpdateUserNoteRequest updateUserNoteRequest) throws ApiException { + public UserNote updateUserNote(@javax.annotation.Nonnull UpdateUserNoteRequest updateUserNoteRequest) throws ApiException { ApiResponse localVarResp = updateUserNoteWithHttpInfo(updateUserNoteRequest); return localVarResp.getData(); } @@ -3575,13 +3940,14 @@ public UserNote updateUserNote(UpdateUserNoteRequest updateUserNoteRequest) thro * @return ApiResponse<UserNote> * @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 single UserNote object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse updateUserNoteWithHttpInfo(UpdateUserNoteRequest updateUserNoteRequest) throws ApiException { + public ApiResponse updateUserNoteWithHttpInfo(@javax.annotation.Nonnull UpdateUserNoteRequest updateUserNoteRequest) throws ApiException { okhttp3.Call localVarCall = updateUserNoteValidateBeforeCall(updateUserNoteRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -3595,13 +3961,14 @@ public ApiResponse updateUserNoteWithHttpInfo(UpdateUserNoteRequest up * @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 single UserNote object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call updateUserNoteAsync(UpdateUserNoteRequest updateUserNoteRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateUserNoteAsync(@javax.annotation.Nonnull UpdateUserNoteRequest updateUserNoteRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateUserNoteValidateBeforeCall(updateUserNoteRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/api/WorldsApi.java b/src/main/java/io/github/vrchatapi/api/WorldsApi.java index bdfa5df0..ad22833c 100644 --- a/src/main/java/io/github/vrchatapi/api/WorldsApi.java +++ b/src/main/java/io/github/vrchatapi/api/WorldsApi.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -45,7 +45,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class WorldsApi { private ApiClient localVarApiClient; @@ -92,14 +91,15 @@ public void setCustomBaseUrl(String customBaseUrl) { * @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 single World object. -
400 Error response when a world owner attempts to add an invalid, restricted, or duplicate tag to a world's profile, attempts to add tags above the limit for its profile, or attempts to remove invalid, restricted, or absent tag from its profile. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call addWorldTagsCall(String worldId, ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addWorldTagsCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -146,7 +146,7 @@ public okhttp3.Call addWorldTagsCall(String worldId, ChangeWorldTagsRequest chan } @SuppressWarnings("rawtypes") - private okhttp3.Call addWorldTagsValidateBeforeCall(String worldId, ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call addWorldTagsValidateBeforeCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling addWorldTags(Async)"); @@ -169,14 +169,15 @@ private okhttp3.Call addWorldTagsValidateBeforeCall(String worldId, ChangeWorldT * @return World * @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 single World object. -
400 Error response when a world owner attempts to add an invalid, restricted, or duplicate tag to a world's profile, attempts to add tags above the limit for its profile, or attempts to remove invalid, restricted, or absent tag from its profile. -
401 Error response due to missing auth cookie. -
*/ - public World addWorldTags(String worldId, ChangeWorldTagsRequest changeWorldTagsRequest) throws ApiException { + public World addWorldTags(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest) throws ApiException { ApiResponse localVarResp = addWorldTagsWithHttpInfo(worldId, changeWorldTagsRequest); return localVarResp.getData(); } @@ -189,14 +190,15 @@ public World addWorldTags(String worldId, ChangeWorldTagsRequest changeWorldTags * @return ApiResponse<World> * @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 single World object. -
400 Error response when a world owner attempts to add an invalid, restricted, or duplicate tag to a world's profile, attempts to add tags above the limit for its profile, or attempts to remove invalid, restricted, or absent tag from its profile. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse addWorldTagsWithHttpInfo(String worldId, ChangeWorldTagsRequest changeWorldTagsRequest) throws ApiException { + public ApiResponse addWorldTagsWithHttpInfo(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest) throws ApiException { okhttp3.Call localVarCall = addWorldTagsValidateBeforeCall(worldId, changeWorldTagsRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -211,14 +213,15 @@ public ApiResponse addWorldTagsWithHttpInfo(String worldId, ChangeWorldTa * @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 single World object. -
400 Error response when a world owner attempts to add an invalid, restricted, or duplicate tag to a world's profile, attempts to add tags above the limit for its profile, or attempts to remove invalid, restricted, or absent tag from its profile. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call addWorldTagsAsync(String worldId, ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addWorldTagsAsync(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addWorldTagsValidateBeforeCall(worldId, changeWorldTagsRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -233,14 +236,15 @@ public okhttp3.Call addWorldTagsAsync(String worldId, ChangeWorldTagsRequest cha * @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 The user has persistence data for the given world. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public okhttp3.Call checkUserPersistenceExistsCall(String userId, String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call checkUserPersistenceExistsCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -287,7 +291,7 @@ public okhttp3.Call checkUserPersistenceExistsCall(String userId, String worldId } @SuppressWarnings("rawtypes") - private okhttp3.Call checkUserPersistenceExistsValidateBeforeCall(String userId, String worldId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call checkUserPersistenceExistsValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, 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 checkUserPersistenceExists(Async)"); @@ -309,14 +313,15 @@ private okhttp3.Call checkUserPersistenceExistsValidateBeforeCall(String userId, * @param worldId Must be a valid world ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 The user has persistence data for the given world. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public void checkUserPersistenceExists(String userId, String worldId) throws ApiException { + public void checkUserPersistenceExists(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { checkUserPersistenceExistsWithHttpInfo(userId, worldId); } @@ -328,14 +333,15 @@ public void checkUserPersistenceExists(String userId, String worldId) throws Api * @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 The user has persistence data for the given world. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public ApiResponse checkUserPersistenceExistsWithHttpInfo(String userId, String worldId) throws ApiException { + public ApiResponse checkUserPersistenceExistsWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { okhttp3.Call localVarCall = checkUserPersistenceExistsValidateBeforeCall(userId, worldId, null); return localVarApiClient.execute(localVarCall); } @@ -349,14 +355,15 @@ public ApiResponse checkUserPersistenceExistsWithHttpInfo(String userId, S * @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 The user has persistence data for the given world. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public okhttp3.Call checkUserPersistenceExistsAsync(String userId, String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call checkUserPersistenceExistsAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = checkUserPersistenceExistsValidateBeforeCall(userId, worldId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -369,14 +376,15 @@ public okhttp3.Call checkUserPersistenceExistsAsync(String userId, String worldI * @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 single World object. -
400 Error response when trying create a world without having the neccesary Trust rank yet. -
400 Error response when trying create a world without having the necessary Trust rank yet. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createWorldCall(CreateWorldRequest createWorldRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createWorldCall(@javax.annotation.Nullable CreateWorldRequest createWorldRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -422,7 +430,7 @@ public okhttp3.Call createWorldCall(CreateWorldRequest createWorldRequest, final } @SuppressWarnings("rawtypes") - private okhttp3.Call createWorldValidateBeforeCall(CreateWorldRequest createWorldRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createWorldValidateBeforeCall(@javax.annotation.Nullable CreateWorldRequest createWorldRequest, final ApiCallback _callback) throws ApiException { return createWorldCall(createWorldRequest, _callback); } @@ -434,14 +442,15 @@ private okhttp3.Call createWorldValidateBeforeCall(CreateWorldRequest createWorl * @return World * @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 single World object. -
400 Error response when trying create a world without having the neccesary Trust rank yet. -
400 Error response when trying create a world without having the necessary Trust rank yet. -
401 Error response due to missing auth cookie. -
*/ - public World createWorld(CreateWorldRequest createWorldRequest) throws ApiException { + public World createWorld(@javax.annotation.Nullable CreateWorldRequest createWorldRequest) throws ApiException { ApiResponse localVarResp = createWorldWithHttpInfo(createWorldRequest); return localVarResp.getData(); } @@ -453,14 +462,15 @@ public World createWorld(CreateWorldRequest createWorldRequest) throws ApiExcept * @return ApiResponse<World> * @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 single World object. -
400 Error response when trying create a world without having the neccesary Trust rank yet. -
400 Error response when trying create a world without having the necessary Trust rank yet. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse createWorldWithHttpInfo(CreateWorldRequest createWorldRequest) throws ApiException { + public ApiResponse createWorldWithHttpInfo(@javax.annotation.Nullable CreateWorldRequest createWorldRequest) throws ApiException { okhttp3.Call localVarCall = createWorldValidateBeforeCall(createWorldRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -474,14 +484,15 @@ public ApiResponse createWorldWithHttpInfo(CreateWorldRequest createWorld * @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 single World object. -
400 Error response when trying create a world without having the neccesary Trust rank yet. -
400 Error response when trying create a world without having the necessary Trust rank yet. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call createWorldAsync(CreateWorldRequest createWorldRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createWorldAsync(@javax.annotation.Nullable CreateWorldRequest createWorldRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createWorldValidateBeforeCall(createWorldRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -495,13 +506,14 @@ public okhttp3.Call createWorldAsync(CreateWorldRequest createWorldRequest, fina * @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 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteAllUserPersistenceDataCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAllUserPersistenceDataCall(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -547,7 +559,7 @@ public okhttp3.Call deleteAllUserPersistenceDataCall(String userId, final ApiCal } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteAllUserPersistenceDataValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteAllUserPersistenceDataValidateBeforeCall(@javax.annotation.Nonnull 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 deleteAllUserPersistenceData(Async)"); @@ -563,13 +575,14 @@ private okhttp3.Call deleteAllUserPersistenceDataValidateBeforeCall(String userI * @param userId Must be a valid user ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
*/ - public void deleteAllUserPersistenceData(String userId) throws ApiException { + public void deleteAllUserPersistenceData(@javax.annotation.Nonnull String userId) throws ApiException { deleteAllUserPersistenceDataWithHttpInfo(userId); } @@ -580,13 +593,14 @@ public void deleteAllUserPersistenceData(String userId) throws ApiException { * @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 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse deleteAllUserPersistenceDataWithHttpInfo(String userId) throws ApiException { + public ApiResponse deleteAllUserPersistenceDataWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { okhttp3.Call localVarCall = deleteAllUserPersistenceDataValidateBeforeCall(userId, null); return localVarApiClient.execute(localVarCall); } @@ -599,13 +613,14 @@ public ApiResponse deleteAllUserPersistenceDataWithHttpInfo(String userId) * @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 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteAllUserPersistenceDataAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAllUserPersistenceDataAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteAllUserPersistenceDataValidateBeforeCall(userId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -619,14 +634,15 @@ public okhttp3.Call deleteAllUserPersistenceDataAsync(String userId, final ApiCa * @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 The user's persistence data for the given world is deleted. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public okhttp3.Call deleteUserPersistenceCall(String userId, String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteUserPersistenceCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -673,7 +689,7 @@ public okhttp3.Call deleteUserPersistenceCall(String userId, String worldId, fin } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserPersistenceValidateBeforeCall(String userId, String worldId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteUserPersistenceValidateBeforeCall(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, 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 deleteUserPersistence(Async)"); @@ -695,14 +711,15 @@ private okhttp3.Call deleteUserPersistenceValidateBeforeCall(String userId, Stri * @param worldId Must be a valid world ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 The user's persistence data for the given world is deleted. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public void deleteUserPersistence(String userId, String worldId) throws ApiException { + public void deleteUserPersistence(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { deleteUserPersistenceWithHttpInfo(userId, worldId); } @@ -714,14 +731,15 @@ public void deleteUserPersistence(String userId, String worldId) throws ApiExcep * @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 The user's persistence data for the given world is deleted. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public ApiResponse deleteUserPersistenceWithHttpInfo(String userId, String worldId) throws ApiException { + public ApiResponse deleteUserPersistenceWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { okhttp3.Call localVarCall = deleteUserPersistenceValidateBeforeCall(userId, worldId, null); return localVarApiClient.execute(localVarCall); } @@ -735,14 +753,15 @@ public ApiResponse deleteUserPersistenceWithHttpInfo(String userId, String * @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 The user's persistence data for the given world is deleted. -
401 Error response due to missing auth cookie. -
404 The user does not have persistence data for the given world. -
*/ - public okhttp3.Call deleteUserPersistenceAsync(String userId, String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteUserPersistenceAsync(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteUserPersistenceValidateBeforeCall(userId, worldId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -755,14 +774,15 @@ public okhttp3.Call deleteUserPersistenceAsync(String userId, String worldId, fi * @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. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call deleteWorldCall(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteWorldCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -808,7 +828,7 @@ public okhttp3.Call deleteWorldCall(String worldId, final ApiCallback _callback) } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteWorldValidateBeforeCall(String worldId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteWorldValidateBeforeCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling deleteWorld(Async)"); @@ -824,14 +844,15 @@ private okhttp3.Call deleteWorldValidateBeforeCall(String worldId, final ApiCall * @param worldId Must be a valid world ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public void deleteWorld(String worldId) throws ApiException { + public void deleteWorld(@javax.annotation.Nonnull String worldId) throws ApiException { deleteWorldWithHttpInfo(worldId); } @@ -842,14 +863,15 @@ public void deleteWorld(String worldId) throws ApiException { * @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 auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public ApiResponse deleteWorldWithHttpInfo(String worldId) throws ApiException { + public ApiResponse deleteWorldWithHttpInfo(@javax.annotation.Nonnull String worldId) throws ApiException { okhttp3.Call localVarCall = deleteWorldValidateBeforeCall(worldId, null); return localVarApiClient.execute(localVarCall); } @@ -862,14 +884,15 @@ public ApiResponse deleteWorldWithHttpInfo(String worldId) throws ApiExcep * @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. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call deleteWorldAsync(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteWorldAsync(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWorldValidateBeforeCall(worldId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -883,14 +906,15 @@ public okhttp3.Call deleteWorldAsync(String worldId, final ApiCallback _ca * @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. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call deleteWorldPlatformCall(String worldId, String publishedPlatform, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteWorldPlatformCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String publishedPlatform, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -937,7 +961,7 @@ public okhttp3.Call deleteWorldPlatformCall(String worldId, String publishedPlat } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteWorldPlatformValidateBeforeCall(String worldId, String publishedPlatform, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteWorldPlatformValidateBeforeCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String publishedPlatform, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling deleteWorldPlatform(Async)"); @@ -959,14 +983,15 @@ private okhttp3.Call deleteWorldPlatformValidateBeforeCall(String worldId, Strin * @param publishedPlatform A platform the world supports. (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 auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public void deleteWorldPlatform(String worldId, String publishedPlatform) throws ApiException { + public void deleteWorldPlatform(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String publishedPlatform) throws ApiException { deleteWorldPlatformWithHttpInfo(worldId, publishedPlatform); } @@ -978,14 +1003,15 @@ public void deleteWorldPlatform(String worldId, String publishedPlatform) throws * @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 auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public ApiResponse deleteWorldPlatformWithHttpInfo(String worldId, String publishedPlatform) throws ApiException { + public ApiResponse deleteWorldPlatformWithHttpInfo(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String publishedPlatform) throws ApiException { okhttp3.Call localVarCall = deleteWorldPlatformValidateBeforeCall(worldId, publishedPlatform, null); return localVarApiClient.execute(localVarCall); } @@ -999,14 +1025,15 @@ public ApiResponse deleteWorldPlatformWithHttpInfo(String worldId, String * @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. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call deleteWorldPlatformAsync(String worldId, String publishedPlatform, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteWorldPlatformAsync(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String publishedPlatform, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWorldPlatformValidateBeforeCall(worldId, publishedPlatform, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1031,13 +1058,14 @@ public okhttp3.Call deleteWorldPlatformAsync(String worldId, String publishedPla * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getActiveWorldsCall(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String noplatform, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getActiveWorldsCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String noplatform, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1134,7 +1162,7 @@ public okhttp3.Call getActiveWorldsCall(Boolean featured, SortOption sort, Integ } @SuppressWarnings("rawtypes") - private okhttp3.Call getActiveWorldsValidateBeforeCall(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String noplatform, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getActiveWorldsValidateBeforeCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String noplatform, final ApiCallback _callback) throws ApiException { return getActiveWorldsCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform, _callback); } @@ -1158,13 +1186,14 @@ private okhttp3.Call getActiveWorldsValidateBeforeCall(Boolean featured, SortOpt * @return List<LimitedWorld> * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
*/ - public List getActiveWorlds(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String noplatform) throws ApiException { + public List getActiveWorlds(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String noplatform) throws ApiException { ApiResponse> localVarResp = getActiveWorldsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform); return localVarResp.getData(); } @@ -1188,13 +1217,14 @@ public List getActiveWorlds(Boolean featured, SortOption sort, Int * @return ApiResponse<List<LimitedWorld>> * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getActiveWorldsWithHttpInfo(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String noplatform) throws ApiException { + public ApiResponse> getActiveWorldsWithHttpInfo(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String noplatform) throws ApiException { okhttp3.Call localVarCall = getActiveWorldsValidateBeforeCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1220,13 +1250,14 @@ public ApiResponse> getActiveWorldsWithHttpInfo(Boolean featu * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getActiveWorldsAsync(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String noplatform, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getActiveWorldsAsync(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String noplatform, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getActiveWorldsValidateBeforeCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1252,14 +1283,15 @@ public okhttp3.Call getActiveWorldsAsync(Boolean featured, SortOption sort, Inte * @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 list of FavoritedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favourited worlds of another user without sufficient admin permissions. -
403 Error response when trying to see favorited worlds of another user without sufficient admin permissions. -
*/ - public okhttp3.Call getFavoritedWorldsCall(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFavoritedWorldsCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1356,7 +1388,7 @@ public okhttp3.Call getFavoritedWorldsCall(Boolean featured, SortOption sort, In } @SuppressWarnings("rawtypes") - private okhttp3.Call getFavoritedWorldsValidateBeforeCall(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFavoritedWorldsValidateBeforeCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { return getFavoritedWorldsCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, _callback); } @@ -1380,14 +1412,15 @@ private okhttp3.Call getFavoritedWorldsValidateBeforeCall(Boolean featured, Sort * @return List<FavoritedWorld> * @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 list of FavoritedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favourited worlds of another user without sufficient admin permissions. -
403 Error response when trying to see favorited worlds of another user without sufficient admin permissions. -
*/ - public List getFavoritedWorlds(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId) throws ApiException { + public List getFavoritedWorlds(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId) throws ApiException { ApiResponse> localVarResp = getFavoritedWorldsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); return localVarResp.getData(); } @@ -1411,14 +1444,15 @@ public List getFavoritedWorlds(Boolean featured, SortOption sort * @return ApiResponse<List<FavoritedWorld>> * @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 list of FavoritedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favourited worlds of another user without sufficient admin permissions. -
403 Error response when trying to see favorited worlds of another user without sufficient admin permissions. -
*/ - public ApiResponse> getFavoritedWorldsWithHttpInfo(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId) throws ApiException { + public ApiResponse> getFavoritedWorldsWithHttpInfo(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId) throws ApiException { okhttp3.Call localVarCall = getFavoritedWorldsValidateBeforeCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1444,14 +1478,15 @@ public ApiResponse> getFavoritedWorldsWithHttpInfo(Boolean * @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 list of FavoritedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favourited worlds of another user without sufficient admin permissions. -
403 Error response when trying to see favorited worlds of another user without sufficient admin permissions. -
*/ - public okhttp3.Call getFavoritedWorldsAsync(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getFavoritedWorldsAsync(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getFavoritedWorldsValidateBeforeCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1477,14 +1512,15 @@ public okhttp3.Call getFavoritedWorldsAsync(Boolean featured, SortOption sort, I * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see recently visited worlds of another user without sufficient admin permissions. -
*/ - public okhttp3.Call getRecentWorldsCall(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRecentWorldsCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1581,7 +1617,7 @@ public okhttp3.Call getRecentWorldsCall(Boolean featured, SortOption sort, Integ } @SuppressWarnings("rawtypes") - private okhttp3.Call getRecentWorldsValidateBeforeCall(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getRecentWorldsValidateBeforeCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId, final ApiCallback _callback) throws ApiException { return getRecentWorldsCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, _callback); } @@ -1605,14 +1641,15 @@ private okhttp3.Call getRecentWorldsValidateBeforeCall(Boolean featured, SortOpt * @return List<LimitedWorld> * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see recently visited worlds of another user without sufficient admin permissions. -
*/ - public List getRecentWorlds(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId) throws ApiException { + public List getRecentWorlds(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId) throws ApiException { ApiResponse> localVarResp = getRecentWorldsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); return localVarResp.getData(); } @@ -1636,14 +1673,15 @@ public List getRecentWorlds(Boolean featured, SortOption sort, Int * @return ApiResponse<List<LimitedWorld>> * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see recently visited worlds of another user without sufficient admin permissions. -
*/ - public ApiResponse> getRecentWorldsWithHttpInfo(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId) throws ApiException { + public ApiResponse> getRecentWorldsWithHttpInfo(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId) throws ApiException { okhttp3.Call localVarCall = getRecentWorldsValidateBeforeCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1669,14 +1707,15 @@ public ApiResponse> getRecentWorldsWithHttpInfo(Boolean featu * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see recently visited worlds of another user without sufficient admin permissions. -
*/ - public okhttp3.Call getRecentWorldsAsync(Boolean featured, SortOption sort, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getRecentWorldsAsync(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String userId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getRecentWorldsValidateBeforeCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1690,13 +1729,14 @@ public okhttp3.Call getRecentWorldsAsync(Boolean featured, SortOption sort, Inte * @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 single World object. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call getWorldCall(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getWorldCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1742,7 +1782,7 @@ public okhttp3.Call getWorldCall(String worldId, final ApiCallback _callback) th } @SuppressWarnings("rawtypes") - private okhttp3.Call getWorldValidateBeforeCall(String worldId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getWorldValidateBeforeCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling getWorld(Async)"); @@ -1759,13 +1799,14 @@ private okhttp3.Call getWorldValidateBeforeCall(String worldId, final ApiCallbac * @return World * @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 single World object. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public World getWorld(String worldId) throws ApiException { + public World getWorld(@javax.annotation.Nonnull String worldId) throws ApiException { ApiResponse localVarResp = getWorldWithHttpInfo(worldId); return localVarResp.getData(); } @@ -1777,13 +1818,14 @@ public World getWorld(String worldId) throws ApiException { * @return ApiResponse<World> * @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 single World object. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public ApiResponse getWorldWithHttpInfo(String worldId) throws ApiException { + public ApiResponse getWorldWithHttpInfo(@javax.annotation.Nonnull String worldId) throws ApiException { okhttp3.Call localVarCall = getWorldValidateBeforeCall(worldId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1797,13 +1839,14 @@ public ApiResponse getWorldWithHttpInfo(String worldId) throws ApiExcepti * @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 single World object. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call getWorldAsync(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getWorldAsync(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWorldValidateBeforeCall(worldId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1818,13 +1861,14 @@ public okhttp3.Call getWorldAsync(String worldId, final ApiCallback _call * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getWorldInstanceCall(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getWorldInstanceCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1871,7 +1915,7 @@ public okhttp3.Call getWorldInstanceCall(String worldId, String instanceId, fina } @SuppressWarnings("rawtypes") - private okhttp3.Call getWorldInstanceValidateBeforeCall(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getWorldInstanceValidateBeforeCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling getWorldInstance(Async)"); @@ -1894,13 +1938,14 @@ private okhttp3.Call getWorldInstanceValidateBeforeCall(String worldId, String i * @return Instance * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public Instance getWorldInstance(String worldId, String instanceId) throws ApiException { + public Instance getWorldInstance(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId) throws ApiException { ApiResponse localVarResp = getWorldInstanceWithHttpInfo(worldId, instanceId); return localVarResp.getData(); } @@ -1913,13 +1958,14 @@ public Instance getWorldInstance(String worldId, String instanceId) throws ApiEx * @return ApiResponse<Instance> * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getWorldInstanceWithHttpInfo(String worldId, String instanceId) throws ApiException { + public ApiResponse getWorldInstanceWithHttpInfo(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId) throws ApiException { okhttp3.Call localVarCall = getWorldInstanceValidateBeforeCall(worldId, instanceId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1934,13 +1980,14 @@ public ApiResponse getWorldInstanceWithHttpInfo(String worldId, String * @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 single Instance object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getWorldInstanceAsync(String worldId, String instanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getWorldInstanceAsync(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWorldInstanceValidateBeforeCall(worldId, instanceId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1954,7 +2001,8 @@ public okhttp3.Call getWorldInstanceAsync(String worldId, String instanceId, fin * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ @@ -1962,7 +2010,7 @@ public okhttp3.Call getWorldInstanceAsync(String worldId, String instanceId, fin * @deprecated */ @Deprecated - public okhttp3.Call getWorldMetadataCall(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getWorldMetadataCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2009,7 +2057,7 @@ public okhttp3.Call getWorldMetadataCall(String worldId, final ApiCallback _call @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getWorldMetadataValidateBeforeCall(String worldId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getWorldMetadataValidateBeforeCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling getWorldMetadata(Async)"); @@ -2026,7 +2074,8 @@ private okhttp3.Call getWorldMetadataValidateBeforeCall(String worldId, final Ap * @return WorldMetadata * @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 -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
+
+ @@ -2034,7 +2083,7 @@ private okhttp3.Call getWorldMetadataValidateBeforeCall(String worldId, final Ap * @deprecated */ @Deprecated - public WorldMetadata getWorldMetadata(String worldId) throws ApiException { + public WorldMetadata getWorldMetadata(@javax.annotation.Nonnull String worldId) throws ApiException { ApiResponse localVarResp = getWorldMetadataWithHttpInfo(worldId); return localVarResp.getData(); } @@ -2046,7 +2095,8 @@ public WorldMetadata getWorldMetadata(String worldId) throws ApiException { * @return ApiResponse<WorldMetadata> * @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 -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
+
+ @@ -2054,7 +2104,7 @@ public WorldMetadata getWorldMetadata(String worldId) throws ApiException { * @deprecated */ @Deprecated - public ApiResponse getWorldMetadataWithHttpInfo(String worldId) throws ApiException { + public ApiResponse getWorldMetadataWithHttpInfo(@javax.annotation.Nonnull String worldId) throws ApiException { okhttp3.Call localVarCall = getWorldMetadataValidateBeforeCall(worldId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2068,7 +2118,8 @@ public ApiResponse getWorldMetadataWithHttpInfo(String worldId) t * @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 -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
+
+ @@ -2076,7 +2127,7 @@ public ApiResponse getWorldMetadataWithHttpInfo(String worldId) t * @deprecated */ @Deprecated - public okhttp3.Call getWorldMetadataAsync(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getWorldMetadataAsync(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWorldMetadataValidateBeforeCall(worldId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2090,14 +2141,15 @@ public okhttp3.Call getWorldMetadataAsync(String worldId, final ApiCallback +
Response Details
Status Code Description Response Headers
200 OK -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
+
Response Details
Status Code Description Response Headers
200 Returns a single WorldPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call getWorldPublishStatusCall(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getWorldPublishStatusCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2143,7 +2195,7 @@ public okhttp3.Call getWorldPublishStatusCall(String worldId, final ApiCallback } @SuppressWarnings("rawtypes") - private okhttp3.Call getWorldPublishStatusValidateBeforeCall(String worldId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getWorldPublishStatusValidateBeforeCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling getWorldPublishStatus(Async)"); @@ -2160,14 +2212,15 @@ private okhttp3.Call getWorldPublishStatusValidateBeforeCall(String worldId, fin * @return WorldPublishStatus * @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 single WorldPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public WorldPublishStatus getWorldPublishStatus(String worldId) throws ApiException { + public WorldPublishStatus getWorldPublishStatus(@javax.annotation.Nonnull String worldId) throws ApiException { ApiResponse localVarResp = getWorldPublishStatusWithHttpInfo(worldId); return localVarResp.getData(); } @@ -2179,14 +2232,15 @@ public WorldPublishStatus getWorldPublishStatus(String worldId) throws ApiExcept * @return ApiResponse<WorldPublishStatus> * @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 single WorldPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public ApiResponse getWorldPublishStatusWithHttpInfo(String worldId) throws ApiException { + public ApiResponse getWorldPublishStatusWithHttpInfo(@javax.annotation.Nonnull String worldId) throws ApiException { okhttp3.Call localVarCall = getWorldPublishStatusValidateBeforeCall(worldId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2200,14 +2254,15 @@ public ApiResponse getWorldPublishStatusWithHttpInfo(String * @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 single WorldPublishStatus object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call getWorldPublishStatusAsync(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getWorldPublishStatusAsync(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWorldPublishStatusValidateBeforeCall(worldId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2221,14 +2276,15 @@ public okhttp3.Call getWorldPublishStatusAsync(String worldId, final ApiCallback * @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 TODO -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call publishWorldCall(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call publishWorldCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2274,7 +2330,7 @@ public okhttp3.Call publishWorldCall(String worldId, final ApiCallback _callback } @SuppressWarnings("rawtypes") - private okhttp3.Call publishWorldValidateBeforeCall(String worldId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call publishWorldValidateBeforeCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling publishWorld(Async)"); @@ -2290,14 +2346,15 @@ private okhttp3.Call publishWorldValidateBeforeCall(String worldId, final ApiCal * @param worldId Must be a valid world ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 TODO -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public void publishWorld(String worldId) throws ApiException { + public void publishWorld(@javax.annotation.Nonnull String worldId) throws ApiException { publishWorldWithHttpInfo(worldId); } @@ -2308,14 +2365,15 @@ public void publishWorld(String worldId) throws ApiException { * @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 TODO -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public ApiResponse publishWorldWithHttpInfo(String worldId) throws ApiException { + public ApiResponse publishWorldWithHttpInfo(@javax.annotation.Nonnull String worldId) throws ApiException { okhttp3.Call localVarCall = publishWorldValidateBeforeCall(worldId, null); return localVarApiClient.execute(localVarCall); } @@ -2328,14 +2386,15 @@ public ApiResponse publishWorldWithHttpInfo(String worldId) throws ApiExce * @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 TODO -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call publishWorldAsync(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call publishWorldAsync(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = publishWorldValidateBeforeCall(worldId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -2349,14 +2408,15 @@ public okhttp3.Call publishWorldAsync(String worldId, final ApiCallback _c * @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 single World object. -
400 Error response when a world owner attempts to add an invalid, restricted, or duplicate tag to a world's profile, attempts to add tags above the limit for its profile, or attempts to remove invalid, restricted, or absent tag from its profile. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call removeWorldTagsCall(String worldId, ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call removeWorldTagsCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2403,7 +2463,7 @@ public okhttp3.Call removeWorldTagsCall(String worldId, ChangeWorldTagsRequest c } @SuppressWarnings("rawtypes") - private okhttp3.Call removeWorldTagsValidateBeforeCall(String worldId, ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call removeWorldTagsValidateBeforeCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling removeWorldTags(Async)"); @@ -2426,14 +2486,15 @@ private okhttp3.Call removeWorldTagsValidateBeforeCall(String worldId, ChangeWor * @return World * @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 single World object. -
400 Error response when a world owner attempts to add an invalid, restricted, or duplicate tag to a world's profile, attempts to add tags above the limit for its profile, or attempts to remove invalid, restricted, or absent tag from its profile. -
401 Error response due to missing auth cookie. -
*/ - public World removeWorldTags(String worldId, ChangeWorldTagsRequest changeWorldTagsRequest) throws ApiException { + public World removeWorldTags(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest) throws ApiException { ApiResponse localVarResp = removeWorldTagsWithHttpInfo(worldId, changeWorldTagsRequest); return localVarResp.getData(); } @@ -2446,14 +2507,15 @@ public World removeWorldTags(String worldId, ChangeWorldTagsRequest changeWorldT * @return ApiResponse<World> * @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 single World object. -
400 Error response when a world owner attempts to add an invalid, restricted, or duplicate tag to a world's profile, attempts to add tags above the limit for its profile, or attempts to remove invalid, restricted, or absent tag from its profile. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse removeWorldTagsWithHttpInfo(String worldId, ChangeWorldTagsRequest changeWorldTagsRequest) throws ApiException { + public ApiResponse removeWorldTagsWithHttpInfo(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest) throws ApiException { okhttp3.Call localVarCall = removeWorldTagsValidateBeforeCall(worldId, changeWorldTagsRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2468,14 +2530,15 @@ public ApiResponse removeWorldTagsWithHttpInfo(String worldId, ChangeWorl * @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 single World object. -
400 Error response when a world owner attempts to add an invalid, restricted, or duplicate tag to a world's profile, attempts to add tags above the limit for its profile, or attempts to remove invalid, restricted, or absent tag from its profile. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call removeWorldTagsAsync(String worldId, ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call removeWorldTagsAsync(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeWorldTagsValidateBeforeCall(worldId, changeWorldTagsRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -2505,13 +2568,14 @@ public okhttp3.Call removeWorldTagsAsync(String worldId, ChangeWorldTagsRequest * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchWorldsCall(Boolean featured, SortOption sort, String user, String userId, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String noplatform, Boolean fuzzy, Boolean avatarSpecific, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchWorldsCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable String user, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String noplatform, @javax.annotation.Nullable Boolean fuzzy, @javax.annotation.Nullable Boolean avatarSpecific, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2624,7 +2688,7 @@ public okhttp3.Call searchWorldsCall(Boolean featured, SortOption sort, String u } @SuppressWarnings("rawtypes") - private okhttp3.Call searchWorldsValidateBeforeCall(Boolean featured, SortOption sort, String user, String userId, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String noplatform, Boolean fuzzy, Boolean avatarSpecific, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchWorldsValidateBeforeCall(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable String user, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String noplatform, @javax.annotation.Nullable Boolean fuzzy, @javax.annotation.Nullable Boolean avatarSpecific, final ApiCallback _callback) throws ApiException { return searchWorldsCall(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform, fuzzy, avatarSpecific, _callback); } @@ -2652,13 +2716,14 @@ private okhttp3.Call searchWorldsValidateBeforeCall(Boolean featured, SortOption * @return List<LimitedWorld> * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
*/ - public List searchWorlds(Boolean featured, SortOption sort, String user, String userId, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String noplatform, Boolean fuzzy, Boolean avatarSpecific) throws ApiException { + public List searchWorlds(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable String user, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String noplatform, @javax.annotation.Nullable Boolean fuzzy, @javax.annotation.Nullable Boolean avatarSpecific) throws ApiException { ApiResponse> localVarResp = searchWorldsWithHttpInfo(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform, fuzzy, avatarSpecific); return localVarResp.getData(); } @@ -2686,13 +2751,14 @@ public List searchWorlds(Boolean featured, SortOption sort, String * @return ApiResponse<List<LimitedWorld>> * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> searchWorldsWithHttpInfo(Boolean featured, SortOption sort, String user, String userId, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String noplatform, Boolean fuzzy, Boolean avatarSpecific) throws ApiException { + public ApiResponse> searchWorldsWithHttpInfo(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable String user, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String noplatform, @javax.annotation.Nullable Boolean fuzzy, @javax.annotation.Nullable Boolean avatarSpecific) throws ApiException { okhttp3.Call localVarCall = searchWorldsValidateBeforeCall(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform, fuzzy, avatarSpecific, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2722,13 +2788,14 @@ public ApiResponse> searchWorldsWithHttpInfo(Boolean featured * @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 list of LimitedWorld objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchWorldsAsync(Boolean featured, SortOption sort, String user, String userId, Integer n, OrderOption order, Integer offset, String search, String tag, String notag, ReleaseStatus releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String noplatform, Boolean fuzzy, Boolean avatarSpecific, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call searchWorldsAsync(@javax.annotation.Nullable Boolean featured, @javax.annotation.Nullable SortOption sort, @javax.annotation.Nullable String user, @javax.annotation.Nullable String userId, @javax.annotation.Nullable Integer n, @javax.annotation.Nullable OrderOption order, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable String search, @javax.annotation.Nullable String tag, @javax.annotation.Nullable String notag, @javax.annotation.Nullable ReleaseStatus releaseStatus, @javax.annotation.Nullable String maxUnityVersion, @javax.annotation.Nullable String minUnityVersion, @javax.annotation.Nullable String platform, @javax.annotation.Nullable String noplatform, @javax.annotation.Nullable Boolean fuzzy, @javax.annotation.Nullable Boolean avatarSpecific, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = searchWorldsValidateBeforeCall(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform, fuzzy, avatarSpecific, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -2742,14 +2809,15 @@ public okhttp3.Call searchWorldsAsync(Boolean featured, SortOption sort, String * @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. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call unpublishWorldCall(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unpublishWorldCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2795,7 +2863,7 @@ public okhttp3.Call unpublishWorldCall(String worldId, final ApiCallback _callba } @SuppressWarnings("rawtypes") - private okhttp3.Call unpublishWorldValidateBeforeCall(String worldId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call unpublishWorldValidateBeforeCall(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling unpublishWorld(Async)"); @@ -2811,14 +2879,15 @@ private okhttp3.Call unpublishWorldValidateBeforeCall(String worldId, final ApiC * @param worldId Must be a valid world ID. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public void unpublishWorld(String worldId) throws ApiException { + public void unpublishWorld(@javax.annotation.Nonnull String worldId) throws ApiException { unpublishWorldWithHttpInfo(worldId); } @@ -2829,14 +2898,15 @@ public void unpublishWorld(String worldId) throws ApiException { * @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 auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public ApiResponse unpublishWorldWithHttpInfo(String worldId) throws ApiException { + public ApiResponse unpublishWorldWithHttpInfo(@javax.annotation.Nonnull String worldId) throws ApiException { okhttp3.Call localVarCall = unpublishWorldValidateBeforeCall(worldId, null); return localVarApiClient.execute(localVarCall); } @@ -2849,14 +2919,15 @@ public ApiResponse unpublishWorldWithHttpInfo(String worldId) throws ApiEx * @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. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call unpublishWorldAsync(String worldId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unpublishWorldAsync(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = unpublishWorldValidateBeforeCall(worldId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -2870,14 +2941,15 @@ public okhttp3.Call unpublishWorldAsync(String worldId, final ApiCallback * @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 single World object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call updateWorldCall(String worldId, UpdateWorldRequest updateWorldRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateWorldCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nullable UpdateWorldRequest updateWorldRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2924,7 +2996,7 @@ public okhttp3.Call updateWorldCall(String worldId, UpdateWorldRequest updateWor } @SuppressWarnings("rawtypes") - private okhttp3.Call updateWorldValidateBeforeCall(String worldId, UpdateWorldRequest updateWorldRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateWorldValidateBeforeCall(@javax.annotation.Nonnull String worldId, @javax.annotation.Nullable UpdateWorldRequest updateWorldRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'worldId' is set if (worldId == null) { throw new ApiException("Missing the required parameter 'worldId' when calling updateWorld(Async)"); @@ -2942,14 +3014,15 @@ private okhttp3.Call updateWorldValidateBeforeCall(String worldId, UpdateWorldRe * @return World * @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 single World object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public World updateWorld(String worldId, UpdateWorldRequest updateWorldRequest) throws ApiException { + public World updateWorld(@javax.annotation.Nonnull String worldId, @javax.annotation.Nullable UpdateWorldRequest updateWorldRequest) throws ApiException { ApiResponse localVarResp = updateWorldWithHttpInfo(worldId, updateWorldRequest); return localVarResp.getData(); } @@ -2962,14 +3035,15 @@ public World updateWorld(String worldId, UpdateWorldRequest updateWorldRequest) * @return ApiResponse<World> * @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 single World object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public ApiResponse updateWorldWithHttpInfo(String worldId, UpdateWorldRequest updateWorldRequest) throws ApiException { + public ApiResponse updateWorldWithHttpInfo(@javax.annotation.Nonnull String worldId, @javax.annotation.Nullable UpdateWorldRequest updateWorldRequest) throws ApiException { okhttp3.Call localVarCall = updateWorldValidateBeforeCall(worldId, updateWorldRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2984,14 +3058,15 @@ public ApiResponse updateWorldWithHttpInfo(String worldId, UpdateWorldReq * @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 single World object. -
401 Error response due to missing auth cookie. -
404 Error response when trying to show information about a non-existent world. Sometimes returns with `model <worldId> not found` instead of `World <worldId not found`. -
*/ - public okhttp3.Call updateWorldAsync(String worldId, UpdateWorldRequest updateWorldRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateWorldAsync(@javax.annotation.Nonnull String worldId, @javax.annotation.Nullable UpdateWorldRequest updateWorldRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateWorldValidateBeforeCall(worldId, updateWorldRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/io/github/vrchatapi/auth/ApiKeyAuth.java b/src/main/java/io/github/vrchatapi/auth/ApiKeyAuth.java index ec0c3286..020c66e3 100644 --- a/src/main/java/io/github/vrchatapi/auth/ApiKeyAuth.java +++ b/src/main/java/io/github/vrchatapi/auth/ApiKeyAuth.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -19,7 +19,7 @@ import java.util.Map; import java.util.List; -@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 ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/io/github/vrchatapi/auth/Authentication.java b/src/main/java/io/github/vrchatapi/auth/Authentication.java index 4543a1ae..7fcd773f 100644 --- a/src/main/java/io/github/vrchatapi/auth/Authentication.java +++ b/src/main/java/io/github/vrchatapi/auth/Authentication.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -19,6 +19,7 @@ import java.util.Map; import java.util.List; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") public interface Authentication { /** * Apply authentication settings to header and query params. diff --git a/src/main/java/io/github/vrchatapi/auth/HttpBasicAuth.java b/src/main/java/io/github/vrchatapi/auth/HttpBasicAuth.java index 34ae26f3..a4d45a75 100644 --- a/src/main/java/io/github/vrchatapi/auth/HttpBasicAuth.java +++ b/src/main/java/io/github/vrchatapi/auth/HttpBasicAuth.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,8 +21,6 @@ import java.util.Map; import java.util.List; -import java.io.UnsupportedEncodingException; - public class HttpBasicAuth implements Authentication { private String username; private String password; diff --git a/src/main/java/io/github/vrchatapi/auth/HttpBearerAuth.java b/src/main/java/io/github/vrchatapi/auth/HttpBearerAuth.java index a06ca2b5..4fb218d7 100644 --- a/src/main/java/io/github/vrchatapi/auth/HttpBearerAuth.java +++ b/src/main/java/io/github/vrchatapi/auth/HttpBearerAuth.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,13 +16,15 @@ import io.github.vrchatapi.Pair; import java.net.URI; -import java.util.Map; import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Supplier; -@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 HttpBearerAuth implements Authentication { private final String scheme; - private String bearerToken; + private Supplier tokenSupplier; public HttpBearerAuth(String scheme) { this.scheme = scheme; @@ -34,7 +36,7 @@ public HttpBearerAuth(String scheme) { * @return The bearer token */ public String getBearerToken() { - return bearerToken; + return tokenSupplier.get(); } /** @@ -43,12 +45,22 @@ public String getBearerToken() { * @param bearerToken The bearer token to send in the Authorization header */ public void setBearerToken(String bearerToken) { - this.bearerToken = bearerToken; + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; } @Override public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); if (bearerToken == null) { return; } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfig.java b/src/main/java/io/github/vrchatapi/model/APIConfig.java index 191c8c50..a60f4106 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfig.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfig.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -32,11 +31,10 @@ import io.github.vrchatapi.model.DynamicContentRow; import io.github.vrchatapi.model.ReportCategory; import io.github.vrchatapi.model.ReportReason; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.LinkedHashSet; import java.util.List; @@ -53,13 +51,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -67,1546 +67,1506 @@ /** * Global configuration for various features. */ -@ApiModel(description = "Global configuration for various features.") -@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 APIConfig { public static final String SERIALIZED_NAME_CAMPAIGN_STATUS = "CampaignStatus"; @SerializedName(SERIALIZED_NAME_CAMPAIGN_STATUS) + @javax.annotation.Nonnull private String campaignStatus; public static final String SERIALIZED_NAME_DISABLE_BACKGROUND_PRELOADS = "DisableBackgroundPreloads"; @SerializedName(SERIALIZED_NAME_DISABLE_BACKGROUND_PRELOADS) + @javax.annotation.Nonnull private Boolean disableBackgroundPreloads = true; public static final String SERIALIZED_NAME_LOCATION_GIFTING_NON_SUB_PRIO_ENABLED = "LocationGiftingNonSubPrioEnabled"; @SerializedName(SERIALIZED_NAME_LOCATION_GIFTING_NON_SUB_PRIO_ENABLED) + @javax.annotation.Nonnull private Boolean locationGiftingNonSubPrioEnabled = true; public static final String SERIALIZED_NAME_VOICE_ENABLE_DEGRADATION = "VoiceEnableDegradation"; @SerializedName(SERIALIZED_NAME_VOICE_ENABLE_DEGRADATION) + @javax.annotation.Nonnull private Boolean voiceEnableDegradation = false; public static final String SERIALIZED_NAME_VOICE_ENABLE_RECEIVER_LIMITING = "VoiceEnableReceiverLimiting"; @SerializedName(SERIALIZED_NAME_VOICE_ENABLE_RECEIVER_LIMITING) + @javax.annotation.Nonnull private Boolean voiceEnableReceiverLimiting = true; public static final String SERIALIZED_NAME_ACCESS_LOGS_URLS = "accessLogsUrls"; @SerializedName(SERIALIZED_NAME_ACCESS_LOGS_URLS) + @javax.annotation.Nonnull private APIConfigAccessLogsUrls accessLogsUrls; public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) + @javax.annotation.Nonnull private String address; public static final String SERIALIZED_NAME_AGE_VERIFICATION_INVITE_VISIBLE = "ageVerificationInviteVisible"; @SerializedName(SERIALIZED_NAME_AGE_VERIFICATION_INVITE_VISIBLE) + @javax.annotation.Nonnull private Boolean ageVerificationInviteVisible; public static final String SERIALIZED_NAME_AGE_VERIFICATION_P = "ageVerificationP"; @SerializedName(SERIALIZED_NAME_AGE_VERIFICATION_P) + @javax.annotation.Nonnull private Boolean ageVerificationP; public static final String SERIALIZED_NAME_AGE_VERIFICATION_STATUS_VISIBLE = "ageVerificationStatusVisible"; @SerializedName(SERIALIZED_NAME_AGE_VERIFICATION_STATUS_VISIBLE) + @javax.annotation.Nonnull private Boolean ageVerificationStatusVisible; public static final String SERIALIZED_NAME_ANALYSIS_MAX_RETRIES = "analysisMaxRetries"; @SerializedName(SERIALIZED_NAME_ANALYSIS_MAX_RETRIES) + @javax.annotation.Nonnull private Integer analysisMaxRetries; public static final String SERIALIZED_NAME_ANALYSIS_RETRY_INTERVAL = "analysisRetryInterval"; @SerializedName(SERIALIZED_NAME_ANALYSIS_RETRY_INTERVAL) + @javax.annotation.Nonnull private Integer analysisRetryInterval; public static final String SERIALIZED_NAME_ANALYTICS_SEGMENT_NEW_U_I_PCT_OF_USERS = "analyticsSegment_NewUI_PctOfUsers"; @SerializedName(SERIALIZED_NAME_ANALYTICS_SEGMENT_NEW_U_I_PCT_OF_USERS) + @javax.annotation.Nonnull private Integer analyticsSegmentNewUIPctOfUsers; public static final String SERIALIZED_NAME_ANALYTICS_SEGMENT_NEW_U_I_SALT = "analyticsSegment_NewUI_Salt"; @SerializedName(SERIALIZED_NAME_ANALYTICS_SEGMENT_NEW_U_I_SALT) + @javax.annotation.Nonnull private String analyticsSegmentNewUISalt; public static final String SERIALIZED_NAME_ANNOUNCEMENTS = "announcements"; @SerializedName(SERIALIZED_NAME_ANNOUNCEMENTS) + @javax.annotation.Nonnull private Set announcements = new LinkedHashSet<>(); public static final String SERIALIZED_NAME_AUDIO_CONFIG = "audioConfig"; @SerializedName(SERIALIZED_NAME_AUDIO_CONFIG) + @javax.annotation.Nullable private APIConfigAudioConfig audioConfig; public static final String SERIALIZED_NAME_AVAILABLE_LANGUAGE_CODES = "availableLanguageCodes"; @SerializedName(SERIALIZED_NAME_AVAILABLE_LANGUAGE_CODES) + @javax.annotation.Nonnull private List availableLanguageCodes = new ArrayList<>(); public static final String SERIALIZED_NAME_AVAILABLE_LANGUAGES = "availableLanguages"; @SerializedName(SERIALIZED_NAME_AVAILABLE_LANGUAGES) + @javax.annotation.Nonnull private List availableLanguages = new ArrayList<>(); public static final String SERIALIZED_NAME_AVATAR_PERF_LIMITER = "avatarPerfLimiter"; @SerializedName(SERIALIZED_NAME_AVATAR_PERF_LIMITER) + @javax.annotation.Nonnull private APIConfigAvatarPerfLimiter avatarPerfLimiter; public static final String SERIALIZED_NAME_CHATBOX_LOG_BUFFER_SECONDS = "chatboxLogBufferSeconds"; @SerializedName(SERIALIZED_NAME_CHATBOX_LOG_BUFFER_SECONDS) + @javax.annotation.Nonnull private Integer chatboxLogBufferSeconds = 40; public static final String SERIALIZED_NAME_CLIENT_API_KEY = "clientApiKey"; @SerializedName(SERIALIZED_NAME_CLIENT_API_KEY) + @javax.annotation.Nonnull private String clientApiKey; public static final String SERIALIZED_NAME_CLIENT_B_P_S_CEILING = "clientBPSCeiling"; @SerializedName(SERIALIZED_NAME_CLIENT_B_P_S_CEILING) + @javax.annotation.Nonnull private Integer clientBPSCeiling = 18432; public static final String SERIALIZED_NAME_CLIENT_DISCONNECT_TIMEOUT = "clientDisconnectTimeout"; @SerializedName(SERIALIZED_NAME_CLIENT_DISCONNECT_TIMEOUT) + @javax.annotation.Nonnull private Integer clientDisconnectTimeout = 30000; public static final String SERIALIZED_NAME_CLIENT_NET_DISPATCH_THREAD = "clientNetDispatchThread"; @SerializedName(SERIALIZED_NAME_CLIENT_NET_DISPATCH_THREAD) + @javax.annotation.Nullable private Boolean clientNetDispatchThread = false; public static final String SERIALIZED_NAME_CLIENT_NET_DISPATCH_THREAD_MOBILE = "clientNetDispatchThreadMobile"; @SerializedName(SERIALIZED_NAME_CLIENT_NET_DISPATCH_THREAD_MOBILE) + @javax.annotation.Nonnull private Boolean clientNetDispatchThreadMobile = true; public static final String SERIALIZED_NAME_CLIENT_NET_IN_THREAD = "clientNetInThread"; @SerializedName(SERIALIZED_NAME_CLIENT_NET_IN_THREAD) + @javax.annotation.Nullable private Boolean clientNetInThread = false; public static final String SERIALIZED_NAME_CLIENT_NET_IN_THREAD2 = "clientNetInThread2"; @SerializedName(SERIALIZED_NAME_CLIENT_NET_IN_THREAD2) + @javax.annotation.Nullable private Boolean clientNetInThread2 = false; public static final String SERIALIZED_NAME_CLIENT_NET_IN_THREAD_MOBILE = "clientNetInThreadMobile"; @SerializedName(SERIALIZED_NAME_CLIENT_NET_IN_THREAD_MOBILE) + @javax.annotation.Nullable private Boolean clientNetInThreadMobile = false; public static final String SERIALIZED_NAME_CLIENT_NET_IN_THREAD_MOBILE2 = "clientNetInThreadMobile2"; @SerializedName(SERIALIZED_NAME_CLIENT_NET_IN_THREAD_MOBILE2) + @javax.annotation.Nullable private Boolean clientNetInThreadMobile2 = false; public static final String SERIALIZED_NAME_CLIENT_NET_OUT_THREAD = "clientNetOutThread"; @SerializedName(SERIALIZED_NAME_CLIENT_NET_OUT_THREAD) + @javax.annotation.Nullable private Boolean clientNetOutThread = false; public static final String SERIALIZED_NAME_CLIENT_NET_OUT_THREAD2 = "clientNetOutThread2"; @SerializedName(SERIALIZED_NAME_CLIENT_NET_OUT_THREAD2) + @javax.annotation.Nullable private Boolean clientNetOutThread2 = false; public static final String SERIALIZED_NAME_CLIENT_NET_OUT_THREAD_MOBILE = "clientNetOutThreadMobile"; @SerializedName(SERIALIZED_NAME_CLIENT_NET_OUT_THREAD_MOBILE) + @javax.annotation.Nullable private Boolean clientNetOutThreadMobile = false; public static final String SERIALIZED_NAME_CLIENT_NET_OUT_THREAD_MOBILE2 = "clientNetOutThreadMobile2"; @SerializedName(SERIALIZED_NAME_CLIENT_NET_OUT_THREAD_MOBILE2) + @javax.annotation.Nullable private Boolean clientNetOutThreadMobile2 = false; public static final String SERIALIZED_NAME_CLIENT_Q_R = "clientQR"; @SerializedName(SERIALIZED_NAME_CLIENT_Q_R) + @javax.annotation.Nullable private Integer clientQR = 1; public static final String SERIALIZED_NAME_CLIENT_RESERVED_PLAYER_B_P_S = "clientReservedPlayerBPS"; @SerializedName(SERIALIZED_NAME_CLIENT_RESERVED_PLAYER_B_P_S) + @javax.annotation.Nonnull private Integer clientReservedPlayerBPS = 7168; public static final String SERIALIZED_NAME_CLIENT_SENT_COUNT_ALLOWANCE = "clientSentCountAllowance"; @SerializedName(SERIALIZED_NAME_CLIENT_SENT_COUNT_ALLOWANCE) + @javax.annotation.Nonnull private Integer clientSentCountAllowance = 15; public static final String SERIALIZED_NAME_CONSTANTS = "constants"; @SerializedName(SERIALIZED_NAME_CONSTANTS) + @javax.annotation.Nonnull private APIConfigConstants constants; public static final String SERIALIZED_NAME_CONTACT_EMAIL = "contactEmail"; @SerializedName(SERIALIZED_NAME_CONTACT_EMAIL) + @javax.annotation.Nonnull private String contactEmail; public static final String SERIALIZED_NAME_COPYRIGHT_EMAIL = "copyrightEmail"; @SerializedName(SERIALIZED_NAME_COPYRIGHT_EMAIL) + @javax.annotation.Nonnull private String copyrightEmail; public static final String SERIALIZED_NAME_COPYRIGHT_FORM_URL = "copyrightFormUrl"; @SerializedName(SERIALIZED_NAME_COPYRIGHT_FORM_URL) + @javax.annotation.Nonnull private String copyrightFormUrl; public static final String SERIALIZED_NAME_CURRENT_PRIVACY_VERSION = "currentPrivacyVersion"; @SerializedName(SERIALIZED_NAME_CURRENT_PRIVACY_VERSION) + @javax.annotation.Nonnull private Integer currentPrivacyVersion = 1; public static final String SERIALIZED_NAME_CURRENT_T_O_S_VERSION = "currentTOSVersion"; @SerializedName(SERIALIZED_NAME_CURRENT_T_O_S_VERSION) + @javax.annotation.Nonnull private Integer currentTOSVersion; public static final String SERIALIZED_NAME_DEFAULT_AVATAR = "defaultAvatar"; @SerializedName(SERIALIZED_NAME_DEFAULT_AVATAR) + @javax.annotation.Nonnull private String defaultAvatar; public static final String SERIALIZED_NAME_DEFAULT_STICKER_SET = "defaultStickerSet"; @SerializedName(SERIALIZED_NAME_DEFAULT_STICKER_SET) + @javax.annotation.Nonnull private String defaultStickerSet; public static final String SERIALIZED_NAME_DEV_LANGUAGE_CODES = "devLanguageCodes"; @SerializedName(SERIALIZED_NAME_DEV_LANGUAGE_CODES) - private List devLanguageCodes = null; + @javax.annotation.Nullable + private List devLanguageCodes = new ArrayList<>(); public static final String SERIALIZED_NAME_DEV_SDK_URL = "devSdkUrl"; + @Deprecated @SerializedName(SERIALIZED_NAME_DEV_SDK_URL) + @javax.annotation.Nonnull private String devSdkUrl; public static final String SERIALIZED_NAME_DEV_SDK_VERSION = "devSdkVersion"; + @Deprecated @SerializedName(SERIALIZED_NAME_DEV_SDK_VERSION) + @javax.annotation.Nonnull private String devSdkVersion; public static final String SERIALIZED_NAME_DIS_COUNTDOWN = "dis-countdown"; @SerializedName(SERIALIZED_NAME_DIS_COUNTDOWN) + @javax.annotation.Nonnull private OffsetDateTime disCountdown; public static final String SERIALIZED_NAME_DISABLE_A_V_PRO_IN_PROTON = "disableAVProInProton"; @SerializedName(SERIALIZED_NAME_DISABLE_A_V_PRO_IN_PROTON) + @javax.annotation.Nullable private Boolean disableAVProInProton = false; public static final String SERIALIZED_NAME_DISABLE_AVATAR_COPYING = "disableAvatarCopying"; @SerializedName(SERIALIZED_NAME_DISABLE_AVATAR_COPYING) + @javax.annotation.Nonnull private Boolean disableAvatarCopying = false; public static final String SERIALIZED_NAME_DISABLE_AVATAR_GATING = "disableAvatarGating"; @SerializedName(SERIALIZED_NAME_DISABLE_AVATAR_GATING) + @javax.annotation.Nonnull private Boolean disableAvatarGating = false; public static final String SERIALIZED_NAME_DISABLE_CAPTCHA = "disableCaptcha"; @SerializedName(SERIALIZED_NAME_DISABLE_CAPTCHA) + @javax.annotation.Nullable private Boolean disableCaptcha = true; public static final String SERIALIZED_NAME_DISABLE_COMMUNITY_LABS = "disableCommunityLabs"; @SerializedName(SERIALIZED_NAME_DISABLE_COMMUNITY_LABS) + @javax.annotation.Nonnull private Boolean disableCommunityLabs = false; public static final String SERIALIZED_NAME_DISABLE_COMMUNITY_LABS_PROMOTION = "disableCommunityLabsPromotion"; @SerializedName(SERIALIZED_NAME_DISABLE_COMMUNITY_LABS_PROMOTION) + @javax.annotation.Nonnull private Boolean disableCommunityLabsPromotion = false; public static final String SERIALIZED_NAME_DISABLE_EMAIL = "disableEmail"; @SerializedName(SERIALIZED_NAME_DISABLE_EMAIL) + @javax.annotation.Nonnull private Boolean disableEmail = false; public static final String SERIALIZED_NAME_DISABLE_EVENT_STREAM = "disableEventStream"; @SerializedName(SERIALIZED_NAME_DISABLE_EVENT_STREAM) + @javax.annotation.Nonnull private Boolean disableEventStream = false; public static final String SERIALIZED_NAME_DISABLE_FEEDBACK_GATING = "disableFeedbackGating"; @SerializedName(SERIALIZED_NAME_DISABLE_FEEDBACK_GATING) + @javax.annotation.Nonnull private Boolean disableFeedbackGating = false; public static final String SERIALIZED_NAME_DISABLE_FRONTEND_BUILDS = "disableFrontendBuilds"; @SerializedName(SERIALIZED_NAME_DISABLE_FRONTEND_BUILDS) + @javax.annotation.Nonnull private Boolean disableFrontendBuilds = false; public static final String SERIALIZED_NAME_DISABLE_GIFT_DROPS = "disableGiftDrops"; @SerializedName(SERIALIZED_NAME_DISABLE_GIFT_DROPS) + @javax.annotation.Nonnull private Boolean disableGiftDrops = false; public static final String SERIALIZED_NAME_DISABLE_HELLO = "disableHello"; @SerializedName(SERIALIZED_NAME_DISABLE_HELLO) + @javax.annotation.Nonnull private Boolean disableHello = false; public static final String SERIALIZED_NAME_DISABLE_OCULUS_SUBS = "disableOculusSubs"; @SerializedName(SERIALIZED_NAME_DISABLE_OCULUS_SUBS) + @javax.annotation.Nonnull private Boolean disableOculusSubs = false; public static final String SERIALIZED_NAME_DISABLE_REGISTRATION = "disableRegistration"; @SerializedName(SERIALIZED_NAME_DISABLE_REGISTRATION) + @javax.annotation.Nonnull private Boolean disableRegistration = false; public static final String SERIALIZED_NAME_DISABLE_STEAM_NETWORKING = "disableSteamNetworking"; @SerializedName(SERIALIZED_NAME_DISABLE_STEAM_NETWORKING) + @javax.annotation.Nonnull private Boolean disableSteamNetworking = true; public static final String SERIALIZED_NAME_DISABLE_TWO_FACTOR_AUTH = "disableTwoFactorAuth"; + @Deprecated @SerializedName(SERIALIZED_NAME_DISABLE_TWO_FACTOR_AUTH) + @javax.annotation.Nonnull private Boolean disableTwoFactorAuth = false; public static final String SERIALIZED_NAME_DISABLE_UDON = "disableUdon"; @SerializedName(SERIALIZED_NAME_DISABLE_UDON) + @javax.annotation.Nonnull private Boolean disableUdon = false; public static final String SERIALIZED_NAME_DISABLE_UPGRADE_ACCOUNT = "disableUpgradeAccount"; @SerializedName(SERIALIZED_NAME_DISABLE_UPGRADE_ACCOUNT) + @javax.annotation.Nonnull private Boolean disableUpgradeAccount = false; public static final String SERIALIZED_NAME_DOWNLOAD_LINK_WINDOWS = "downloadLinkWindows"; @SerializedName(SERIALIZED_NAME_DOWNLOAD_LINK_WINDOWS) + @javax.annotation.Nonnull private String downloadLinkWindows; public static final String SERIALIZED_NAME_DOWNLOAD_URLS = "downloadUrls"; @SerializedName(SERIALIZED_NAME_DOWNLOAD_URLS) + @javax.annotation.Nonnull private APIConfigDownloadURLList downloadUrls; public static final String SERIALIZED_NAME_DYNAMIC_WORLD_ROWS = "dynamicWorldRows"; @SerializedName(SERIALIZED_NAME_DYNAMIC_WORLD_ROWS) + @javax.annotation.Nonnull private Set dynamicWorldRows = new LinkedHashSet<>(); public static final String SERIALIZED_NAME_ECONOMY_LEDGER_BACKFILL = "economyLedgerBackfill"; @SerializedName(SERIALIZED_NAME_ECONOMY_LEDGER_BACKFILL) + @javax.annotation.Nonnull private Boolean economyLedgerBackfill; public static final String SERIALIZED_NAME_ECONOMY_LEDGER_MIGRATION_STOP = "economyLedgerMigrationStop"; @SerializedName(SERIALIZED_NAME_ECONOMY_LEDGER_MIGRATION_STOP) + @javax.annotation.Nonnull private String economyLedgerMigrationStop; public static final String SERIALIZED_NAME_ECONOMY_LEDGER_MODE = "economyLedgerMode"; @SerializedName(SERIALIZED_NAME_ECONOMY_LEDGER_MODE) + @javax.annotation.Nonnull private String economyLedgerMode; public static final String SERIALIZED_NAME_ECONOMY_PAUSE_END = "economyPauseEnd"; @SerializedName(SERIALIZED_NAME_ECONOMY_PAUSE_END) + @javax.annotation.Nonnull private OffsetDateTime economyPauseEnd; public static final String SERIALIZED_NAME_ECONOMY_PAUSE_START = "economyPauseStart"; @SerializedName(SERIALIZED_NAME_ECONOMY_PAUSE_START) + @javax.annotation.Nonnull private OffsetDateTime economyPauseStart; public static final String SERIALIZED_NAME_ECONOMY_PURCHASE_REPAIR_ENABLED = "economyPurchaseRepairEnabled"; @SerializedName(SERIALIZED_NAME_ECONOMY_PURCHASE_REPAIR_ENABLED) + @javax.annotation.Nonnull private Boolean economyPurchaseRepairEnabled; public static final String SERIALIZED_NAME_ECONOMY_STATE = "economyState"; @SerializedName(SERIALIZED_NAME_ECONOMY_STATE) + @javax.annotation.Nonnull private Integer economyState = 1; public static final String SERIALIZED_NAME_EVENTS = "events"; @SerializedName(SERIALIZED_NAME_EVENTS) + @javax.annotation.Nonnull private APIConfigEvents events; public static final String SERIALIZED_NAME_FORCE_USE_LATEST_WORLD = "forceUseLatestWorld"; @SerializedName(SERIALIZED_NAME_FORCE_USE_LATEST_WORLD) + @javax.annotation.Nonnull private Boolean forceUseLatestWorld = true; public static final String SERIALIZED_NAME_GIFT_DISPLAY_TYPE = "giftDisplayType"; @SerializedName(SERIALIZED_NAME_GIFT_DISPLAY_TYPE) + @javax.annotation.Nonnull private String giftDisplayType; public static final String SERIALIZED_NAME_GOOGLE_API_CLIENT_ID = "googleApiClientId"; @SerializedName(SERIALIZED_NAME_GOOGLE_API_CLIENT_ID) + @javax.annotation.Nonnull private String googleApiClientId = "827942544393-r2ouvckvouldn9dg9uruseje575e878f.apps.googleusercontent.com"; public static final String SERIALIZED_NAME_HOME_WORLD_ID = "homeWorldId"; @SerializedName(SERIALIZED_NAME_HOME_WORLD_ID) + @javax.annotation.Nonnull private String homeWorldId; public static final String SERIALIZED_NAME_HOMEPAGE_REDIRECT_TARGET = "homepageRedirectTarget"; @SerializedName(SERIALIZED_NAME_HOMEPAGE_REDIRECT_TARGET) + @javax.annotation.Nonnull private String homepageRedirectTarget = "https://hello.vrchat.com"; public static final String SERIALIZED_NAME_HUB_WORLD_ID = "hubWorldId"; @SerializedName(SERIALIZED_NAME_HUB_WORLD_ID) + @javax.annotation.Nonnull private String hubWorldId; public static final String SERIALIZED_NAME_IMAGE_HOST_URL_LIST = "imageHostUrlList"; @SerializedName(SERIALIZED_NAME_IMAGE_HOST_URL_LIST) + @javax.annotation.Nonnull private List imageHostUrlList = new ArrayList<>(); public static final String SERIALIZED_NAME_IOS_APP_VERSION = "iosAppVersion"; @SerializedName(SERIALIZED_NAME_IOS_APP_VERSION) + @javax.annotation.Nonnull private List iosAppVersion = new ArrayList<>(); public static final String SERIALIZED_NAME_IOS_VERSION = "iosVersion"; @SerializedName(SERIALIZED_NAME_IOS_VERSION) + @javax.annotation.Nonnull private APIConfigIosVersion iosVersion; public static final String SERIALIZED_NAME_JOBS_EMAIL = "jobsEmail"; @SerializedName(SERIALIZED_NAME_JOBS_EMAIL) + @javax.annotation.Nonnull private String jobsEmail; public static final String SERIALIZED_NAME_MAX_USER_EMOJI = "maxUserEmoji"; @SerializedName(SERIALIZED_NAME_MAX_USER_EMOJI) + @javax.annotation.Nonnull private Integer maxUserEmoji = 18; public static final String SERIALIZED_NAME_MAX_USER_STICKERS = "maxUserStickers"; @SerializedName(SERIALIZED_NAME_MAX_USER_STICKERS) + @javax.annotation.Nonnull private Integer maxUserStickers = 18; public static final String SERIALIZED_NAME_MIN_SUPPORTED_CLIENT_BUILD_NUMBER = "minSupportedClientBuildNumber"; @SerializedName(SERIALIZED_NAME_MIN_SUPPORTED_CLIENT_BUILD_NUMBER) + @javax.annotation.Nonnull private APIConfigMinSupportedClientBuildNumber minSupportedClientBuildNumber; public static final String SERIALIZED_NAME_MINIMUM_UNITY_VERSION_FOR_UPLOADS = "minimumUnityVersionForUploads"; @SerializedName(SERIALIZED_NAME_MINIMUM_UNITY_VERSION_FOR_UPLOADS) + @javax.annotation.Nonnull private String minimumUnityVersionForUploads = "2019.0.0f1"; public static final String SERIALIZED_NAME_MODERATION_EMAIL = "moderationEmail"; @SerializedName(SERIALIZED_NAME_MODERATION_EMAIL) + @javax.annotation.Nonnull private String moderationEmail; public static final String SERIALIZED_NAME_NOT_ALLOWED_TO_SELECT_AVATAR_IN_PRIVATE_WORLD_MESSAGE = "notAllowedToSelectAvatarInPrivateWorldMessage"; @SerializedName(SERIALIZED_NAME_NOT_ALLOWED_TO_SELECT_AVATAR_IN_PRIVATE_WORLD_MESSAGE) + @javax.annotation.Nonnull private String notAllowedToSelectAvatarInPrivateWorldMessage; public static final String SERIALIZED_NAME_OFFLINE_ANALYSIS = "offlineAnalysis"; @SerializedName(SERIALIZED_NAME_OFFLINE_ANALYSIS) + @javax.annotation.Nonnull private APIConfigOfflineAnalysis offlineAnalysis; public static final String SERIALIZED_NAME_PHOTON_NAMESERVER_OVERRIDES = "photonNameserverOverrides"; @SerializedName(SERIALIZED_NAME_PHOTON_NAMESERVER_OVERRIDES) + @javax.annotation.Nonnull private List photonNameserverOverrides = new ArrayList<>(); public static final String SERIALIZED_NAME_PHOTON_PUBLIC_KEYS = "photonPublicKeys"; @SerializedName(SERIALIZED_NAME_PHOTON_PUBLIC_KEYS) + @javax.annotation.Nonnull private List photonPublicKeys = new ArrayList<>(); public static final String SERIALIZED_NAME_PLAYER_URL_RESOLVER_SHA1 = "player-url-resolver-sha1"; @SerializedName(SERIALIZED_NAME_PLAYER_URL_RESOLVER_SHA1) + @javax.annotation.Nonnull private String playerUrlResolverSha1; public static final String SERIALIZED_NAME_PLAYER_URL_RESOLVER_VERSION = "player-url-resolver-version"; @SerializedName(SERIALIZED_NAME_PLAYER_URL_RESOLVER_VERSION) + @javax.annotation.Nonnull private String playerUrlResolverVersion; public static final String SERIALIZED_NAME_PUBLIC_KEY = "publicKey"; @SerializedName(SERIALIZED_NAME_PUBLIC_KEY) + @javax.annotation.Nonnull private String publicKey; public static final String SERIALIZED_NAME_REPORT_CATEGORIES = "reportCategories"; @SerializedName(SERIALIZED_NAME_REPORT_CATEGORIES) + @javax.annotation.Nonnull private Map reportCategories = new HashMap<>(); public static final String SERIALIZED_NAME_REPORT_FORM_URL = "reportFormUrl"; @SerializedName(SERIALIZED_NAME_REPORT_FORM_URL) + @javax.annotation.Nonnull private String reportFormUrl = "https://help.vrchat.com/hc/en-us/requests/new?ticket_form_id=1500000182242&tf_360056455174=user_report&tf_360057451993={userId}&tf_1500001445142={reportedId}&tf_subject={reason} {category} By {contentType} {reportedName}&tf_description={description}"; public static final String SERIALIZED_NAME_REPORT_OPTIONS = "reportOptions"; @SerializedName(SERIALIZED_NAME_REPORT_OPTIONS) + @javax.annotation.Nonnull private Map>> reportOptions = new HashMap<>(); public static final String SERIALIZED_NAME_REPORT_REASONS = "reportReasons"; @SerializedName(SERIALIZED_NAME_REPORT_REASONS) + @javax.annotation.Nonnull private Map reportReasons = new HashMap<>(); public static final String SERIALIZED_NAME_REQUIRE_AGE_VERIFICATION_BETA_TAG = "requireAgeVerificationBetaTag"; @SerializedName(SERIALIZED_NAME_REQUIRE_AGE_VERIFICATION_BETA_TAG) + @javax.annotation.Nonnull private Boolean requireAgeVerificationBetaTag; public static final String SERIALIZED_NAME_SDK_DEVELOPER_FAQ_URL = "sdkDeveloperFaqUrl"; @SerializedName(SERIALIZED_NAME_SDK_DEVELOPER_FAQ_URL) + @javax.annotation.Nonnull private String sdkDeveloperFaqUrl; public static final String SERIALIZED_NAME_SDK_DISCORD_URL = "sdkDiscordUrl"; @SerializedName(SERIALIZED_NAME_SDK_DISCORD_URL) + @javax.annotation.Nonnull private String sdkDiscordUrl; public static final String SERIALIZED_NAME_SDK_NOT_ALLOWED_TO_PUBLISH_MESSAGE = "sdkNotAllowedToPublishMessage"; @SerializedName(SERIALIZED_NAME_SDK_NOT_ALLOWED_TO_PUBLISH_MESSAGE) + @javax.annotation.Nonnull private String sdkNotAllowedToPublishMessage; public static final String SERIALIZED_NAME_SDK_UNITY_VERSION = "sdkUnityVersion"; @SerializedName(SERIALIZED_NAME_SDK_UNITY_VERSION) + @javax.annotation.Nonnull private String sdkUnityVersion; public static final String SERIALIZED_NAME_STRING_HOST_URL_LIST = "stringHostUrlList"; @SerializedName(SERIALIZED_NAME_STRING_HOST_URL_LIST) + @javax.annotation.Nonnull private List stringHostUrlList = new ArrayList<>(); public static final String SERIALIZED_NAME_SUPPORT_EMAIL = "supportEmail"; @SerializedName(SERIALIZED_NAME_SUPPORT_EMAIL) + @javax.annotation.Nonnull private String supportEmail; public static final String SERIALIZED_NAME_SUPPORT_FORM_URL = "supportFormUrl"; @SerializedName(SERIALIZED_NAME_SUPPORT_FORM_URL) + @javax.annotation.Nonnull private String supportFormUrl; public static final String SERIALIZED_NAME_TIME_OUT_WORLD_ID = "timeOutWorldId"; @SerializedName(SERIALIZED_NAME_TIME_OUT_WORLD_ID) + @javax.annotation.Nonnull private String timeOutWorldId; public static final String SERIALIZED_NAME_TIMEKEEPING = "timekeeping"; @SerializedName(SERIALIZED_NAME_TIMEKEEPING) + @javax.annotation.Nonnull private Boolean timekeeping = true; public static final String SERIALIZED_NAME_TUTORIAL_WORLD_ID = "tutorialWorldId"; @SerializedName(SERIALIZED_NAME_TUTORIAL_WORLD_ID) + @javax.annotation.Nonnull private String tutorialWorldId; public static final String SERIALIZED_NAME_UPDATE_RATE_MS_MAXIMUM = "updateRateMsMaximum"; @SerializedName(SERIALIZED_NAME_UPDATE_RATE_MS_MAXIMUM) + @javax.annotation.Nonnull private Integer updateRateMsMaximum; public static final String SERIALIZED_NAME_UPDATE_RATE_MS_MINIMUM = "updateRateMsMinimum"; @SerializedName(SERIALIZED_NAME_UPDATE_RATE_MS_MINIMUM) + @javax.annotation.Nonnull private Integer updateRateMsMinimum; public static final String SERIALIZED_NAME_UPDATE_RATE_MS_NORMAL = "updateRateMsNormal"; @SerializedName(SERIALIZED_NAME_UPDATE_RATE_MS_NORMAL) + @javax.annotation.Nonnull private Integer updateRateMsNormal; public static final String SERIALIZED_NAME_UPDATE_RATE_MS_UDON_MANUAL = "updateRateMsUdonManual"; @SerializedName(SERIALIZED_NAME_UPDATE_RATE_MS_UDON_MANUAL) + @javax.annotation.Nonnull private Integer updateRateMsUdonManual; public static final String SERIALIZED_NAME_UPLOAD_ANALYSIS_PERCENT = "uploadAnalysisPercent"; @SerializedName(SERIALIZED_NAME_UPLOAD_ANALYSIS_PERCENT) + @javax.annotation.Nonnull private Integer uploadAnalysisPercent; public static final String SERIALIZED_NAME_URL_LIST = "urlList"; @SerializedName(SERIALIZED_NAME_URL_LIST) + @javax.annotation.Nonnull private List urlList = new ArrayList<>(); public static final String SERIALIZED_NAME_USE_RELIABLE_UDP_FOR_VOICE = "useReliableUdpForVoice"; @SerializedName(SERIALIZED_NAME_USE_RELIABLE_UDP_FOR_VOICE) + @javax.annotation.Nonnull private Boolean useReliableUdpForVoice = false; public static final String SERIALIZED_NAME_VIVE_WINDOWS_URL = "viveWindowsUrl"; @SerializedName(SERIALIZED_NAME_VIVE_WINDOWS_URL) + @javax.annotation.Nonnull private String viveWindowsUrl; public static final String SERIALIZED_NAME_WEBSOCKET_MAX_FRIENDS_REFRESH_DELAY = "websocketMaxFriendsRefreshDelay"; @SerializedName(SERIALIZED_NAME_WEBSOCKET_MAX_FRIENDS_REFRESH_DELAY) + @javax.annotation.Nonnull private Integer websocketMaxFriendsRefreshDelay = 900; public static final String SERIALIZED_NAME_WEBSOCKET_QUICK_RECONNECT_TIME = "websocketQuickReconnectTime"; @SerializedName(SERIALIZED_NAME_WEBSOCKET_QUICK_RECONNECT_TIME) + @javax.annotation.Nonnull private Integer websocketQuickReconnectTime = 2; public static final String SERIALIZED_NAME_WEBSOCKET_RECONNECT_MAX_DELAY = "websocketReconnectMaxDelay"; @SerializedName(SERIALIZED_NAME_WEBSOCKET_RECONNECT_MAX_DELAY) + @javax.annotation.Nonnull private Integer websocketReconnectMaxDelay = 2; public static final String SERIALIZED_NAME_WHITE_LISTED_ASSET_URLS = "whiteListedAssetUrls"; @SerializedName(SERIALIZED_NAME_WHITE_LISTED_ASSET_URLS) + @javax.annotation.Nonnull private List whiteListedAssetUrls = new ArrayList<>(); public APIConfig() { } - public APIConfig campaignStatus(String campaignStatus) { - + public APIConfig campaignStatus(@javax.annotation.Nonnull String campaignStatus) { this.campaignStatus = campaignStatus; return this; } - /** + /** * The current platform-wide event taking place * @return campaignStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The current platform-wide event taking place") - public String getCampaignStatus() { return campaignStatus; } - - public void setCampaignStatus(String campaignStatus) { + public void setCampaignStatus(@javax.annotation.Nonnull String campaignStatus) { this.campaignStatus = campaignStatus; } - public APIConfig disableBackgroundPreloads(Boolean disableBackgroundPreloads) { - + public APIConfig disableBackgroundPreloads(@javax.annotation.Nonnull Boolean disableBackgroundPreloads) { this.disableBackgroundPreloads = disableBackgroundPreloads; return this; } - /** + /** * Toggles if certain assets are preloaded in the background * @return disableBackgroundPreloads - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if certain assets are preloaded in the background") - public Boolean getDisableBackgroundPreloads() { return disableBackgroundPreloads; } - - public void setDisableBackgroundPreloads(Boolean disableBackgroundPreloads) { + public void setDisableBackgroundPreloads(@javax.annotation.Nonnull Boolean disableBackgroundPreloads) { this.disableBackgroundPreloads = disableBackgroundPreloads; } - public APIConfig locationGiftingNonSubPrioEnabled(Boolean locationGiftingNonSubPrioEnabled) { - + public APIConfig locationGiftingNonSubPrioEnabled(@javax.annotation.Nonnull Boolean locationGiftingNonSubPrioEnabled) { this.locationGiftingNonSubPrioEnabled = locationGiftingNonSubPrioEnabled; return this; } - /** + /** * Toggles whether users without a current VRC+ subscription are priority recipients for gift drops * @return locationGiftingNonSubPrioEnabled - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles whether users without a current VRC+ subscription are priority recipients for gift drops") - public Boolean getLocationGiftingNonSubPrioEnabled() { return locationGiftingNonSubPrioEnabled; } - - public void setLocationGiftingNonSubPrioEnabled(Boolean locationGiftingNonSubPrioEnabled) { + public void setLocationGiftingNonSubPrioEnabled(@javax.annotation.Nonnull Boolean locationGiftingNonSubPrioEnabled) { this.locationGiftingNonSubPrioEnabled = locationGiftingNonSubPrioEnabled; } - public APIConfig voiceEnableDegradation(Boolean voiceEnableDegradation) { - + public APIConfig voiceEnableDegradation(@javax.annotation.Nonnull Boolean voiceEnableDegradation) { this.voiceEnableDegradation = voiceEnableDegradation; return this; } - /** + /** * Unknown, probably voice optimization testing * @return voiceEnableDegradation - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown, probably voice optimization testing") - public Boolean getVoiceEnableDegradation() { return voiceEnableDegradation; } - - public void setVoiceEnableDegradation(Boolean voiceEnableDegradation) { + public void setVoiceEnableDegradation(@javax.annotation.Nonnull Boolean voiceEnableDegradation) { this.voiceEnableDegradation = voiceEnableDegradation; } - public APIConfig voiceEnableReceiverLimiting(Boolean voiceEnableReceiverLimiting) { - + public APIConfig voiceEnableReceiverLimiting(@javax.annotation.Nonnull Boolean voiceEnableReceiverLimiting) { this.voiceEnableReceiverLimiting = voiceEnableReceiverLimiting; return this; } - /** + /** * Unknown, probably voice optimization testing * @return voiceEnableReceiverLimiting - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown, probably voice optimization testing") - public Boolean getVoiceEnableReceiverLimiting() { return voiceEnableReceiverLimiting; } - - public void setVoiceEnableReceiverLimiting(Boolean voiceEnableReceiverLimiting) { + public void setVoiceEnableReceiverLimiting(@javax.annotation.Nonnull Boolean voiceEnableReceiverLimiting) { this.voiceEnableReceiverLimiting = voiceEnableReceiverLimiting; } - public APIConfig accessLogsUrls(APIConfigAccessLogsUrls accessLogsUrls) { - + public APIConfig accessLogsUrls(@javax.annotation.Nonnull APIConfigAccessLogsUrls accessLogsUrls) { this.accessLogsUrls = accessLogsUrls; return this; } - /** + /** * Get accessLogsUrls * @return accessLogsUrls - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public APIConfigAccessLogsUrls getAccessLogsUrls() { return accessLogsUrls; } - - public void setAccessLogsUrls(APIConfigAccessLogsUrls accessLogsUrls) { + public void setAccessLogsUrls(@javax.annotation.Nonnull APIConfigAccessLogsUrls accessLogsUrls) { this.accessLogsUrls = accessLogsUrls; } - public APIConfig address(String address) { - + public APIConfig address(@javax.annotation.Nonnull String address) { this.address = address; return this; } - /** + /** * VRChat's office address * @return address - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's office address") - public String getAddress() { return address; } - - public void setAddress(String address) { + public void setAddress(@javax.annotation.Nonnull String address) { this.address = address; } - public APIConfig ageVerificationInviteVisible(Boolean ageVerificationInviteVisible) { - + public APIConfig ageVerificationInviteVisible(@javax.annotation.Nonnull Boolean ageVerificationInviteVisible) { this.ageVerificationInviteVisible = ageVerificationInviteVisible; return this; } - /** + /** * Get ageVerificationInviteVisible * @return ageVerificationInviteVisible - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getAgeVerificationInviteVisible() { return ageVerificationInviteVisible; } - - public void setAgeVerificationInviteVisible(Boolean ageVerificationInviteVisible) { + public void setAgeVerificationInviteVisible(@javax.annotation.Nonnull Boolean ageVerificationInviteVisible) { this.ageVerificationInviteVisible = ageVerificationInviteVisible; } - public APIConfig ageVerificationP(Boolean ageVerificationP) { - + public APIConfig ageVerificationP(@javax.annotation.Nonnull Boolean ageVerificationP) { this.ageVerificationP = ageVerificationP; return this; } - /** + /** * Get ageVerificationP * @return ageVerificationP - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getAgeVerificationP() { return ageVerificationP; } - - public void setAgeVerificationP(Boolean ageVerificationP) { + public void setAgeVerificationP(@javax.annotation.Nonnull Boolean ageVerificationP) { this.ageVerificationP = ageVerificationP; } - public APIConfig ageVerificationStatusVisible(Boolean ageVerificationStatusVisible) { - + public APIConfig ageVerificationStatusVisible(@javax.annotation.Nonnull Boolean ageVerificationStatusVisible) { this.ageVerificationStatusVisible = ageVerificationStatusVisible; return this; } - /** + /** * Get ageVerificationStatusVisible * @return ageVerificationStatusVisible - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getAgeVerificationStatusVisible() { return ageVerificationStatusVisible; } - - public void setAgeVerificationStatusVisible(Boolean ageVerificationStatusVisible) { + public void setAgeVerificationStatusVisible(@javax.annotation.Nonnull Boolean ageVerificationStatusVisible) { this.ageVerificationStatusVisible = ageVerificationStatusVisible; } - public APIConfig analysisMaxRetries(Integer analysisMaxRetries) { - + public APIConfig analysisMaxRetries(@javax.annotation.Nonnull Integer analysisMaxRetries) { this.analysisMaxRetries = analysisMaxRetries; return this; } - /** + /** * Max retries for avatar analysis requests * @return analysisMaxRetries - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Max retries for avatar analysis requests") - public Integer getAnalysisMaxRetries() { return analysisMaxRetries; } - - public void setAnalysisMaxRetries(Integer analysisMaxRetries) { + public void setAnalysisMaxRetries(@javax.annotation.Nonnull Integer analysisMaxRetries) { this.analysisMaxRetries = analysisMaxRetries; } - public APIConfig analysisRetryInterval(Integer analysisRetryInterval) { - + public APIConfig analysisRetryInterval(@javax.annotation.Nonnull Integer analysisRetryInterval) { this.analysisRetryInterval = analysisRetryInterval; return this; } - /** + /** * Interval between retries for avatar analysis requests * @return analysisRetryInterval - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Interval between retries for avatar analysis requests") - public Integer getAnalysisRetryInterval() { return analysisRetryInterval; } - - public void setAnalysisRetryInterval(Integer analysisRetryInterval) { + public void setAnalysisRetryInterval(@javax.annotation.Nonnull Integer analysisRetryInterval) { this.analysisRetryInterval = analysisRetryInterval; } - public APIConfig analyticsSegmentNewUIPctOfUsers(Integer analyticsSegmentNewUIPctOfUsers) { - + public APIConfig analyticsSegmentNewUIPctOfUsers(@javax.annotation.Nonnull Integer analyticsSegmentNewUIPctOfUsers) { this.analyticsSegmentNewUIPctOfUsers = analyticsSegmentNewUIPctOfUsers; return this; } - /** + /** * Unknown * @return analyticsSegmentNewUIPctOfUsers - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getAnalyticsSegmentNewUIPctOfUsers() { return analyticsSegmentNewUIPctOfUsers; } - - public void setAnalyticsSegmentNewUIPctOfUsers(Integer analyticsSegmentNewUIPctOfUsers) { + public void setAnalyticsSegmentNewUIPctOfUsers(@javax.annotation.Nonnull Integer analyticsSegmentNewUIPctOfUsers) { this.analyticsSegmentNewUIPctOfUsers = analyticsSegmentNewUIPctOfUsers; } - public APIConfig analyticsSegmentNewUISalt(String analyticsSegmentNewUISalt) { - + public APIConfig analyticsSegmentNewUISalt(@javax.annotation.Nonnull String analyticsSegmentNewUISalt) { this.analyticsSegmentNewUISalt = analyticsSegmentNewUISalt; return this; } - /** + /** * Unknown * @return analyticsSegmentNewUISalt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public String getAnalyticsSegmentNewUISalt() { return analyticsSegmentNewUISalt; } - - public void setAnalyticsSegmentNewUISalt(String analyticsSegmentNewUISalt) { + public void setAnalyticsSegmentNewUISalt(@javax.annotation.Nonnull String analyticsSegmentNewUISalt) { this.analyticsSegmentNewUISalt = analyticsSegmentNewUISalt; } - public APIConfig announcements(Set announcements) { - + public APIConfig announcements(@javax.annotation.Nonnull Set announcements) { this.announcements = announcements; return this; } public APIConfig addAnnouncementsItem(APIConfigAnnouncement announcementsItem) { + if (this.announcements == null) { + this.announcements = new LinkedHashSet<>(); + } this.announcements.add(announcementsItem); return this; } - /** + /** * Public Announcements * @return announcements - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Public Announcements") - public Set getAnnouncements() { return announcements; } - - public void setAnnouncements(Set announcements) { + public void setAnnouncements(@javax.annotation.Nonnull Set announcements) { this.announcements = announcements; } - public APIConfig audioConfig(APIConfigAudioConfig audioConfig) { - + public APIConfig audioConfig(@javax.annotation.Nullable APIConfigAudioConfig audioConfig) { this.audioConfig = audioConfig; return this; } - /** + /** * Get audioConfig * @return audioConfig - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public APIConfigAudioConfig getAudioConfig() { return audioConfig; } - - public void setAudioConfig(APIConfigAudioConfig audioConfig) { + public void setAudioConfig(@javax.annotation.Nullable APIConfigAudioConfig audioConfig) { this.audioConfig = audioConfig; } - public APIConfig availableLanguageCodes(List availableLanguageCodes) { - + public APIConfig availableLanguageCodes(@javax.annotation.Nonnull List availableLanguageCodes) { this.availableLanguageCodes = availableLanguageCodes; return this; } public APIConfig addAvailableLanguageCodesItem(String availableLanguageCodesItem) { + if (this.availableLanguageCodes == null) { + this.availableLanguageCodes = new ArrayList<>(); + } this.availableLanguageCodes.add(availableLanguageCodesItem); return this; } - /** + /** * List of supported Languages * @return availableLanguageCodes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "List of supported Languages") - public List getAvailableLanguageCodes() { return availableLanguageCodes; } - - public void setAvailableLanguageCodes(List availableLanguageCodes) { + public void setAvailableLanguageCodes(@javax.annotation.Nonnull List availableLanguageCodes) { this.availableLanguageCodes = availableLanguageCodes; } - public APIConfig availableLanguages(List availableLanguages) { - + public APIConfig availableLanguages(@javax.annotation.Nonnull List availableLanguages) { this.availableLanguages = availableLanguages; return this; } public APIConfig addAvailableLanguagesItem(String availableLanguagesItem) { + if (this.availableLanguages == null) { + this.availableLanguages = new ArrayList<>(); + } this.availableLanguages.add(availableLanguagesItem); return this; } - /** + /** * List of supported Languages * @return availableLanguages - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "List of supported Languages") - public List getAvailableLanguages() { return availableLanguages; } - - public void setAvailableLanguages(List availableLanguages) { + public void setAvailableLanguages(@javax.annotation.Nonnull List availableLanguages) { this.availableLanguages = availableLanguages; } - public APIConfig avatarPerfLimiter(APIConfigAvatarPerfLimiter avatarPerfLimiter) { - + public APIConfig avatarPerfLimiter(@javax.annotation.Nonnull APIConfigAvatarPerfLimiter avatarPerfLimiter) { this.avatarPerfLimiter = avatarPerfLimiter; return this; } - /** + /** * Get avatarPerfLimiter * @return avatarPerfLimiter - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public APIConfigAvatarPerfLimiter getAvatarPerfLimiter() { return avatarPerfLimiter; } - - public void setAvatarPerfLimiter(APIConfigAvatarPerfLimiter avatarPerfLimiter) { + public void setAvatarPerfLimiter(@javax.annotation.Nonnull APIConfigAvatarPerfLimiter avatarPerfLimiter) { this.avatarPerfLimiter = avatarPerfLimiter; } - public APIConfig chatboxLogBufferSeconds(Integer chatboxLogBufferSeconds) { - + public APIConfig chatboxLogBufferSeconds(@javax.annotation.Nonnull Integer chatboxLogBufferSeconds) { this.chatboxLogBufferSeconds = chatboxLogBufferSeconds; return this; } - /** + /** * Unknown * @return chatboxLogBufferSeconds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getChatboxLogBufferSeconds() { return chatboxLogBufferSeconds; } - - public void setChatboxLogBufferSeconds(Integer chatboxLogBufferSeconds) { + public void setChatboxLogBufferSeconds(@javax.annotation.Nonnull Integer chatboxLogBufferSeconds) { this.chatboxLogBufferSeconds = chatboxLogBufferSeconds; } - public APIConfig clientApiKey(String clientApiKey) { - + public APIConfig clientApiKey(@javax.annotation.Nonnull String clientApiKey) { this.clientApiKey = clientApiKey; return this; } - /** + /** * apiKey to be used for all other requests * @return clientApiKey - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "apiKey to be used for all other requests") - public String getClientApiKey() { return clientApiKey; } - - public void setClientApiKey(String clientApiKey) { + public void setClientApiKey(@javax.annotation.Nonnull String clientApiKey) { this.clientApiKey = clientApiKey; } - public APIConfig clientBPSCeiling(Integer clientBPSCeiling) { - + public APIConfig clientBPSCeiling(@javax.annotation.Nonnull Integer clientBPSCeiling) { this.clientBPSCeiling = clientBPSCeiling; return this; } - /** + /** * Unknown * @return clientBPSCeiling - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getClientBPSCeiling() { return clientBPSCeiling; } - - public void setClientBPSCeiling(Integer clientBPSCeiling) { + public void setClientBPSCeiling(@javax.annotation.Nonnull Integer clientBPSCeiling) { this.clientBPSCeiling = clientBPSCeiling; } - public APIConfig clientDisconnectTimeout(Integer clientDisconnectTimeout) { - + public APIConfig clientDisconnectTimeout(@javax.annotation.Nonnull Integer clientDisconnectTimeout) { this.clientDisconnectTimeout = clientDisconnectTimeout; return this; } - /** + /** * Unknown * @return clientDisconnectTimeout - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getClientDisconnectTimeout() { return clientDisconnectTimeout; } - - public void setClientDisconnectTimeout(Integer clientDisconnectTimeout) { + public void setClientDisconnectTimeout(@javax.annotation.Nonnull Integer clientDisconnectTimeout) { this.clientDisconnectTimeout = clientDisconnectTimeout; } - public APIConfig clientNetDispatchThread(Boolean clientNetDispatchThread) { - + public APIConfig clientNetDispatchThread(@javax.annotation.Nullable Boolean clientNetDispatchThread) { this.clientNetDispatchThread = clientNetDispatchThread; return this; } - /** + /** * Unknown * @return clientNetDispatchThread - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Boolean getClientNetDispatchThread() { return clientNetDispatchThread; } - - public void setClientNetDispatchThread(Boolean clientNetDispatchThread) { + public void setClientNetDispatchThread(@javax.annotation.Nullable Boolean clientNetDispatchThread) { this.clientNetDispatchThread = clientNetDispatchThread; } - public APIConfig clientNetDispatchThreadMobile(Boolean clientNetDispatchThreadMobile) { - + public APIConfig clientNetDispatchThreadMobile(@javax.annotation.Nonnull Boolean clientNetDispatchThreadMobile) { this.clientNetDispatchThreadMobile = clientNetDispatchThreadMobile; return this; } - /** + /** * Unknown * @return clientNetDispatchThreadMobile - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Boolean getClientNetDispatchThreadMobile() { return clientNetDispatchThreadMobile; } - - public void setClientNetDispatchThreadMobile(Boolean clientNetDispatchThreadMobile) { + public void setClientNetDispatchThreadMobile(@javax.annotation.Nonnull Boolean clientNetDispatchThreadMobile) { this.clientNetDispatchThreadMobile = clientNetDispatchThreadMobile; } - public APIConfig clientNetInThread(Boolean clientNetInThread) { - + public APIConfig clientNetInThread(@javax.annotation.Nullable Boolean clientNetInThread) { this.clientNetInThread = clientNetInThread; return this; } - /** + /** * Unknown * @return clientNetInThread - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Boolean getClientNetInThread() { return clientNetInThread; } - - public void setClientNetInThread(Boolean clientNetInThread) { + public void setClientNetInThread(@javax.annotation.Nullable Boolean clientNetInThread) { this.clientNetInThread = clientNetInThread; } - public APIConfig clientNetInThread2(Boolean clientNetInThread2) { - + public APIConfig clientNetInThread2(@javax.annotation.Nullable Boolean clientNetInThread2) { this.clientNetInThread2 = clientNetInThread2; return this; } - /** + /** * Unknown * @return clientNetInThread2 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Boolean getClientNetInThread2() { return clientNetInThread2; } - - public void setClientNetInThread2(Boolean clientNetInThread2) { + public void setClientNetInThread2(@javax.annotation.Nullable Boolean clientNetInThread2) { this.clientNetInThread2 = clientNetInThread2; } - public APIConfig clientNetInThreadMobile(Boolean clientNetInThreadMobile) { - + public APIConfig clientNetInThreadMobile(@javax.annotation.Nullable Boolean clientNetInThreadMobile) { this.clientNetInThreadMobile = clientNetInThreadMobile; return this; } - /** + /** * Unknown * @return clientNetInThreadMobile - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Boolean getClientNetInThreadMobile() { return clientNetInThreadMobile; } - - public void setClientNetInThreadMobile(Boolean clientNetInThreadMobile) { + public void setClientNetInThreadMobile(@javax.annotation.Nullable Boolean clientNetInThreadMobile) { this.clientNetInThreadMobile = clientNetInThreadMobile; } - public APIConfig clientNetInThreadMobile2(Boolean clientNetInThreadMobile2) { - + public APIConfig clientNetInThreadMobile2(@javax.annotation.Nullable Boolean clientNetInThreadMobile2) { this.clientNetInThreadMobile2 = clientNetInThreadMobile2; return this; } - /** + /** * Unknown * @return clientNetInThreadMobile2 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Boolean getClientNetInThreadMobile2() { return clientNetInThreadMobile2; } - - public void setClientNetInThreadMobile2(Boolean clientNetInThreadMobile2) { + public void setClientNetInThreadMobile2(@javax.annotation.Nullable Boolean clientNetInThreadMobile2) { this.clientNetInThreadMobile2 = clientNetInThreadMobile2; } - public APIConfig clientNetOutThread(Boolean clientNetOutThread) { - + public APIConfig clientNetOutThread(@javax.annotation.Nullable Boolean clientNetOutThread) { this.clientNetOutThread = clientNetOutThread; return this; } - /** + /** * Unknown * @return clientNetOutThread - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Boolean getClientNetOutThread() { return clientNetOutThread; } - - public void setClientNetOutThread(Boolean clientNetOutThread) { + public void setClientNetOutThread(@javax.annotation.Nullable Boolean clientNetOutThread) { this.clientNetOutThread = clientNetOutThread; } - public APIConfig clientNetOutThread2(Boolean clientNetOutThread2) { - + public APIConfig clientNetOutThread2(@javax.annotation.Nullable Boolean clientNetOutThread2) { this.clientNetOutThread2 = clientNetOutThread2; return this; } - /** + /** * Unknown * @return clientNetOutThread2 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Boolean getClientNetOutThread2() { return clientNetOutThread2; } - - public void setClientNetOutThread2(Boolean clientNetOutThread2) { + public void setClientNetOutThread2(@javax.annotation.Nullable Boolean clientNetOutThread2) { this.clientNetOutThread2 = clientNetOutThread2; } - public APIConfig clientNetOutThreadMobile(Boolean clientNetOutThreadMobile) { - + public APIConfig clientNetOutThreadMobile(@javax.annotation.Nullable Boolean clientNetOutThreadMobile) { this.clientNetOutThreadMobile = clientNetOutThreadMobile; return this; } - /** + /** * Unknown * @return clientNetOutThreadMobile - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Boolean getClientNetOutThreadMobile() { return clientNetOutThreadMobile; } - - public void setClientNetOutThreadMobile(Boolean clientNetOutThreadMobile) { + public void setClientNetOutThreadMobile(@javax.annotation.Nullable Boolean clientNetOutThreadMobile) { this.clientNetOutThreadMobile = clientNetOutThreadMobile; } - public APIConfig clientNetOutThreadMobile2(Boolean clientNetOutThreadMobile2) { - + public APIConfig clientNetOutThreadMobile2(@javax.annotation.Nullable Boolean clientNetOutThreadMobile2) { this.clientNetOutThreadMobile2 = clientNetOutThreadMobile2; return this; } - /** + /** * Unknown * @return clientNetOutThreadMobile2 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Boolean getClientNetOutThreadMobile2() { return clientNetOutThreadMobile2; } - - public void setClientNetOutThreadMobile2(Boolean clientNetOutThreadMobile2) { + public void setClientNetOutThreadMobile2(@javax.annotation.Nullable Boolean clientNetOutThreadMobile2) { this.clientNetOutThreadMobile2 = clientNetOutThreadMobile2; } - public APIConfig clientQR(Integer clientQR) { - + public APIConfig clientQR(@javax.annotation.Nullable Integer clientQR) { this.clientQR = clientQR; return this; } - /** + /** * Unknown * @return clientQR - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Integer getClientQR() { return clientQR; } - - public void setClientQR(Integer clientQR) { + public void setClientQR(@javax.annotation.Nullable Integer clientQR) { this.clientQR = clientQR; } - public APIConfig clientReservedPlayerBPS(Integer clientReservedPlayerBPS) { - + public APIConfig clientReservedPlayerBPS(@javax.annotation.Nonnull Integer clientReservedPlayerBPS) { this.clientReservedPlayerBPS = clientReservedPlayerBPS; return this; } - /** + /** * Unknown * @return clientReservedPlayerBPS - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getClientReservedPlayerBPS() { return clientReservedPlayerBPS; } - - public void setClientReservedPlayerBPS(Integer clientReservedPlayerBPS) { + public void setClientReservedPlayerBPS(@javax.annotation.Nonnull Integer clientReservedPlayerBPS) { this.clientReservedPlayerBPS = clientReservedPlayerBPS; } - public APIConfig clientSentCountAllowance(Integer clientSentCountAllowance) { - + public APIConfig clientSentCountAllowance(@javax.annotation.Nonnull Integer clientSentCountAllowance) { this.clientSentCountAllowance = clientSentCountAllowance; return this; } - /** + /** * Unknown * @return clientSentCountAllowance - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getClientSentCountAllowance() { return clientSentCountAllowance; } - - public void setClientSentCountAllowance(Integer clientSentCountAllowance) { + public void setClientSentCountAllowance(@javax.annotation.Nonnull Integer clientSentCountAllowance) { this.clientSentCountAllowance = clientSentCountAllowance; } - public APIConfig constants(APIConfigConstants constants) { - + public APIConfig constants(@javax.annotation.Nonnull APIConfigConstants constants) { this.constants = constants; return this; } - /** + /** * Get constants * @return constants - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public APIConfigConstants getConstants() { return constants; } - - public void setConstants(APIConfigConstants constants) { + public void setConstants(@javax.annotation.Nonnull APIConfigConstants constants) { this.constants = constants; } - public APIConfig contactEmail(String contactEmail) { - + public APIConfig contactEmail(@javax.annotation.Nonnull String contactEmail) { this.contactEmail = contactEmail; return this; } - /** + /** * VRChat's contact email * @return contactEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's contact email") - public String getContactEmail() { return contactEmail; } - - public void setContactEmail(String contactEmail) { + public void setContactEmail(@javax.annotation.Nonnull String contactEmail) { this.contactEmail = contactEmail; } - public APIConfig copyrightEmail(String copyrightEmail) { - + public APIConfig copyrightEmail(@javax.annotation.Nonnull String copyrightEmail) { this.copyrightEmail = copyrightEmail; return this; } - /** + /** * VRChat's copyright-issues-related email * @return copyrightEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's copyright-issues-related email") - public String getCopyrightEmail() { return copyrightEmail; } - - public void setCopyrightEmail(String copyrightEmail) { + public void setCopyrightEmail(@javax.annotation.Nonnull String copyrightEmail) { this.copyrightEmail = copyrightEmail; } - public APIConfig copyrightFormUrl(String copyrightFormUrl) { - + public APIConfig copyrightFormUrl(@javax.annotation.Nonnull String copyrightFormUrl) { this.copyrightFormUrl = copyrightFormUrl; return this; } - /** + /** * VRChat's DMCA claim webform url * @return copyrightFormUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's DMCA claim webform url") - public String getCopyrightFormUrl() { return copyrightFormUrl; } - - public void setCopyrightFormUrl(String copyrightFormUrl) { + public void setCopyrightFormUrl(@javax.annotation.Nonnull String copyrightFormUrl) { this.copyrightFormUrl = copyrightFormUrl; } - public APIConfig currentPrivacyVersion(Integer currentPrivacyVersion) { - + public APIConfig currentPrivacyVersion(@javax.annotation.Nonnull Integer currentPrivacyVersion) { this.currentPrivacyVersion = currentPrivacyVersion; return this; } - /** + /** * Current version number of the Privacy Agreement * @return currentPrivacyVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Current version number of the Privacy Agreement") - public Integer getCurrentPrivacyVersion() { return currentPrivacyVersion; } - - public void setCurrentPrivacyVersion(Integer currentPrivacyVersion) { + public void setCurrentPrivacyVersion(@javax.annotation.Nonnull Integer currentPrivacyVersion) { this.currentPrivacyVersion = currentPrivacyVersion; } - public APIConfig currentTOSVersion(Integer currentTOSVersion) { - + public APIConfig currentTOSVersion(@javax.annotation.Nonnull Integer currentTOSVersion) { this.currentTOSVersion = currentTOSVersion; return this; } - /** + /** * Current version number of the Terms of Service * minimum: 0 * @return currentTOSVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "7", required = true, value = "Current version number of the Terms of Service") - public Integer getCurrentTOSVersion() { return currentTOSVersion; } - - public void setCurrentTOSVersion(Integer currentTOSVersion) { + public void setCurrentTOSVersion(@javax.annotation.Nonnull Integer currentTOSVersion) { this.currentTOSVersion = currentTOSVersion; } - public APIConfig defaultAvatar(String defaultAvatar) { - + public APIConfig defaultAvatar(@javax.annotation.Nonnull String defaultAvatar) { this.defaultAvatar = defaultAvatar; return this; } - /** + /** * Get defaultAvatar * @return defaultAvatar - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_912d66a4-4714-43b8-8407-7de2cafbf55b", required = true, value = "") - public String getDefaultAvatar() { return defaultAvatar; } - - public void setDefaultAvatar(String defaultAvatar) { + public void setDefaultAvatar(@javax.annotation.Nonnull String defaultAvatar) { this.defaultAvatar = defaultAvatar; } - public APIConfig defaultStickerSet(String defaultStickerSet) { - + public APIConfig defaultStickerSet(@javax.annotation.Nonnull String defaultStickerSet) { this.defaultStickerSet = defaultStickerSet; return this; } - /** + /** * Get defaultStickerSet * @return defaultStickerSet - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDefaultStickerSet() { return defaultStickerSet; } - - public void setDefaultStickerSet(String defaultStickerSet) { + public void setDefaultStickerSet(@javax.annotation.Nonnull String defaultStickerSet) { this.defaultStickerSet = defaultStickerSet; } - public APIConfig devLanguageCodes(List devLanguageCodes) { - + public APIConfig devLanguageCodes(@javax.annotation.Nullable List devLanguageCodes) { this.devLanguageCodes = devLanguageCodes; return this; } @@ -1619,1943 +1579,1655 @@ public APIConfig addDevLanguageCodesItem(String devLanguageCodesItem) { return this; } - /** + /** * Unknown * @return devLanguageCodes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public List getDevLanguageCodes() { return devLanguageCodes; } - - public void setDevLanguageCodes(List devLanguageCodes) { + public void setDevLanguageCodes(@javax.annotation.Nullable List devLanguageCodes) { this.devLanguageCodes = devLanguageCodes; } - public APIConfig devSdkUrl(String devSdkUrl) { - + @Deprecated + public APIConfig devSdkUrl(@javax.annotation.Nonnull String devSdkUrl) { this.devSdkUrl = devSdkUrl; return this; } - /** + /** * Link to download the development SDK, use downloadUrls instead * @return devSdkUrl * @deprecated - **/ + */ @Deprecated @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Link to download the development SDK, use downloadUrls instead") - public String getDevSdkUrl() { return devSdkUrl; } - - public void setDevSdkUrl(String devSdkUrl) { + @Deprecated + public void setDevSdkUrl(@javax.annotation.Nonnull String devSdkUrl) { this.devSdkUrl = devSdkUrl; } - public APIConfig devSdkVersion(String devSdkVersion) { - + @Deprecated + public APIConfig devSdkVersion(@javax.annotation.Nonnull String devSdkVersion) { this.devSdkVersion = devSdkVersion; return this; } - /** + /** * Version of the development SDK * @return devSdkVersion * @deprecated - **/ + */ @Deprecated @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Version of the development SDK") - public String getDevSdkVersion() { return devSdkVersion; } - - public void setDevSdkVersion(String devSdkVersion) { + @Deprecated + public void setDevSdkVersion(@javax.annotation.Nonnull String devSdkVersion) { this.devSdkVersion = devSdkVersion; } - public APIConfig disCountdown(OffsetDateTime disCountdown) { - + public APIConfig disCountdown(@javax.annotation.Nonnull OffsetDateTime disCountdown) { this.disCountdown = disCountdown; return this; } - /** + /** * Unknown, \"dis\" maybe for disconnect? * @return disCountdown - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown, \"dis\" maybe for disconnect?") - public OffsetDateTime getDisCountdown() { return disCountdown; } - - public void setDisCountdown(OffsetDateTime disCountdown) { + public void setDisCountdown(@javax.annotation.Nonnull OffsetDateTime disCountdown) { this.disCountdown = disCountdown; } - public APIConfig disableAVProInProton(Boolean disableAVProInProton) { - + public APIConfig disableAVProInProton(@javax.annotation.Nullable Boolean disableAVProInProton) { this.disableAVProInProton = disableAVProInProton; return this; } - /** + /** * Unknown * @return disableAVProInProton - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Boolean getDisableAVProInProton() { return disableAVProInProton; } - - public void setDisableAVProInProton(Boolean disableAVProInProton) { + public void setDisableAVProInProton(@javax.annotation.Nullable Boolean disableAVProInProton) { this.disableAVProInProton = disableAVProInProton; } - public APIConfig disableAvatarCopying(Boolean disableAvatarCopying) { - + public APIConfig disableAvatarCopying(@javax.annotation.Nonnull Boolean disableAvatarCopying) { this.disableAvatarCopying = disableAvatarCopying; return this; } - /** + /** * Toggles if copying avatars should be disabled * @return disableAvatarCopying - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if copying avatars should be disabled") - public Boolean getDisableAvatarCopying() { return disableAvatarCopying; } - - public void setDisableAvatarCopying(Boolean disableAvatarCopying) { + public void setDisableAvatarCopying(@javax.annotation.Nonnull Boolean disableAvatarCopying) { this.disableAvatarCopying = disableAvatarCopying; } - public APIConfig disableAvatarGating(Boolean disableAvatarGating) { - + public APIConfig disableAvatarGating(@javax.annotation.Nonnull Boolean disableAvatarGating) { this.disableAvatarGating = disableAvatarGating; return this; } - /** + /** * Toggles if avatar gating should be disabled. Avatar gating restricts uploading of avatars to people with the `system_avatar_access` Tag or `admin_avatar_access` Tag * @return disableAvatarGating - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if avatar gating should be disabled. Avatar gating restricts uploading of avatars to people with the `system_avatar_access` Tag or `admin_avatar_access` Tag") - public Boolean getDisableAvatarGating() { return disableAvatarGating; } - - public void setDisableAvatarGating(Boolean disableAvatarGating) { + public void setDisableAvatarGating(@javax.annotation.Nonnull Boolean disableAvatarGating) { this.disableAvatarGating = disableAvatarGating; } - public APIConfig disableCaptcha(Boolean disableCaptcha) { - + public APIConfig disableCaptcha(@javax.annotation.Nullable Boolean disableCaptcha) { this.disableCaptcha = disableCaptcha; return this; } - /** + /** * Unknown * @return disableCaptcha - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Unknown") - public Boolean getDisableCaptcha() { return disableCaptcha; } - - public void setDisableCaptcha(Boolean disableCaptcha) { + public void setDisableCaptcha(@javax.annotation.Nullable Boolean disableCaptcha) { this.disableCaptcha = disableCaptcha; } - public APIConfig disableCommunityLabs(Boolean disableCommunityLabs) { - + public APIConfig disableCommunityLabs(@javax.annotation.Nonnull Boolean disableCommunityLabs) { this.disableCommunityLabs = disableCommunityLabs; return this; } - /** + /** * Toggles if the Community Labs should be disabled * @return disableCommunityLabs - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if the Community Labs should be disabled") - public Boolean getDisableCommunityLabs() { return disableCommunityLabs; } - - public void setDisableCommunityLabs(Boolean disableCommunityLabs) { + public void setDisableCommunityLabs(@javax.annotation.Nonnull Boolean disableCommunityLabs) { this.disableCommunityLabs = disableCommunityLabs; } - public APIConfig disableCommunityLabsPromotion(Boolean disableCommunityLabsPromotion) { - + public APIConfig disableCommunityLabsPromotion(@javax.annotation.Nonnull Boolean disableCommunityLabsPromotion) { this.disableCommunityLabsPromotion = disableCommunityLabsPromotion; return this; } - /** + /** * Toggles if promotion out of Community Labs should be disabled * @return disableCommunityLabsPromotion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if promotion out of Community Labs should be disabled") - public Boolean getDisableCommunityLabsPromotion() { return disableCommunityLabsPromotion; } - - public void setDisableCommunityLabsPromotion(Boolean disableCommunityLabsPromotion) { + public void setDisableCommunityLabsPromotion(@javax.annotation.Nonnull Boolean disableCommunityLabsPromotion) { this.disableCommunityLabsPromotion = disableCommunityLabsPromotion; } - public APIConfig disableEmail(Boolean disableEmail) { - + public APIConfig disableEmail(@javax.annotation.Nonnull Boolean disableEmail) { this.disableEmail = disableEmail; return this; } - /** + /** * Unknown * @return disableEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Boolean getDisableEmail() { return disableEmail; } - - public void setDisableEmail(Boolean disableEmail) { + public void setDisableEmail(@javax.annotation.Nonnull Boolean disableEmail) { this.disableEmail = disableEmail; } - public APIConfig disableEventStream(Boolean disableEventStream) { - + public APIConfig disableEventStream(@javax.annotation.Nonnull Boolean disableEventStream) { this.disableEventStream = disableEventStream; return this; } - /** + /** * Toggles if Analytics should be disabled. * @return disableEventStream - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if Analytics should be disabled.") - public Boolean getDisableEventStream() { return disableEventStream; } - - public void setDisableEventStream(Boolean disableEventStream) { + public void setDisableEventStream(@javax.annotation.Nonnull Boolean disableEventStream) { this.disableEventStream = disableEventStream; } - public APIConfig disableFeedbackGating(Boolean disableFeedbackGating) { - + public APIConfig disableFeedbackGating(@javax.annotation.Nonnull Boolean disableFeedbackGating) { this.disableFeedbackGating = disableFeedbackGating; return this; } - /** + /** * Toggles if feedback gating should be disabled. Feedback gating restricts submission of feedback (reporting a World or User) to people with the `system_feedback_access` Tag. * @return disableFeedbackGating - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if feedback gating should be disabled. Feedback gating restricts submission of feedback (reporting a World or User) to people with the `system_feedback_access` Tag.") - public Boolean getDisableFeedbackGating() { return disableFeedbackGating; } - - public void setDisableFeedbackGating(Boolean disableFeedbackGating) { + public void setDisableFeedbackGating(@javax.annotation.Nonnull Boolean disableFeedbackGating) { this.disableFeedbackGating = disableFeedbackGating; } - public APIConfig disableFrontendBuilds(Boolean disableFrontendBuilds) { - + public APIConfig disableFrontendBuilds(@javax.annotation.Nonnull Boolean disableFrontendBuilds) { this.disableFrontendBuilds = disableFrontendBuilds; return this; } - /** + /** * Unknown, probably toggles compilation of frontend web builds? So internal flag? * @return disableFrontendBuilds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown, probably toggles compilation of frontend web builds? So internal flag?") - public Boolean getDisableFrontendBuilds() { return disableFrontendBuilds; } - - public void setDisableFrontendBuilds(Boolean disableFrontendBuilds) { + public void setDisableFrontendBuilds(@javax.annotation.Nonnull Boolean disableFrontendBuilds) { this.disableFrontendBuilds = disableFrontendBuilds; } - public APIConfig disableGiftDrops(Boolean disableGiftDrops) { - + public APIConfig disableGiftDrops(@javax.annotation.Nonnull Boolean disableGiftDrops) { this.disableGiftDrops = disableGiftDrops; return this; } - /** + /** * Toggles if gift drops should be disabled * @return disableGiftDrops - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if gift drops should be disabled") - public Boolean getDisableGiftDrops() { return disableGiftDrops; } - - public void setDisableGiftDrops(Boolean disableGiftDrops) { + public void setDisableGiftDrops(@javax.annotation.Nonnull Boolean disableGiftDrops) { this.disableGiftDrops = disableGiftDrops; } - public APIConfig disableHello(Boolean disableHello) { - + public APIConfig disableHello(@javax.annotation.Nonnull Boolean disableHello) { this.disableHello = disableHello; return this; } - /** + /** * Unknown * @return disableHello - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Boolean getDisableHello() { return disableHello; } - - public void setDisableHello(Boolean disableHello) { + public void setDisableHello(@javax.annotation.Nonnull Boolean disableHello) { this.disableHello = disableHello; } - public APIConfig disableOculusSubs(Boolean disableOculusSubs) { - + public APIConfig disableOculusSubs(@javax.annotation.Nonnull Boolean disableOculusSubs) { this.disableOculusSubs = disableOculusSubs; return this; } - /** + /** * Toggles if signing up for Subscriptions in Oculus is disabled or not. * @return disableOculusSubs - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if signing up for Subscriptions in Oculus is disabled or not.") - public Boolean getDisableOculusSubs() { return disableOculusSubs; } - - public void setDisableOculusSubs(Boolean disableOculusSubs) { + public void setDisableOculusSubs(@javax.annotation.Nonnull Boolean disableOculusSubs) { this.disableOculusSubs = disableOculusSubs; } - public APIConfig disableRegistration(Boolean disableRegistration) { - + public APIConfig disableRegistration(@javax.annotation.Nonnull Boolean disableRegistration) { this.disableRegistration = disableRegistration; return this; } - /** + /** * Toggles if new user account registration should be disabled. * @return disableRegistration - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if new user account registration should be disabled.") - public Boolean getDisableRegistration() { return disableRegistration; } - - public void setDisableRegistration(Boolean disableRegistration) { + public void setDisableRegistration(@javax.annotation.Nonnull Boolean disableRegistration) { this.disableRegistration = disableRegistration; } - public APIConfig disableSteamNetworking(Boolean disableSteamNetworking) { - + public APIConfig disableSteamNetworking(@javax.annotation.Nonnull Boolean disableSteamNetworking) { this.disableSteamNetworking = disableSteamNetworking; return this; } - /** + /** * Toggles if Steam Networking should be disabled. VRChat these days uses Photon Unity Networking (PUN) instead. * @return disableSteamNetworking - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if Steam Networking should be disabled. VRChat these days uses Photon Unity Networking (PUN) instead.") - public Boolean getDisableSteamNetworking() { return disableSteamNetworking; } - - public void setDisableSteamNetworking(Boolean disableSteamNetworking) { + public void setDisableSteamNetworking(@javax.annotation.Nonnull Boolean disableSteamNetworking) { this.disableSteamNetworking = disableSteamNetworking; } - public APIConfig disableTwoFactorAuth(Boolean disableTwoFactorAuth) { - + @Deprecated + public APIConfig disableTwoFactorAuth(@javax.annotation.Nonnull Boolean disableTwoFactorAuth) { this.disableTwoFactorAuth = disableTwoFactorAuth; return this; } - /** + /** * Toggles if 2FA should be disabled. * @return disableTwoFactorAuth * @deprecated - **/ + */ @Deprecated @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if 2FA should be disabled.") - public Boolean getDisableTwoFactorAuth() { return disableTwoFactorAuth; } - - public void setDisableTwoFactorAuth(Boolean disableTwoFactorAuth) { + @Deprecated + public void setDisableTwoFactorAuth(@javax.annotation.Nonnull Boolean disableTwoFactorAuth) { this.disableTwoFactorAuth = disableTwoFactorAuth; } - public APIConfig disableUdon(Boolean disableUdon) { - + public APIConfig disableUdon(@javax.annotation.Nonnull Boolean disableUdon) { this.disableUdon = disableUdon; return this; } - /** + /** * Toggles if Udon should be universally disabled in-game. * @return disableUdon - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if Udon should be universally disabled in-game.") - public Boolean getDisableUdon() { return disableUdon; } - - public void setDisableUdon(Boolean disableUdon) { + public void setDisableUdon(@javax.annotation.Nonnull Boolean disableUdon) { this.disableUdon = disableUdon; } - public APIConfig disableUpgradeAccount(Boolean disableUpgradeAccount) { - + public APIConfig disableUpgradeAccount(@javax.annotation.Nonnull Boolean disableUpgradeAccount) { this.disableUpgradeAccount = disableUpgradeAccount; return this; } - /** + /** * Toggles if account upgrading \"linking with Steam/Oculus\" should be disabled. * @return disableUpgradeAccount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if account upgrading \"linking with Steam/Oculus\" should be disabled.") - public Boolean getDisableUpgradeAccount() { return disableUpgradeAccount; } - - public void setDisableUpgradeAccount(Boolean disableUpgradeAccount) { + public void setDisableUpgradeAccount(@javax.annotation.Nonnull Boolean disableUpgradeAccount) { this.disableUpgradeAccount = disableUpgradeAccount; } - public APIConfig downloadLinkWindows(String downloadLinkWindows) { - + public APIConfig downloadLinkWindows(@javax.annotation.Nonnull String downloadLinkWindows) { this.downloadLinkWindows = downloadLinkWindows; return this; } - /** + /** * Download link for game on the Oculus Rift website. * @return downloadLinkWindows - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Download link for game on the Oculus Rift website.") - public String getDownloadLinkWindows() { return downloadLinkWindows; } - - public void setDownloadLinkWindows(String downloadLinkWindows) { + public void setDownloadLinkWindows(@javax.annotation.Nonnull String downloadLinkWindows) { this.downloadLinkWindows = downloadLinkWindows; } - public APIConfig downloadUrls(APIConfigDownloadURLList downloadUrls) { - + public APIConfig downloadUrls(@javax.annotation.Nonnull APIConfigDownloadURLList downloadUrls) { this.downloadUrls = downloadUrls; return this; } - /** + /** * Get downloadUrls * @return downloadUrls - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public APIConfigDownloadURLList getDownloadUrls() { return downloadUrls; } - - public void setDownloadUrls(APIConfigDownloadURLList downloadUrls) { + public void setDownloadUrls(@javax.annotation.Nonnull APIConfigDownloadURLList downloadUrls) { this.downloadUrls = downloadUrls; } - public APIConfig dynamicWorldRows(Set dynamicWorldRows) { - + public APIConfig dynamicWorldRows(@javax.annotation.Nonnull Set dynamicWorldRows) { this.dynamicWorldRows = dynamicWorldRows; return this; } public APIConfig addDynamicWorldRowsItem(DynamicContentRow dynamicWorldRowsItem) { + if (this.dynamicWorldRows == null) { + this.dynamicWorldRows = new LinkedHashSet<>(); + } this.dynamicWorldRows.add(dynamicWorldRowsItem); return this; } - /** + /** * Array of DynamicWorldRow objects, used by the game to display the list of world rows * @return dynamicWorldRows - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Array of DynamicWorldRow objects, used by the game to display the list of world rows") - public Set getDynamicWorldRows() { return dynamicWorldRows; } - - public void setDynamicWorldRows(Set dynamicWorldRows) { + public void setDynamicWorldRows(@javax.annotation.Nonnull Set dynamicWorldRows) { this.dynamicWorldRows = dynamicWorldRows; } - public APIConfig economyLedgerBackfill(Boolean economyLedgerBackfill) { - + public APIConfig economyLedgerBackfill(@javax.annotation.Nonnull Boolean economyLedgerBackfill) { this.economyLedgerBackfill = economyLedgerBackfill; return this; } - /** + /** * Unknown * @return economyLedgerBackfill - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Boolean getEconomyLedgerBackfill() { return economyLedgerBackfill; } - - public void setEconomyLedgerBackfill(Boolean economyLedgerBackfill) { + public void setEconomyLedgerBackfill(@javax.annotation.Nonnull Boolean economyLedgerBackfill) { this.economyLedgerBackfill = economyLedgerBackfill; } - public APIConfig economyLedgerMigrationStop(String economyLedgerMigrationStop) { - + public APIConfig economyLedgerMigrationStop(@javax.annotation.Nonnull String economyLedgerMigrationStop) { this.economyLedgerMigrationStop = economyLedgerMigrationStop; return this; } - /** + /** * Unknown * @return economyLedgerMigrationStop - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public String getEconomyLedgerMigrationStop() { return economyLedgerMigrationStop; } - - public void setEconomyLedgerMigrationStop(String economyLedgerMigrationStop) { + public void setEconomyLedgerMigrationStop(@javax.annotation.Nonnull String economyLedgerMigrationStop) { this.economyLedgerMigrationStop = economyLedgerMigrationStop; } - public APIConfig economyLedgerMode(String economyLedgerMode) { - + public APIConfig economyLedgerMode(@javax.annotation.Nonnull String economyLedgerMode) { this.economyLedgerMode = economyLedgerMode; return this; } - /** + /** * Unknown * @return economyLedgerMode - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public String getEconomyLedgerMode() { return economyLedgerMode; } - - public void setEconomyLedgerMode(String economyLedgerMode) { + public void setEconomyLedgerMode(@javax.annotation.Nonnull String economyLedgerMode) { this.economyLedgerMode = economyLedgerMode; } - public APIConfig economyPauseEnd(OffsetDateTime economyPauseEnd) { - + public APIConfig economyPauseEnd(@javax.annotation.Nonnull OffsetDateTime economyPauseEnd) { this.economyPauseEnd = economyPauseEnd; return this; } - /** + /** * Unknown * @return economyPauseEnd - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public OffsetDateTime getEconomyPauseEnd() { return economyPauseEnd; } - - public void setEconomyPauseEnd(OffsetDateTime economyPauseEnd) { + public void setEconomyPauseEnd(@javax.annotation.Nonnull OffsetDateTime economyPauseEnd) { this.economyPauseEnd = economyPauseEnd; } - public APIConfig economyPauseStart(OffsetDateTime economyPauseStart) { - + public APIConfig economyPauseStart(@javax.annotation.Nonnull OffsetDateTime economyPauseStart) { this.economyPauseStart = economyPauseStart; return this; } - /** + /** * Unknown * @return economyPauseStart - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public OffsetDateTime getEconomyPauseStart() { return economyPauseStart; } - - public void setEconomyPauseStart(OffsetDateTime economyPauseStart) { + public void setEconomyPauseStart(@javax.annotation.Nonnull OffsetDateTime economyPauseStart) { this.economyPauseStart = economyPauseStart; } - public APIConfig economyPurchaseRepairEnabled(Boolean economyPurchaseRepairEnabled) { - + public APIConfig economyPurchaseRepairEnabled(@javax.annotation.Nonnull Boolean economyPurchaseRepairEnabled) { this.economyPurchaseRepairEnabled = economyPurchaseRepairEnabled; return this; } - /** + /** * Unknown * @return economyPurchaseRepairEnabled - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Boolean getEconomyPurchaseRepairEnabled() { return economyPurchaseRepairEnabled; } - - public void setEconomyPurchaseRepairEnabled(Boolean economyPurchaseRepairEnabled) { + public void setEconomyPurchaseRepairEnabled(@javax.annotation.Nonnull Boolean economyPurchaseRepairEnabled) { this.economyPurchaseRepairEnabled = economyPurchaseRepairEnabled; } - public APIConfig economyState(Integer economyState) { - + public APIConfig economyState(@javax.annotation.Nonnull Integer economyState) { this.economyState = economyState; return this; } - /** + /** * Unknown * @return economyState - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getEconomyState() { return economyState; } - - public void setEconomyState(Integer economyState) { + public void setEconomyState(@javax.annotation.Nonnull Integer economyState) { this.economyState = economyState; } - public APIConfig events(APIConfigEvents events) { - + public APIConfig events(@javax.annotation.Nonnull APIConfigEvents events) { this.events = events; return this; } - /** + /** * Get events * @return events - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public APIConfigEvents getEvents() { return events; } - - public void setEvents(APIConfigEvents events) { + public void setEvents(@javax.annotation.Nonnull APIConfigEvents events) { this.events = events; } - public APIConfig forceUseLatestWorld(Boolean forceUseLatestWorld) { - + public APIConfig forceUseLatestWorld(@javax.annotation.Nonnull Boolean forceUseLatestWorld) { this.forceUseLatestWorld = forceUseLatestWorld; return this; } - /** + /** * Unknown * @return forceUseLatestWorld - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Boolean getForceUseLatestWorld() { return forceUseLatestWorld; } - - public void setForceUseLatestWorld(Boolean forceUseLatestWorld) { + public void setForceUseLatestWorld(@javax.annotation.Nonnull Boolean forceUseLatestWorld) { this.forceUseLatestWorld = forceUseLatestWorld; } - public APIConfig giftDisplayType(String giftDisplayType) { - + public APIConfig giftDisplayType(@javax.annotation.Nonnull String giftDisplayType) { this.giftDisplayType = giftDisplayType; return this; } - /** + /** * Display type of gifts * @return giftDisplayType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Display type of gifts") - public String getGiftDisplayType() { return giftDisplayType; } - - public void setGiftDisplayType(String giftDisplayType) { + public void setGiftDisplayType(@javax.annotation.Nonnull String giftDisplayType) { this.giftDisplayType = giftDisplayType; } - public APIConfig googleApiClientId(String googleApiClientId) { - + public APIConfig googleApiClientId(@javax.annotation.Nonnull String googleApiClientId) { this.googleApiClientId = googleApiClientId; return this; } - /** + /** * Unknown * @return googleApiClientId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public String getGoogleApiClientId() { return googleApiClientId; } - - public void setGoogleApiClientId(String googleApiClientId) { + public void setGoogleApiClientId(@javax.annotation.Nonnull String googleApiClientId) { this.googleApiClientId = googleApiClientId; } - public APIConfig homeWorldId(String homeWorldId) { - + public APIConfig homeWorldId(@javax.annotation.Nonnull String homeWorldId) { this.homeWorldId = homeWorldId; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return homeWorldId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getHomeWorldId() { return homeWorldId; } - - public void setHomeWorldId(String homeWorldId) { + public void setHomeWorldId(@javax.annotation.Nonnull String homeWorldId) { this.homeWorldId = homeWorldId; } - public APIConfig homepageRedirectTarget(String homepageRedirectTarget) { - + public APIConfig homepageRedirectTarget(@javax.annotation.Nonnull String homepageRedirectTarget) { this.homepageRedirectTarget = homepageRedirectTarget; return this; } - /** + /** * Redirect target if you try to open the base API domain in your browser * @return homepageRedirectTarget - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Redirect target if you try to open the base API domain in your browser") - public String getHomepageRedirectTarget() { return homepageRedirectTarget; } - - public void setHomepageRedirectTarget(String homepageRedirectTarget) { + public void setHomepageRedirectTarget(@javax.annotation.Nonnull String homepageRedirectTarget) { this.homepageRedirectTarget = homepageRedirectTarget; } - public APIConfig hubWorldId(String hubWorldId) { - + public APIConfig hubWorldId(@javax.annotation.Nonnull String hubWorldId) { this.hubWorldId = hubWorldId; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return hubWorldId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getHubWorldId() { return hubWorldId; } - - public void setHubWorldId(String hubWorldId) { + public void setHubWorldId(@javax.annotation.Nonnull String hubWorldId) { this.hubWorldId = hubWorldId; } - public APIConfig imageHostUrlList(List imageHostUrlList) { - + public APIConfig imageHostUrlList(@javax.annotation.Nonnull List imageHostUrlList) { this.imageHostUrlList = imageHostUrlList; return this; } public APIConfig addImageHostUrlListItem(String imageHostUrlListItem) { + if (this.imageHostUrlList == null) { + this.imageHostUrlList = new ArrayList<>(); + } this.imageHostUrlList.add(imageHostUrlListItem); return this; } - /** + /** * A list of explicitly allowed origins that worlds can request images from via the Udon's [VRCImageDownloader#DownloadImage](https://creators.vrchat.com/worlds/udon/image-loading/#downloadimage). * @return imageHostUrlList - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "A list of explicitly allowed origins that worlds can request images from via the Udon's [VRCImageDownloader#DownloadImage](https://creators.vrchat.com/worlds/udon/image-loading/#downloadimage).") - public List getImageHostUrlList() { return imageHostUrlList; } - - public void setImageHostUrlList(List imageHostUrlList) { + public void setImageHostUrlList(@javax.annotation.Nonnull List imageHostUrlList) { this.imageHostUrlList = imageHostUrlList; } - public APIConfig iosAppVersion(List iosAppVersion) { - + public APIConfig iosAppVersion(@javax.annotation.Nonnull List iosAppVersion) { this.iosAppVersion = iosAppVersion; return this; } public APIConfig addIosAppVersionItem(String iosAppVersionItem) { + if (this.iosAppVersion == null) { + this.iosAppVersion = new ArrayList<>(); + } this.iosAppVersion.add(iosAppVersionItem); return this; } - /** + /** * Current app version for iOS * @return iosAppVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Current app version for iOS") - public List getIosAppVersion() { return iosAppVersion; } - - public void setIosAppVersion(List iosAppVersion) { + public void setIosAppVersion(@javax.annotation.Nonnull List iosAppVersion) { this.iosAppVersion = iosAppVersion; } - public APIConfig iosVersion(APIConfigIosVersion iosVersion) { - + public APIConfig iosVersion(@javax.annotation.Nonnull APIConfigIosVersion iosVersion) { this.iosVersion = iosVersion; return this; } - /** + /** * Get iosVersion * @return iosVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public APIConfigIosVersion getIosVersion() { return iosVersion; } - - public void setIosVersion(APIConfigIosVersion iosVersion) { + public void setIosVersion(@javax.annotation.Nonnull APIConfigIosVersion iosVersion) { this.iosVersion = iosVersion; } - public APIConfig jobsEmail(String jobsEmail) { - + public APIConfig jobsEmail(@javax.annotation.Nonnull String jobsEmail) { this.jobsEmail = jobsEmail; return this; } - /** + /** * VRChat's job application email * @return jobsEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's job application email") - public String getJobsEmail() { return jobsEmail; } - - public void setJobsEmail(String jobsEmail) { + public void setJobsEmail(@javax.annotation.Nonnull String jobsEmail) { this.jobsEmail = jobsEmail; } - public APIConfig maxUserEmoji(Integer maxUserEmoji) { - + public APIConfig maxUserEmoji(@javax.annotation.Nonnull Integer maxUserEmoji) { this.maxUserEmoji = maxUserEmoji; return this; } - /** + /** * The maximum number of custom emoji each user may have at a given time. * @return maxUserEmoji - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The maximum number of custom emoji each user may have at a given time.") - public Integer getMaxUserEmoji() { return maxUserEmoji; } - - public void setMaxUserEmoji(Integer maxUserEmoji) { + public void setMaxUserEmoji(@javax.annotation.Nonnull Integer maxUserEmoji) { this.maxUserEmoji = maxUserEmoji; } - public APIConfig maxUserStickers(Integer maxUserStickers) { - + public APIConfig maxUserStickers(@javax.annotation.Nonnull Integer maxUserStickers) { this.maxUserStickers = maxUserStickers; return this; } - /** + /** * The maximum number of custom stickers each user may have at a given time. * @return maxUserStickers - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The maximum number of custom stickers each user may have at a given time.") - public Integer getMaxUserStickers() { return maxUserStickers; } - - public void setMaxUserStickers(Integer maxUserStickers) { + public void setMaxUserStickers(@javax.annotation.Nonnull Integer maxUserStickers) { this.maxUserStickers = maxUserStickers; } - public APIConfig minSupportedClientBuildNumber(APIConfigMinSupportedClientBuildNumber minSupportedClientBuildNumber) { - + public APIConfig minSupportedClientBuildNumber(@javax.annotation.Nonnull APIConfigMinSupportedClientBuildNumber minSupportedClientBuildNumber) { this.minSupportedClientBuildNumber = minSupportedClientBuildNumber; return this; } - /** + /** * Get minSupportedClientBuildNumber * @return minSupportedClientBuildNumber - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public APIConfigMinSupportedClientBuildNumber getMinSupportedClientBuildNumber() { return minSupportedClientBuildNumber; } - - public void setMinSupportedClientBuildNumber(APIConfigMinSupportedClientBuildNumber minSupportedClientBuildNumber) { + public void setMinSupportedClientBuildNumber(@javax.annotation.Nonnull APIConfigMinSupportedClientBuildNumber minSupportedClientBuildNumber) { this.minSupportedClientBuildNumber = minSupportedClientBuildNumber; } - public APIConfig minimumUnityVersionForUploads(String minimumUnityVersionForUploads) { - + public APIConfig minimumUnityVersionForUploads(@javax.annotation.Nonnull String minimumUnityVersionForUploads) { this.minimumUnityVersionForUploads = minimumUnityVersionForUploads; return this; } - /** + /** * Minimum Unity version required for uploading assets * @return minimumUnityVersionForUploads - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Minimum Unity version required for uploading assets") - public String getMinimumUnityVersionForUploads() { return minimumUnityVersionForUploads; } - - public void setMinimumUnityVersionForUploads(String minimumUnityVersionForUploads) { + public void setMinimumUnityVersionForUploads(@javax.annotation.Nonnull String minimumUnityVersionForUploads) { this.minimumUnityVersionForUploads = minimumUnityVersionForUploads; } - public APIConfig moderationEmail(String moderationEmail) { - + public APIConfig moderationEmail(@javax.annotation.Nonnull String moderationEmail) { this.moderationEmail = moderationEmail; return this; } - /** + /** * VRChat's moderation related email * @return moderationEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's moderation related email") - public String getModerationEmail() { return moderationEmail; } - - public void setModerationEmail(String moderationEmail) { + public void setModerationEmail(@javax.annotation.Nonnull String moderationEmail) { this.moderationEmail = moderationEmail; } - public APIConfig notAllowedToSelectAvatarInPrivateWorldMessage(String notAllowedToSelectAvatarInPrivateWorldMessage) { - + public APIConfig notAllowedToSelectAvatarInPrivateWorldMessage(@javax.annotation.Nonnull String notAllowedToSelectAvatarInPrivateWorldMessage) { this.notAllowedToSelectAvatarInPrivateWorldMessage = notAllowedToSelectAvatarInPrivateWorldMessage; return this; } - /** + /** * Used in-game to notify a user they aren't allowed to select avatars in private worlds * @return notAllowedToSelectAvatarInPrivateWorldMessage - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Used in-game to notify a user they aren't allowed to select avatars in private worlds") - public String getNotAllowedToSelectAvatarInPrivateWorldMessage() { return notAllowedToSelectAvatarInPrivateWorldMessage; } - - public void setNotAllowedToSelectAvatarInPrivateWorldMessage(String notAllowedToSelectAvatarInPrivateWorldMessage) { + public void setNotAllowedToSelectAvatarInPrivateWorldMessage(@javax.annotation.Nonnull String notAllowedToSelectAvatarInPrivateWorldMessage) { this.notAllowedToSelectAvatarInPrivateWorldMessage = notAllowedToSelectAvatarInPrivateWorldMessage; } - public APIConfig offlineAnalysis(APIConfigOfflineAnalysis offlineAnalysis) { - + public APIConfig offlineAnalysis(@javax.annotation.Nonnull APIConfigOfflineAnalysis offlineAnalysis) { this.offlineAnalysis = offlineAnalysis; return this; } - /** + /** * Get offlineAnalysis * @return offlineAnalysis - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public APIConfigOfflineAnalysis getOfflineAnalysis() { return offlineAnalysis; } - - public void setOfflineAnalysis(APIConfigOfflineAnalysis offlineAnalysis) { + public void setOfflineAnalysis(@javax.annotation.Nonnull APIConfigOfflineAnalysis offlineAnalysis) { this.offlineAnalysis = offlineAnalysis; } - public APIConfig photonNameserverOverrides(List photonNameserverOverrides) { - + public APIConfig photonNameserverOverrides(@javax.annotation.Nonnull List photonNameserverOverrides) { this.photonNameserverOverrides = photonNameserverOverrides; return this; } public APIConfig addPhotonNameserverOverridesItem(String photonNameserverOverridesItem) { + if (this.photonNameserverOverrides == null) { + this.photonNameserverOverrides = new ArrayList<>(); + } this.photonNameserverOverrides.add(photonNameserverOverridesItem); return this; } - /** + /** * Unknown * @return photonNameserverOverrides - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public List getPhotonNameserverOverrides() { return photonNameserverOverrides; } - - public void setPhotonNameserverOverrides(List photonNameserverOverrides) { + public void setPhotonNameserverOverrides(@javax.annotation.Nonnull List photonNameserverOverrides) { this.photonNameserverOverrides = photonNameserverOverrides; } - public APIConfig photonPublicKeys(List photonPublicKeys) { - + public APIConfig photonPublicKeys(@javax.annotation.Nonnull List photonPublicKeys) { this.photonPublicKeys = photonPublicKeys; return this; } public APIConfig addPhotonPublicKeysItem(String photonPublicKeysItem) { + if (this.photonPublicKeys == null) { + this.photonPublicKeys = new ArrayList<>(); + } this.photonPublicKeys.add(photonPublicKeysItem); return this; } - /** + /** * Unknown * @return photonPublicKeys - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public List getPhotonPublicKeys() { return photonPublicKeys; } - - public void setPhotonPublicKeys(List photonPublicKeys) { + public void setPhotonPublicKeys(@javax.annotation.Nonnull List photonPublicKeys) { this.photonPublicKeys = photonPublicKeys; } - public APIConfig playerUrlResolverSha1(String playerUrlResolverSha1) { - + public APIConfig playerUrlResolverSha1(@javax.annotation.Nonnull String playerUrlResolverSha1) { this.playerUrlResolverSha1 = playerUrlResolverSha1; return this; } - /** + /** * Currently used youtube-dl.exe hash in SHA1-delimited format * @return playerUrlResolverSha1 - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Currently used youtube-dl.exe hash in SHA1-delimited format") - public String getPlayerUrlResolverSha1() { return playerUrlResolverSha1; } - - public void setPlayerUrlResolverSha1(String playerUrlResolverSha1) { + public void setPlayerUrlResolverSha1(@javax.annotation.Nonnull String playerUrlResolverSha1) { this.playerUrlResolverSha1 = playerUrlResolverSha1; } - public APIConfig playerUrlResolverVersion(String playerUrlResolverVersion) { - + public APIConfig playerUrlResolverVersion(@javax.annotation.Nonnull String playerUrlResolverVersion) { this.playerUrlResolverVersion = playerUrlResolverVersion; return this; } - /** + /** * Currently used youtube-dl.exe version * @return playerUrlResolverVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Currently used youtube-dl.exe version") - public String getPlayerUrlResolverVersion() { return playerUrlResolverVersion; } - - public void setPlayerUrlResolverVersion(String playerUrlResolverVersion) { + public void setPlayerUrlResolverVersion(@javax.annotation.Nonnull String playerUrlResolverVersion) { this.playerUrlResolverVersion = playerUrlResolverVersion; } - public APIConfig publicKey(String publicKey) { - + public APIConfig publicKey(@javax.annotation.Nonnull String publicKey) { this.publicKey = publicKey; return this; } - /** + /** * Public key, hex encoded * @return publicKey - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Public key, hex encoded") - public String getPublicKey() { return publicKey; } - - public void setPublicKey(String publicKey) { + public void setPublicKey(@javax.annotation.Nonnull String publicKey) { this.publicKey = publicKey; } - public APIConfig reportCategories(Map reportCategories) { - + public APIConfig reportCategories(@javax.annotation.Nonnull Map reportCategories) { this.reportCategories = reportCategories; return this; } public APIConfig putReportCategoriesItem(String key, ReportCategory reportCategoriesItem) { + if (this.reportCategories == null) { + this.reportCategories = new HashMap<>(); + } this.reportCategories.put(key, reportCategoriesItem); return this; } - /** + /** * Categories available for reporting objectionable content * @return reportCategories - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Categories available for reporting objectionable content") - public Map getReportCategories() { return reportCategories; } - - public void setReportCategories(Map reportCategories) { + public void setReportCategories(@javax.annotation.Nonnull Map reportCategories) { this.reportCategories = reportCategories; } - public APIConfig reportFormUrl(String reportFormUrl) { - + public APIConfig reportFormUrl(@javax.annotation.Nonnull String reportFormUrl) { this.reportFormUrl = reportFormUrl; return this; } - /** + /** * URL to the report form * @return reportFormUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "URL to the report form") - public String getReportFormUrl() { return reportFormUrl; } - - public void setReportFormUrl(String reportFormUrl) { + public void setReportFormUrl(@javax.annotation.Nonnull String reportFormUrl) { this.reportFormUrl = reportFormUrl; } - public APIConfig reportOptions(Map>> reportOptions) { - + public APIConfig reportOptions(@javax.annotation.Nonnull Map>> reportOptions) { this.reportOptions = reportOptions; return this; } public APIConfig putReportOptionsItem(String key, Map> reportOptionsItem) { + if (this.reportOptions == null) { + this.reportOptions = new HashMap<>(); + } this.reportOptions.put(key, reportOptionsItem); return this; } - /** + /** * Options for reporting content. Select a key+value from this mapping as the `type` of the report. Select one key+value from the object at reportOptions[type] as the `category` of the report. reportCategories[category] contains user-facing text to display for all possible categories. Select one value from the array at reportOptions[type][category] as the `reason` of the report. reportReasons[reason] contains user-facing text to display for all possible categories. * @return reportOptions - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Options for reporting content. Select a key+value from this mapping as the `type` of the report. Select one key+value from the object at reportOptions[type] as the `category` of the report. reportCategories[category] contains user-facing text to display for all possible categories. Select one value from the array at reportOptions[type][category] as the `reason` of the report. reportReasons[reason] contains user-facing text to display for all possible categories.") - public Map>> getReportOptions() { return reportOptions; } - - public void setReportOptions(Map>> reportOptions) { + public void setReportOptions(@javax.annotation.Nonnull Map>> reportOptions) { this.reportOptions = reportOptions; } - public APIConfig reportReasons(Map reportReasons) { - + public APIConfig reportReasons(@javax.annotation.Nonnull Map reportReasons) { this.reportReasons = reportReasons; return this; } public APIConfig putReportReasonsItem(String key, ReportReason reportReasonsItem) { + if (this.reportReasons == null) { + this.reportReasons = new HashMap<>(); + } this.reportReasons.put(key, reportReasonsItem); return this; } - /** + /** * Reasons available for submitting a report * @return reportReasons - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Reasons available for submitting a report") - public Map getReportReasons() { return reportReasons; } - - public void setReportReasons(Map reportReasons) { + public void setReportReasons(@javax.annotation.Nonnull Map reportReasons) { this.reportReasons = reportReasons; } - public APIConfig requireAgeVerificationBetaTag(Boolean requireAgeVerificationBetaTag) { - + public APIConfig requireAgeVerificationBetaTag(@javax.annotation.Nonnull Boolean requireAgeVerificationBetaTag) { this.requireAgeVerificationBetaTag = requireAgeVerificationBetaTag; return this; } - /** + /** * Get requireAgeVerificationBetaTag * @return requireAgeVerificationBetaTag - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getRequireAgeVerificationBetaTag() { return requireAgeVerificationBetaTag; } - - public void setRequireAgeVerificationBetaTag(Boolean requireAgeVerificationBetaTag) { + public void setRequireAgeVerificationBetaTag(@javax.annotation.Nonnull Boolean requireAgeVerificationBetaTag) { this.requireAgeVerificationBetaTag = requireAgeVerificationBetaTag; } - public APIConfig sdkDeveloperFaqUrl(String sdkDeveloperFaqUrl) { - + public APIConfig sdkDeveloperFaqUrl(@javax.annotation.Nonnull String sdkDeveloperFaqUrl) { this.sdkDeveloperFaqUrl = sdkDeveloperFaqUrl; return this; } - /** + /** * Link to the developer FAQ * @return sdkDeveloperFaqUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Link to the developer FAQ") - public String getSdkDeveloperFaqUrl() { return sdkDeveloperFaqUrl; } - - public void setSdkDeveloperFaqUrl(String sdkDeveloperFaqUrl) { + public void setSdkDeveloperFaqUrl(@javax.annotation.Nonnull String sdkDeveloperFaqUrl) { this.sdkDeveloperFaqUrl = sdkDeveloperFaqUrl; } - public APIConfig sdkDiscordUrl(String sdkDiscordUrl) { - + public APIConfig sdkDiscordUrl(@javax.annotation.Nonnull String sdkDiscordUrl) { this.sdkDiscordUrl = sdkDiscordUrl; return this; } - /** + /** * Link to the official VRChat Discord * @return sdkDiscordUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Link to the official VRChat Discord") - public String getSdkDiscordUrl() { return sdkDiscordUrl; } - - public void setSdkDiscordUrl(String sdkDiscordUrl) { + public void setSdkDiscordUrl(@javax.annotation.Nonnull String sdkDiscordUrl) { this.sdkDiscordUrl = sdkDiscordUrl; } - public APIConfig sdkNotAllowedToPublishMessage(String sdkNotAllowedToPublishMessage) { - + public APIConfig sdkNotAllowedToPublishMessage(@javax.annotation.Nonnull String sdkNotAllowedToPublishMessage) { this.sdkNotAllowedToPublishMessage = sdkNotAllowedToPublishMessage; return this; } - /** + /** * Used in the SDK to notify a user they aren't allowed to upload avatars/worlds yet * @return sdkNotAllowedToPublishMessage - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Used in the SDK to notify a user they aren't allowed to upload avatars/worlds yet") - public String getSdkNotAllowedToPublishMessage() { return sdkNotAllowedToPublishMessage; } - - public void setSdkNotAllowedToPublishMessage(String sdkNotAllowedToPublishMessage) { + public void setSdkNotAllowedToPublishMessage(@javax.annotation.Nonnull String sdkNotAllowedToPublishMessage) { this.sdkNotAllowedToPublishMessage = sdkNotAllowedToPublishMessage; } - public APIConfig sdkUnityVersion(String sdkUnityVersion) { - + public APIConfig sdkUnityVersion(@javax.annotation.Nonnull String sdkUnityVersion) { this.sdkUnityVersion = sdkUnityVersion; return this; } - /** + /** * Unity version supported by the SDK * @return sdkUnityVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unity version supported by the SDK") - public String getSdkUnityVersion() { return sdkUnityVersion; } - - public void setSdkUnityVersion(String sdkUnityVersion) { + public void setSdkUnityVersion(@javax.annotation.Nonnull String sdkUnityVersion) { this.sdkUnityVersion = sdkUnityVersion; } - public APIConfig stringHostUrlList(List stringHostUrlList) { - + public APIConfig stringHostUrlList(@javax.annotation.Nonnull List stringHostUrlList) { this.stringHostUrlList = stringHostUrlList; return this; } public APIConfig addStringHostUrlListItem(String stringHostUrlListItem) { + if (this.stringHostUrlList == null) { + this.stringHostUrlList = new ArrayList<>(); + } this.stringHostUrlList.add(stringHostUrlListItem); return this; } - /** + /** * A list of explicitly allowed origins that worlds can request strings from via the Udon's [VRCStringDownloader.LoadUrl](https://creators.vrchat.com/worlds/udon/string-loading/#ivrcstringdownload). * @return stringHostUrlList - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "A list of explicitly allowed origins that worlds can request strings from via the Udon's [VRCStringDownloader.LoadUrl](https://creators.vrchat.com/worlds/udon/string-loading/#ivrcstringdownload).") - public List getStringHostUrlList() { return stringHostUrlList; } - - public void setStringHostUrlList(List stringHostUrlList) { + public void setStringHostUrlList(@javax.annotation.Nonnull List stringHostUrlList) { this.stringHostUrlList = stringHostUrlList; } - public APIConfig supportEmail(String supportEmail) { - + public APIConfig supportEmail(@javax.annotation.Nonnull String supportEmail) { this.supportEmail = supportEmail; return this; } - /** + /** * VRChat's support email * @return supportEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's support email") - public String getSupportEmail() { return supportEmail; } - - public void setSupportEmail(String supportEmail) { + public void setSupportEmail(@javax.annotation.Nonnull String supportEmail) { this.supportEmail = supportEmail; } - public APIConfig supportFormUrl(String supportFormUrl) { - + public APIConfig supportFormUrl(@javax.annotation.Nonnull String supportFormUrl) { this.supportFormUrl = supportFormUrl; return this; } - /** + /** * VRChat's support form * @return supportFormUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's support form") - public String getSupportFormUrl() { return supportFormUrl; } - - public void setSupportFormUrl(String supportFormUrl) { + public void setSupportFormUrl(@javax.annotation.Nonnull String supportFormUrl) { this.supportFormUrl = supportFormUrl; } - public APIConfig timeOutWorldId(String timeOutWorldId) { - + public APIConfig timeOutWorldId(@javax.annotation.Nonnull String timeOutWorldId) { this.timeOutWorldId = timeOutWorldId; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return timeOutWorldId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getTimeOutWorldId() { return timeOutWorldId; } - - public void setTimeOutWorldId(String timeOutWorldId) { + public void setTimeOutWorldId(@javax.annotation.Nonnull String timeOutWorldId) { this.timeOutWorldId = timeOutWorldId; } - public APIConfig timekeeping(Boolean timekeeping) { - + public APIConfig timekeeping(@javax.annotation.Nonnull Boolean timekeeping) { this.timekeeping = timekeeping; return this; } - /** + /** * Unknown * @return timekeeping - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Boolean getTimekeeping() { return timekeeping; } - - public void setTimekeeping(Boolean timekeeping) { + public void setTimekeeping(@javax.annotation.Nonnull Boolean timekeeping) { this.timekeeping = timekeeping; } - public APIConfig tutorialWorldId(String tutorialWorldId) { - + public APIConfig tutorialWorldId(@javax.annotation.Nonnull String tutorialWorldId) { this.tutorialWorldId = tutorialWorldId; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return tutorialWorldId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getTutorialWorldId() { return tutorialWorldId; } - - public void setTutorialWorldId(String tutorialWorldId) { + public void setTutorialWorldId(@javax.annotation.Nonnull String tutorialWorldId) { this.tutorialWorldId = tutorialWorldId; } - public APIConfig updateRateMsMaximum(Integer updateRateMsMaximum) { - + public APIConfig updateRateMsMaximum(@javax.annotation.Nonnull Integer updateRateMsMaximum) { this.updateRateMsMaximum = updateRateMsMaximum; return this; } - /** + /** * Unknown * @return updateRateMsMaximum - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getUpdateRateMsMaximum() { return updateRateMsMaximum; } - - public void setUpdateRateMsMaximum(Integer updateRateMsMaximum) { + public void setUpdateRateMsMaximum(@javax.annotation.Nonnull Integer updateRateMsMaximum) { this.updateRateMsMaximum = updateRateMsMaximum; } - public APIConfig updateRateMsMinimum(Integer updateRateMsMinimum) { - + public APIConfig updateRateMsMinimum(@javax.annotation.Nonnull Integer updateRateMsMinimum) { this.updateRateMsMinimum = updateRateMsMinimum; return this; } - /** + /** * Unknown * @return updateRateMsMinimum - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getUpdateRateMsMinimum() { return updateRateMsMinimum; } - - public void setUpdateRateMsMinimum(Integer updateRateMsMinimum) { + public void setUpdateRateMsMinimum(@javax.annotation.Nonnull Integer updateRateMsMinimum) { this.updateRateMsMinimum = updateRateMsMinimum; } - public APIConfig updateRateMsNormal(Integer updateRateMsNormal) { - + public APIConfig updateRateMsNormal(@javax.annotation.Nonnull Integer updateRateMsNormal) { this.updateRateMsNormal = updateRateMsNormal; return this; } - /** + /** * Unknown * @return updateRateMsNormal - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getUpdateRateMsNormal() { return updateRateMsNormal; } - - public void setUpdateRateMsNormal(Integer updateRateMsNormal) { + public void setUpdateRateMsNormal(@javax.annotation.Nonnull Integer updateRateMsNormal) { this.updateRateMsNormal = updateRateMsNormal; } - public APIConfig updateRateMsUdonManual(Integer updateRateMsUdonManual) { - + public APIConfig updateRateMsUdonManual(@javax.annotation.Nonnull Integer updateRateMsUdonManual) { this.updateRateMsUdonManual = updateRateMsUdonManual; return this; } - /** + /** * Unknown * @return updateRateMsUdonManual - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getUpdateRateMsUdonManual() { return updateRateMsUdonManual; } - - public void setUpdateRateMsUdonManual(Integer updateRateMsUdonManual) { + public void setUpdateRateMsUdonManual(@javax.annotation.Nonnull Integer updateRateMsUdonManual) { this.updateRateMsUdonManual = updateRateMsUdonManual; } - public APIConfig uploadAnalysisPercent(Integer uploadAnalysisPercent) { - + public APIConfig uploadAnalysisPercent(@javax.annotation.Nonnull Integer uploadAnalysisPercent) { this.uploadAnalysisPercent = uploadAnalysisPercent; return this; } - /** + /** * Unknown * @return uploadAnalysisPercent - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getUploadAnalysisPercent() { return uploadAnalysisPercent; } - - public void setUploadAnalysisPercent(Integer uploadAnalysisPercent) { + public void setUploadAnalysisPercent(@javax.annotation.Nonnull Integer uploadAnalysisPercent) { this.uploadAnalysisPercent = uploadAnalysisPercent; } - public APIConfig urlList(List urlList) { - + public APIConfig urlList(@javax.annotation.Nonnull List urlList) { this.urlList = urlList; return this; } public APIConfig addUrlListItem(String urlListItem) { + if (this.urlList == null) { + this.urlList = new ArrayList<>(); + } this.urlList.add(urlListItem); return this; } - /** + /** * List of allowed URLs that bypass the \"Allow untrusted URL's\" setting in-game * @return urlList - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "List of allowed URLs that bypass the \"Allow untrusted URL's\" setting in-game") - public List getUrlList() { return urlList; } - - public void setUrlList(List urlList) { + public void setUrlList(@javax.annotation.Nonnull List urlList) { this.urlList = urlList; } - public APIConfig useReliableUdpForVoice(Boolean useReliableUdpForVoice) { - + public APIConfig useReliableUdpForVoice(@javax.annotation.Nonnull Boolean useReliableUdpForVoice) { this.useReliableUdpForVoice = useReliableUdpForVoice; return this; } - /** + /** * Unknown * @return useReliableUdpForVoice - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Boolean getUseReliableUdpForVoice() { return useReliableUdpForVoice; } - - public void setUseReliableUdpForVoice(Boolean useReliableUdpForVoice) { + public void setUseReliableUdpForVoice(@javax.annotation.Nonnull Boolean useReliableUdpForVoice) { this.useReliableUdpForVoice = useReliableUdpForVoice; } - public APIConfig viveWindowsUrl(String viveWindowsUrl) { - + public APIConfig viveWindowsUrl(@javax.annotation.Nonnull String viveWindowsUrl) { this.viveWindowsUrl = viveWindowsUrl; return this; } - /** + /** * Download link for game on the Steam website. * @return viveWindowsUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Download link for game on the Steam website.") - public String getViveWindowsUrl() { return viveWindowsUrl; } - - public void setViveWindowsUrl(String viveWindowsUrl) { + public void setViveWindowsUrl(@javax.annotation.Nonnull String viveWindowsUrl) { this.viveWindowsUrl = viveWindowsUrl; } - public APIConfig websocketMaxFriendsRefreshDelay(Integer websocketMaxFriendsRefreshDelay) { - + public APIConfig websocketMaxFriendsRefreshDelay(@javax.annotation.Nonnull Integer websocketMaxFriendsRefreshDelay) { this.websocketMaxFriendsRefreshDelay = websocketMaxFriendsRefreshDelay; return this; } - /** + /** * Unknown * @return websocketMaxFriendsRefreshDelay - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getWebsocketMaxFriendsRefreshDelay() { return websocketMaxFriendsRefreshDelay; } - - public void setWebsocketMaxFriendsRefreshDelay(Integer websocketMaxFriendsRefreshDelay) { + public void setWebsocketMaxFriendsRefreshDelay(@javax.annotation.Nonnull Integer websocketMaxFriendsRefreshDelay) { this.websocketMaxFriendsRefreshDelay = websocketMaxFriendsRefreshDelay; } - public APIConfig websocketQuickReconnectTime(Integer websocketQuickReconnectTime) { - + public APIConfig websocketQuickReconnectTime(@javax.annotation.Nonnull Integer websocketQuickReconnectTime) { this.websocketQuickReconnectTime = websocketQuickReconnectTime; return this; } - /** + /** * Unknown * @return websocketQuickReconnectTime - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getWebsocketQuickReconnectTime() { return websocketQuickReconnectTime; } - - public void setWebsocketQuickReconnectTime(Integer websocketQuickReconnectTime) { + public void setWebsocketQuickReconnectTime(@javax.annotation.Nonnull Integer websocketQuickReconnectTime) { this.websocketQuickReconnectTime = websocketQuickReconnectTime; } - public APIConfig websocketReconnectMaxDelay(Integer websocketReconnectMaxDelay) { - + public APIConfig websocketReconnectMaxDelay(@javax.annotation.Nonnull Integer websocketReconnectMaxDelay) { this.websocketReconnectMaxDelay = websocketReconnectMaxDelay; return this; } - /** + /** * Unknown * @return websocketReconnectMaxDelay - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getWebsocketReconnectMaxDelay() { return websocketReconnectMaxDelay; } - - public void setWebsocketReconnectMaxDelay(Integer websocketReconnectMaxDelay) { + public void setWebsocketReconnectMaxDelay(@javax.annotation.Nonnull Integer websocketReconnectMaxDelay) { this.websocketReconnectMaxDelay = websocketReconnectMaxDelay; } - public APIConfig whiteListedAssetUrls(List whiteListedAssetUrls) { - + public APIConfig whiteListedAssetUrls(@javax.annotation.Nonnull List whiteListedAssetUrls) { this.whiteListedAssetUrls = whiteListedAssetUrls; return this; } public APIConfig addWhiteListedAssetUrlsItem(String whiteListedAssetUrlsItem) { + if (this.whiteListedAssetUrls == null) { + this.whiteListedAssetUrls = new ArrayList<>(); + } this.whiteListedAssetUrls.add(whiteListedAssetUrlsItem); return this; } - /** + /** * List of allowed URLs that are allowed to host avatar assets * @return whiteListedAssetUrls - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "List of allowed URLs that are allowed to host avatar assets") - public List getWhiteListedAssetUrls() { return whiteListedAssetUrls; } - - public void setWhiteListedAssetUrls(List whiteListedAssetUrls) { + public void setWhiteListedAssetUrls(@javax.annotation.Nonnull List whiteListedAssetUrls) { this.whiteListedAssetUrls = whiteListedAssetUrls; } @@ -3842,10 +3514,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -3854,482 +3523,245 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CampaignStatus"); - openapiFields.add("DisableBackgroundPreloads"); - openapiFields.add("LocationGiftingNonSubPrioEnabled"); - openapiFields.add("VoiceEnableDegradation"); - openapiFields.add("VoiceEnableReceiverLimiting"); - openapiFields.add("accessLogsUrls"); - openapiFields.add("address"); - openapiFields.add("ageVerificationInviteVisible"); - openapiFields.add("ageVerificationP"); - openapiFields.add("ageVerificationStatusVisible"); - openapiFields.add("analysisMaxRetries"); - openapiFields.add("analysisRetryInterval"); - openapiFields.add("analyticsSegment_NewUI_PctOfUsers"); - openapiFields.add("analyticsSegment_NewUI_Salt"); - openapiFields.add("announcements"); - openapiFields.add("audioConfig"); - openapiFields.add("availableLanguageCodes"); - openapiFields.add("availableLanguages"); - openapiFields.add("avatarPerfLimiter"); - openapiFields.add("chatboxLogBufferSeconds"); - openapiFields.add("clientApiKey"); - openapiFields.add("clientBPSCeiling"); - openapiFields.add("clientDisconnectTimeout"); - openapiFields.add("clientNetDispatchThread"); - openapiFields.add("clientNetDispatchThreadMobile"); - openapiFields.add("clientNetInThread"); - openapiFields.add("clientNetInThread2"); - openapiFields.add("clientNetInThreadMobile"); - openapiFields.add("clientNetInThreadMobile2"); - openapiFields.add("clientNetOutThread"); - openapiFields.add("clientNetOutThread2"); - openapiFields.add("clientNetOutThreadMobile"); - openapiFields.add("clientNetOutThreadMobile2"); - openapiFields.add("clientQR"); - openapiFields.add("clientReservedPlayerBPS"); - openapiFields.add("clientSentCountAllowance"); - openapiFields.add("constants"); - openapiFields.add("contactEmail"); - openapiFields.add("copyrightEmail"); - openapiFields.add("copyrightFormUrl"); - openapiFields.add("currentPrivacyVersion"); - openapiFields.add("currentTOSVersion"); - openapiFields.add("defaultAvatar"); - openapiFields.add("defaultStickerSet"); - openapiFields.add("devLanguageCodes"); - openapiFields.add("devSdkUrl"); - openapiFields.add("devSdkVersion"); - openapiFields.add("dis-countdown"); - openapiFields.add("disableAVProInProton"); - openapiFields.add("disableAvatarCopying"); - openapiFields.add("disableAvatarGating"); - openapiFields.add("disableCaptcha"); - openapiFields.add("disableCommunityLabs"); - openapiFields.add("disableCommunityLabsPromotion"); - openapiFields.add("disableEmail"); - openapiFields.add("disableEventStream"); - openapiFields.add("disableFeedbackGating"); - openapiFields.add("disableFrontendBuilds"); - openapiFields.add("disableGiftDrops"); - openapiFields.add("disableHello"); - openapiFields.add("disableOculusSubs"); - openapiFields.add("disableRegistration"); - openapiFields.add("disableSteamNetworking"); - openapiFields.add("disableTwoFactorAuth"); - openapiFields.add("disableUdon"); - openapiFields.add("disableUpgradeAccount"); - openapiFields.add("downloadLinkWindows"); - openapiFields.add("downloadUrls"); - openapiFields.add("dynamicWorldRows"); - openapiFields.add("economyLedgerBackfill"); - openapiFields.add("economyLedgerMigrationStop"); - openapiFields.add("economyLedgerMode"); - openapiFields.add("economyPauseEnd"); - openapiFields.add("economyPauseStart"); - openapiFields.add("economyPurchaseRepairEnabled"); - openapiFields.add("economyState"); - openapiFields.add("events"); - openapiFields.add("forceUseLatestWorld"); - openapiFields.add("giftDisplayType"); - openapiFields.add("googleApiClientId"); - openapiFields.add("homeWorldId"); - openapiFields.add("homepageRedirectTarget"); - openapiFields.add("hubWorldId"); - openapiFields.add("imageHostUrlList"); - openapiFields.add("iosAppVersion"); - openapiFields.add("iosVersion"); - openapiFields.add("jobsEmail"); - openapiFields.add("maxUserEmoji"); - openapiFields.add("maxUserStickers"); - openapiFields.add("minSupportedClientBuildNumber"); - openapiFields.add("minimumUnityVersionForUploads"); - openapiFields.add("moderationEmail"); - openapiFields.add("notAllowedToSelectAvatarInPrivateWorldMessage"); - openapiFields.add("offlineAnalysis"); - openapiFields.add("photonNameserverOverrides"); - openapiFields.add("photonPublicKeys"); - openapiFields.add("player-url-resolver-sha1"); - openapiFields.add("player-url-resolver-version"); - openapiFields.add("publicKey"); - openapiFields.add("reportCategories"); - openapiFields.add("reportFormUrl"); - openapiFields.add("reportOptions"); - openapiFields.add("reportReasons"); - openapiFields.add("requireAgeVerificationBetaTag"); - openapiFields.add("sdkDeveloperFaqUrl"); - openapiFields.add("sdkDiscordUrl"); - openapiFields.add("sdkNotAllowedToPublishMessage"); - openapiFields.add("sdkUnityVersion"); - openapiFields.add("stringHostUrlList"); - openapiFields.add("supportEmail"); - openapiFields.add("supportFormUrl"); - openapiFields.add("timeOutWorldId"); - openapiFields.add("timekeeping"); - openapiFields.add("tutorialWorldId"); - openapiFields.add("updateRateMsMaximum"); - openapiFields.add("updateRateMsMinimum"); - openapiFields.add("updateRateMsNormal"); - openapiFields.add("updateRateMsUdonManual"); - openapiFields.add("uploadAnalysisPercent"); - openapiFields.add("urlList"); - openapiFields.add("useReliableUdpForVoice"); - openapiFields.add("viveWindowsUrl"); - openapiFields.add("websocketMaxFriendsRefreshDelay"); - openapiFields.add("websocketQuickReconnectTime"); - openapiFields.add("websocketReconnectMaxDelay"); - openapiFields.add("whiteListedAssetUrls"); + openapiFields = new HashSet(Arrays.asList("CampaignStatus", "DisableBackgroundPreloads", "LocationGiftingNonSubPrioEnabled", "VoiceEnableDegradation", "VoiceEnableReceiverLimiting", "accessLogsUrls", "address", "ageVerificationInviteVisible", "ageVerificationP", "ageVerificationStatusVisible", "analysisMaxRetries", "analysisRetryInterval", "analyticsSegment_NewUI_PctOfUsers", "analyticsSegment_NewUI_Salt", "announcements", "audioConfig", "availableLanguageCodes", "availableLanguages", "avatarPerfLimiter", "chatboxLogBufferSeconds", "clientApiKey", "clientBPSCeiling", "clientDisconnectTimeout", "clientNetDispatchThread", "clientNetDispatchThreadMobile", "clientNetInThread", "clientNetInThread2", "clientNetInThreadMobile", "clientNetInThreadMobile2", "clientNetOutThread", "clientNetOutThread2", "clientNetOutThreadMobile", "clientNetOutThreadMobile2", "clientQR", "clientReservedPlayerBPS", "clientSentCountAllowance", "constants", "contactEmail", "copyrightEmail", "copyrightFormUrl", "currentPrivacyVersion", "currentTOSVersion", "defaultAvatar", "defaultStickerSet", "devLanguageCodes", "devSdkUrl", "devSdkVersion", "dis-countdown", "disableAVProInProton", "disableAvatarCopying", "disableAvatarGating", "disableCaptcha", "disableCommunityLabs", "disableCommunityLabsPromotion", "disableEmail", "disableEventStream", "disableFeedbackGating", "disableFrontendBuilds", "disableGiftDrops", "disableHello", "disableOculusSubs", "disableRegistration", "disableSteamNetworking", "disableTwoFactorAuth", "disableUdon", "disableUpgradeAccount", "downloadLinkWindows", "downloadUrls", "dynamicWorldRows", "economyLedgerBackfill", "economyLedgerMigrationStop", "economyLedgerMode", "economyPauseEnd", "economyPauseStart", "economyPurchaseRepairEnabled", "economyState", "events", "forceUseLatestWorld", "giftDisplayType", "googleApiClientId", "homeWorldId", "homepageRedirectTarget", "hubWorldId", "imageHostUrlList", "iosAppVersion", "iosVersion", "jobsEmail", "maxUserEmoji", "maxUserStickers", "minSupportedClientBuildNumber", "minimumUnityVersionForUploads", "moderationEmail", "notAllowedToSelectAvatarInPrivateWorldMessage", "offlineAnalysis", "photonNameserverOverrides", "photonPublicKeys", "player-url-resolver-sha1", "player-url-resolver-version", "publicKey", "reportCategories", "reportFormUrl", "reportOptions", "reportReasons", "requireAgeVerificationBetaTag", "sdkDeveloperFaqUrl", "sdkDiscordUrl", "sdkNotAllowedToPublishMessage", "sdkUnityVersion", "stringHostUrlList", "supportEmail", "supportFormUrl", "timeOutWorldId", "timekeeping", "tutorialWorldId", "updateRateMsMaximum", "updateRateMsMinimum", "updateRateMsNormal", "updateRateMsUdonManual", "uploadAnalysisPercent", "urlList", "useReliableUdpForVoice", "viveWindowsUrl", "websocketMaxFriendsRefreshDelay", "websocketQuickReconnectTime", "websocketReconnectMaxDelay", "whiteListedAssetUrls")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("CampaignStatus"); - openapiRequiredFields.add("DisableBackgroundPreloads"); - openapiRequiredFields.add("LocationGiftingNonSubPrioEnabled"); - openapiRequiredFields.add("VoiceEnableDegradation"); - openapiRequiredFields.add("VoiceEnableReceiverLimiting"); - openapiRequiredFields.add("accessLogsUrls"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("ageVerificationInviteVisible"); - openapiRequiredFields.add("ageVerificationP"); - openapiRequiredFields.add("ageVerificationStatusVisible"); - openapiRequiredFields.add("analysisMaxRetries"); - openapiRequiredFields.add("analysisRetryInterval"); - openapiRequiredFields.add("analyticsSegment_NewUI_PctOfUsers"); - openapiRequiredFields.add("analyticsSegment_NewUI_Salt"); - openapiRequiredFields.add("announcements"); - openapiRequiredFields.add("availableLanguageCodes"); - openapiRequiredFields.add("availableLanguages"); - openapiRequiredFields.add("avatarPerfLimiter"); - openapiRequiredFields.add("chatboxLogBufferSeconds"); - openapiRequiredFields.add("clientApiKey"); - openapiRequiredFields.add("clientBPSCeiling"); - openapiRequiredFields.add("clientDisconnectTimeout"); - openapiRequiredFields.add("clientNetDispatchThreadMobile"); - openapiRequiredFields.add("clientReservedPlayerBPS"); - openapiRequiredFields.add("clientSentCountAllowance"); - openapiRequiredFields.add("constants"); - openapiRequiredFields.add("contactEmail"); - openapiRequiredFields.add("copyrightEmail"); - openapiRequiredFields.add("copyrightFormUrl"); - openapiRequiredFields.add("currentPrivacyVersion"); - openapiRequiredFields.add("currentTOSVersion"); - openapiRequiredFields.add("defaultAvatar"); - openapiRequiredFields.add("defaultStickerSet"); - openapiRequiredFields.add("devSdkUrl"); - openapiRequiredFields.add("devSdkVersion"); - openapiRequiredFields.add("dis-countdown"); - openapiRequiredFields.add("disableAvatarCopying"); - openapiRequiredFields.add("disableAvatarGating"); - openapiRequiredFields.add("disableCommunityLabs"); - openapiRequiredFields.add("disableCommunityLabsPromotion"); - openapiRequiredFields.add("disableEmail"); - openapiRequiredFields.add("disableEventStream"); - openapiRequiredFields.add("disableFeedbackGating"); - openapiRequiredFields.add("disableFrontendBuilds"); - openapiRequiredFields.add("disableGiftDrops"); - openapiRequiredFields.add("disableHello"); - openapiRequiredFields.add("disableOculusSubs"); - openapiRequiredFields.add("disableRegistration"); - openapiRequiredFields.add("disableSteamNetworking"); - openapiRequiredFields.add("disableTwoFactorAuth"); - openapiRequiredFields.add("disableUdon"); - openapiRequiredFields.add("disableUpgradeAccount"); - openapiRequiredFields.add("downloadLinkWindows"); - openapiRequiredFields.add("downloadUrls"); - openapiRequiredFields.add("dynamicWorldRows"); - openapiRequiredFields.add("economyLedgerBackfill"); - openapiRequiredFields.add("economyLedgerMigrationStop"); - openapiRequiredFields.add("economyLedgerMode"); - openapiRequiredFields.add("economyPauseEnd"); - openapiRequiredFields.add("economyPauseStart"); - openapiRequiredFields.add("economyPurchaseRepairEnabled"); - openapiRequiredFields.add("economyState"); - openapiRequiredFields.add("events"); - openapiRequiredFields.add("forceUseLatestWorld"); - openapiRequiredFields.add("giftDisplayType"); - openapiRequiredFields.add("googleApiClientId"); - openapiRequiredFields.add("homeWorldId"); - openapiRequiredFields.add("homepageRedirectTarget"); - openapiRequiredFields.add("hubWorldId"); - openapiRequiredFields.add("imageHostUrlList"); - openapiRequiredFields.add("iosAppVersion"); - openapiRequiredFields.add("iosVersion"); - openapiRequiredFields.add("jobsEmail"); - openapiRequiredFields.add("maxUserEmoji"); - openapiRequiredFields.add("maxUserStickers"); - openapiRequiredFields.add("minSupportedClientBuildNumber"); - openapiRequiredFields.add("minimumUnityVersionForUploads"); - openapiRequiredFields.add("moderationEmail"); - openapiRequiredFields.add("notAllowedToSelectAvatarInPrivateWorldMessage"); - openapiRequiredFields.add("offlineAnalysis"); - openapiRequiredFields.add("photonNameserverOverrides"); - openapiRequiredFields.add("photonPublicKeys"); - openapiRequiredFields.add("player-url-resolver-sha1"); - openapiRequiredFields.add("player-url-resolver-version"); - openapiRequiredFields.add("publicKey"); - openapiRequiredFields.add("reportCategories"); - openapiRequiredFields.add("reportFormUrl"); - openapiRequiredFields.add("reportOptions"); - openapiRequiredFields.add("reportReasons"); - openapiRequiredFields.add("requireAgeVerificationBetaTag"); - openapiRequiredFields.add("sdkDeveloperFaqUrl"); - openapiRequiredFields.add("sdkDiscordUrl"); - openapiRequiredFields.add("sdkNotAllowedToPublishMessage"); - openapiRequiredFields.add("sdkUnityVersion"); - openapiRequiredFields.add("stringHostUrlList"); - openapiRequiredFields.add("supportEmail"); - openapiRequiredFields.add("supportFormUrl"); - openapiRequiredFields.add("timeOutWorldId"); - openapiRequiredFields.add("timekeeping"); - openapiRequiredFields.add("tutorialWorldId"); - openapiRequiredFields.add("updateRateMsMaximum"); - openapiRequiredFields.add("updateRateMsMinimum"); - openapiRequiredFields.add("updateRateMsNormal"); - openapiRequiredFields.add("updateRateMsUdonManual"); - openapiRequiredFields.add("uploadAnalysisPercent"); - openapiRequiredFields.add("urlList"); - openapiRequiredFields.add("useReliableUdpForVoice"); - openapiRequiredFields.add("viveWindowsUrl"); - openapiRequiredFields.add("websocketMaxFriendsRefreshDelay"); - openapiRequiredFields.add("websocketQuickReconnectTime"); - openapiRequiredFields.add("websocketReconnectMaxDelay"); - openapiRequiredFields.add("whiteListedAssetUrls"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfig - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfig is not found in the empty JSON string", APIConfig.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("CampaignStatus", "DisableBackgroundPreloads", "LocationGiftingNonSubPrioEnabled", "VoiceEnableDegradation", "VoiceEnableReceiverLimiting", "accessLogsUrls", "address", "ageVerificationInviteVisible", "ageVerificationP", "ageVerificationStatusVisible", "analysisMaxRetries", "analysisRetryInterval", "analyticsSegment_NewUI_PctOfUsers", "analyticsSegment_NewUI_Salt", "announcements", "availableLanguageCodes", "availableLanguages", "avatarPerfLimiter", "chatboxLogBufferSeconds", "clientApiKey", "clientBPSCeiling", "clientDisconnectTimeout", "clientNetDispatchThreadMobile", "clientReservedPlayerBPS", "clientSentCountAllowance", "constants", "contactEmail", "copyrightEmail", "copyrightFormUrl", "currentPrivacyVersion", "currentTOSVersion", "defaultAvatar", "defaultStickerSet", "devSdkUrl", "devSdkVersion", "dis-countdown", "disableAvatarCopying", "disableAvatarGating", "disableCommunityLabs", "disableCommunityLabsPromotion", "disableEmail", "disableEventStream", "disableFeedbackGating", "disableFrontendBuilds", "disableGiftDrops", "disableHello", "disableOculusSubs", "disableRegistration", "disableSteamNetworking", "disableTwoFactorAuth", "disableUdon", "disableUpgradeAccount", "downloadLinkWindows", "downloadUrls", "dynamicWorldRows", "economyLedgerBackfill", "economyLedgerMigrationStop", "economyLedgerMode", "economyPauseEnd", "economyPauseStart", "economyPurchaseRepairEnabled", "economyState", "events", "forceUseLatestWorld", "giftDisplayType", "googleApiClientId", "homeWorldId", "homepageRedirectTarget", "hubWorldId", "imageHostUrlList", "iosAppVersion", "iosVersion", "jobsEmail", "maxUserEmoji", "maxUserStickers", "minSupportedClientBuildNumber", "minimumUnityVersionForUploads", "moderationEmail", "notAllowedToSelectAvatarInPrivateWorldMessage", "offlineAnalysis", "photonNameserverOverrides", "photonPublicKeys", "player-url-resolver-sha1", "player-url-resolver-version", "publicKey", "reportCategories", "reportFormUrl", "reportOptions", "reportReasons", "requireAgeVerificationBetaTag", "sdkDeveloperFaqUrl", "sdkDiscordUrl", "sdkNotAllowedToPublishMessage", "sdkUnityVersion", "stringHostUrlList", "supportEmail", "supportFormUrl", "timeOutWorldId", "timekeeping", "tutorialWorldId", "updateRateMsMaximum", "updateRateMsMinimum", "updateRateMsNormal", "updateRateMsUdonManual", "uploadAnalysisPercent", "urlList", "useReliableUdpForVoice", "viveWindowsUrl", "websocketMaxFriendsRefreshDelay", "websocketQuickReconnectTime", "websocketReconnectMaxDelay", "whiteListedAssetUrls")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfig is not found in the empty JSON string", APIConfig.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : APIConfig.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("CampaignStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `CampaignStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("CampaignStatus").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `CampaignStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("CampaignStatus").toString())); } // validate the required field `accessLogsUrls` - APIConfigAccessLogsUrls.validateJsonObject(jsonObj.getAsJsonObject("accessLogsUrls")); + APIConfigAccessLogsUrls.validateJsonElement(jsonObj.get("accessLogsUrls")); if (!jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if (!jsonObj.get("analyticsSegment_NewUI_Salt").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `analyticsSegment_NewUI_Salt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("analyticsSegment_NewUI_Salt").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `analyticsSegment_NewUI_Salt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("analyticsSegment_NewUI_Salt").toString())); } - // ensure the json data is an array - if (!jsonObj.get("announcements").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `announcements` to be an array in the JSON string but got `%s`", jsonObj.get("announcements").toString())); + if (jsonObj.get("announcements") != null) { + if (!jsonObj.get("announcements").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `announcements` to be an array in the JSON string but got `%s`", jsonObj.get("announcements").toString())); + } + JsonArray jsonArrayannouncements = jsonObj.getAsJsonArray("announcements"); + // validate the required field `announcements` (array) + for (int i = 0; i < jsonArrayannouncements.size(); i++) { + APIConfigAnnouncement.validateJsonElement(jsonArrayannouncements.get(i)); + } } - - JsonArray jsonArrayannouncements = jsonObj.getAsJsonArray("announcements"); - // validate the required field `announcements` (array) - for (int i = 0; i < jsonArrayannouncements.size(); i++) { - APIConfigAnnouncement.validateJsonObject(jsonArrayannouncements.get(i).getAsJsonObject()); - }; // validate the optional field `audioConfig` if (jsonObj.get("audioConfig") != null && !jsonObj.get("audioConfig").isJsonNull()) { - APIConfigAudioConfig.validateJsonObject(jsonObj.getAsJsonObject("audioConfig")); + APIConfigAudioConfig.validateJsonElement(jsonObj.get("audioConfig")); } // ensure the required json array is present if (jsonObj.get("availableLanguageCodes") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("availableLanguageCodes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `availableLanguageCodes` to be an array in the JSON string but got `%s`", jsonObj.get("availableLanguageCodes").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `availableLanguageCodes` to be an array in the JSON string but got `%s`", jsonObj.get("availableLanguageCodes").toString())); } // ensure the required json array is present if (jsonObj.get("availableLanguages") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("availableLanguages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `availableLanguages` to be an array in the JSON string but got `%s`", jsonObj.get("availableLanguages").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `availableLanguages` to be an array in the JSON string but got `%s`", jsonObj.get("availableLanguages").toString())); } // validate the required field `avatarPerfLimiter` - APIConfigAvatarPerfLimiter.validateJsonObject(jsonObj.getAsJsonObject("avatarPerfLimiter")); + APIConfigAvatarPerfLimiter.validateJsonElement(jsonObj.get("avatarPerfLimiter")); if (!jsonObj.get("clientApiKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clientApiKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clientApiKey").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `clientApiKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clientApiKey").toString())); } // validate the required field `constants` - APIConfigConstants.validateJsonObject(jsonObj.getAsJsonObject("constants")); + APIConfigConstants.validateJsonElement(jsonObj.get("constants")); if (!jsonObj.get("contactEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contactEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contactEmail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contactEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contactEmail").toString())); } if (!jsonObj.get("copyrightEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `copyrightEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("copyrightEmail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `copyrightEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("copyrightEmail").toString())); } if (!jsonObj.get("copyrightFormUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `copyrightFormUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("copyrightFormUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `copyrightFormUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("copyrightFormUrl").toString())); } if (!jsonObj.get("defaultAvatar").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `defaultAvatar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("defaultAvatar").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `defaultAvatar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("defaultAvatar").toString())); } if (!jsonObj.get("defaultStickerSet").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `defaultStickerSet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("defaultStickerSet").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `defaultStickerSet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("defaultStickerSet").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("devLanguageCodes") != null && !jsonObj.get("devLanguageCodes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `devLanguageCodes` to be an array in the JSON string but got `%s`", jsonObj.get("devLanguageCodes").toString())); + if (jsonObj.get("devLanguageCodes") != null && !jsonObj.get("devLanguageCodes").isJsonNull() && !jsonObj.get("devLanguageCodes").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `devLanguageCodes` to be an array in the JSON string but got `%s`", jsonObj.get("devLanguageCodes").toString())); } if (!jsonObj.get("devSdkUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `devSdkUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("devSdkUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `devSdkUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("devSdkUrl").toString())); } if (!jsonObj.get("devSdkVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `devSdkVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("devSdkVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `devSdkVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("devSdkVersion").toString())); } if (!jsonObj.get("downloadLinkWindows").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `downloadLinkWindows` to be a primitive type in the JSON string but got `%s`", jsonObj.get("downloadLinkWindows").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `downloadLinkWindows` to be a primitive type in the JSON string but got `%s`", jsonObj.get("downloadLinkWindows").toString())); } // validate the required field `downloadUrls` - APIConfigDownloadURLList.validateJsonObject(jsonObj.getAsJsonObject("downloadUrls")); - // ensure the json data is an array - if (!jsonObj.get("dynamicWorldRows").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `dynamicWorldRows` to be an array in the JSON string but got `%s`", jsonObj.get("dynamicWorldRows").toString())); + APIConfigDownloadURLList.validateJsonElement(jsonObj.get("downloadUrls")); + if (jsonObj.get("dynamicWorldRows") != null) { + if (!jsonObj.get("dynamicWorldRows").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `dynamicWorldRows` to be an array in the JSON string but got `%s`", jsonObj.get("dynamicWorldRows").toString())); + } + JsonArray jsonArraydynamicWorldRows = jsonObj.getAsJsonArray("dynamicWorldRows"); + // validate the required field `dynamicWorldRows` (array) + for (int i = 0; i < jsonArraydynamicWorldRows.size(); i++) { + DynamicContentRow.validateJsonElement(jsonArraydynamicWorldRows.get(i)); + } } - - JsonArray jsonArraydynamicWorldRows = jsonObj.getAsJsonArray("dynamicWorldRows"); - // validate the required field `dynamicWorldRows` (array) - for (int i = 0; i < jsonArraydynamicWorldRows.size(); i++) { - DynamicContentRow.validateJsonObject(jsonArraydynamicWorldRows.get(i).getAsJsonObject()); - }; if (!jsonObj.get("economyLedgerMigrationStop").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `economyLedgerMigrationStop` to be a primitive type in the JSON string but got `%s`", jsonObj.get("economyLedgerMigrationStop").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `economyLedgerMigrationStop` to be a primitive type in the JSON string but got `%s`", jsonObj.get("economyLedgerMigrationStop").toString())); } if (!jsonObj.get("economyLedgerMode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `economyLedgerMode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("economyLedgerMode").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `economyLedgerMode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("economyLedgerMode").toString())); } // validate the required field `events` - APIConfigEvents.validateJsonObject(jsonObj.getAsJsonObject("events")); + APIConfigEvents.validateJsonElement(jsonObj.get("events")); if (!jsonObj.get("giftDisplayType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `giftDisplayType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("giftDisplayType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `giftDisplayType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("giftDisplayType").toString())); } if (!jsonObj.get("googleApiClientId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `googleApiClientId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("googleApiClientId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `googleApiClientId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("googleApiClientId").toString())); } if (!jsonObj.get("homeWorldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `homeWorldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("homeWorldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `homeWorldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("homeWorldId").toString())); } if (!jsonObj.get("homepageRedirectTarget").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `homepageRedirectTarget` to be a primitive type in the JSON string but got `%s`", jsonObj.get("homepageRedirectTarget").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `homepageRedirectTarget` to be a primitive type in the JSON string but got `%s`", jsonObj.get("homepageRedirectTarget").toString())); } if (!jsonObj.get("hubWorldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hubWorldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hubWorldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `hubWorldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hubWorldId").toString())); } // ensure the required json array is present if (jsonObj.get("imageHostUrlList") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("imageHostUrlList").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `imageHostUrlList` to be an array in the JSON string but got `%s`", jsonObj.get("imageHostUrlList").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageHostUrlList` to be an array in the JSON string but got `%s`", jsonObj.get("imageHostUrlList").toString())); } // ensure the required json array is present if (jsonObj.get("iosAppVersion") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("iosAppVersion").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `iosAppVersion` to be an array in the JSON string but got `%s`", jsonObj.get("iosAppVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iosAppVersion` to be an array in the JSON string but got `%s`", jsonObj.get("iosAppVersion").toString())); } // validate the required field `iosVersion` - APIConfigIosVersion.validateJsonObject(jsonObj.getAsJsonObject("iosVersion")); + APIConfigIosVersion.validateJsonElement(jsonObj.get("iosVersion")); if (!jsonObj.get("jobsEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jobsEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jobsEmail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `jobsEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jobsEmail").toString())); } // validate the required field `minSupportedClientBuildNumber` - APIConfigMinSupportedClientBuildNumber.validateJsonObject(jsonObj.getAsJsonObject("minSupportedClientBuildNumber")); + APIConfigMinSupportedClientBuildNumber.validateJsonElement(jsonObj.get("minSupportedClientBuildNumber")); if (!jsonObj.get("minimumUnityVersionForUploads").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `minimumUnityVersionForUploads` to be a primitive type in the JSON string but got `%s`", jsonObj.get("minimumUnityVersionForUploads").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `minimumUnityVersionForUploads` to be a primitive type in the JSON string but got `%s`", jsonObj.get("minimumUnityVersionForUploads").toString())); } if (!jsonObj.get("moderationEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `moderationEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("moderationEmail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `moderationEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("moderationEmail").toString())); } if (!jsonObj.get("notAllowedToSelectAvatarInPrivateWorldMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `notAllowedToSelectAvatarInPrivateWorldMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notAllowedToSelectAvatarInPrivateWorldMessage").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `notAllowedToSelectAvatarInPrivateWorldMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notAllowedToSelectAvatarInPrivateWorldMessage").toString())); } // validate the required field `offlineAnalysis` - APIConfigOfflineAnalysis.validateJsonObject(jsonObj.getAsJsonObject("offlineAnalysis")); + APIConfigOfflineAnalysis.validateJsonElement(jsonObj.get("offlineAnalysis")); // ensure the required json array is present if (jsonObj.get("photonNameserverOverrides") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("photonNameserverOverrides").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `photonNameserverOverrides` to be an array in the JSON string but got `%s`", jsonObj.get("photonNameserverOverrides").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `photonNameserverOverrides` to be an array in the JSON string but got `%s`", jsonObj.get("photonNameserverOverrides").toString())); } // ensure the required json array is present if (jsonObj.get("photonPublicKeys") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("photonPublicKeys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `photonPublicKeys` to be an array in the JSON string but got `%s`", jsonObj.get("photonPublicKeys").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `photonPublicKeys` to be an array in the JSON string but got `%s`", jsonObj.get("photonPublicKeys").toString())); } if (!jsonObj.get("player-url-resolver-sha1").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `player-url-resolver-sha1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("player-url-resolver-sha1").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `player-url-resolver-sha1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("player-url-resolver-sha1").toString())); } if (!jsonObj.get("player-url-resolver-version").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `player-url-resolver-version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("player-url-resolver-version").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `player-url-resolver-version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("player-url-resolver-version").toString())); } if (!jsonObj.get("publicKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `publicKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publicKey").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `publicKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publicKey").toString())); } if (!jsonObj.get("reportFormUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reportFormUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reportFormUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reportFormUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reportFormUrl").toString())); } if (!jsonObj.get("sdkDeveloperFaqUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sdkDeveloperFaqUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdkDeveloperFaqUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sdkDeveloperFaqUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdkDeveloperFaqUrl").toString())); } if (!jsonObj.get("sdkDiscordUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sdkDiscordUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdkDiscordUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sdkDiscordUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdkDiscordUrl").toString())); } if (!jsonObj.get("sdkNotAllowedToPublishMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sdkNotAllowedToPublishMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdkNotAllowedToPublishMessage").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sdkNotAllowedToPublishMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdkNotAllowedToPublishMessage").toString())); } if (!jsonObj.get("sdkUnityVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sdkUnityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdkUnityVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sdkUnityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdkUnityVersion").toString())); } // ensure the required json array is present if (jsonObj.get("stringHostUrlList") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("stringHostUrlList").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stringHostUrlList` to be an array in the JSON string but got `%s`", jsonObj.get("stringHostUrlList").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `stringHostUrlList` to be an array in the JSON string but got `%s`", jsonObj.get("stringHostUrlList").toString())); } if (!jsonObj.get("supportEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `supportEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("supportEmail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `supportEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("supportEmail").toString())); } if (!jsonObj.get("supportFormUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `supportFormUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("supportFormUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `supportFormUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("supportFormUrl").toString())); } if (!jsonObj.get("timeOutWorldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `timeOutWorldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timeOutWorldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `timeOutWorldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timeOutWorldId").toString())); } if (!jsonObj.get("tutorialWorldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tutorialWorldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tutorialWorldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tutorialWorldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tutorialWorldId").toString())); } // ensure the required json array is present if (jsonObj.get("urlList") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("urlList").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `urlList` to be an array in the JSON string but got `%s`", jsonObj.get("urlList").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `urlList` to be an array in the JSON string but got `%s`", jsonObj.get("urlList").toString())); } if (!jsonObj.get("viveWindowsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `viveWindowsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("viveWindowsUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `viveWindowsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("viveWindowsUrl").toString())); } // ensure the required json array is present if (jsonObj.get("whiteListedAssetUrls") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("whiteListedAssetUrls").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `whiteListedAssetUrls` to be an array in the JSON string but got `%s`", jsonObj.get("whiteListedAssetUrls").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `whiteListedAssetUrls` to be an array in the JSON string but got `%s`", jsonObj.get("whiteListedAssetUrls").toString())); } } @@ -4353,31 +3785,31 @@ public void write(JsonWriter out, APIConfig value) throws IOException { @Override public APIConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfig - * @throws IOException if the JSON string is invalid with respect to APIConfig - */ + /** + * Create an instance of APIConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfig + * @throws IOException if the JSON string is invalid with respect to APIConfig + */ public static APIConfig fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfig.class); } - /** - * Convert an instance of APIConfig to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfig to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigAccessLogsUrls.java b/src/main/java/io/github/vrchatapi/model/APIConfigAccessLogsUrls.java index 5771d168..ce33a896 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigAccessLogsUrls.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigAccessLogsUrls.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.net.URI; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,115 +48,103 @@ /** * APIConfigAccessLogsUrls */ -@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 APIConfigAccessLogsUrls { public static final String SERIALIZED_NAME_DEFAULT = "Default"; @SerializedName(SERIALIZED_NAME_DEFAULT) + @javax.annotation.Nullable private URI _default; public static final String SERIALIZED_NAME_PICO = "Pico"; @SerializedName(SERIALIZED_NAME_PICO) + @javax.annotation.Nullable private URI pico; public static final String SERIALIZED_NAME_QUEST = "Quest"; @SerializedName(SERIALIZED_NAME_QUEST) + @javax.annotation.Nullable private URI quest; public static final String SERIALIZED_NAME_XR_ELITE = "XRElite"; @SerializedName(SERIALIZED_NAME_XR_ELITE) + @javax.annotation.Nullable private URI xrElite; public APIConfigAccessLogsUrls() { } - public APIConfigAccessLogsUrls _default(URI _default) { - + public APIConfigAccessLogsUrls _default(@javax.annotation.Nullable URI _default) { this._default = _default; return this; } - /** + /** * Get _default * @return _default - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://help.vrchat.com/hc/en-us/articles/9521522810899-Where-do-I-find-my-output-logs#h_01HT1ZV67JGKX5AE4R1P28XMXR", value = "") - public URI getDefault() { return _default; } - - public void setDefault(URI _default) { + public void setDefault(@javax.annotation.Nullable URI _default) { this._default = _default; } - public APIConfigAccessLogsUrls pico(URI pico) { - + public APIConfigAccessLogsUrls pico(@javax.annotation.Nullable URI pico) { this.pico = pico; return this; } - /** + /** * Get pico * @return pico - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://help.vrchat.com/hc/en-us/articles/9521522810899-Where-do-I-find-my-output-logs#h_01HT1ZV67JGKX5AE4R1P28XMXR", value = "") - public URI getPico() { return pico; } - - public void setPico(URI pico) { + public void setPico(@javax.annotation.Nullable URI pico) { this.pico = pico; } - public APIConfigAccessLogsUrls quest(URI quest) { - + public APIConfigAccessLogsUrls quest(@javax.annotation.Nullable URI quest) { this.quest = quest; return this; } - /** + /** * Get quest * @return quest - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://help.vrchat.com/hc/en-us/articles/9521522810899-Where-do-I-find-my-output-logs#h_01HT1ZV67JGKX5AE4R1P28XMXR", value = "") - public URI getQuest() { return quest; } - - public void setQuest(URI quest) { + public void setQuest(@javax.annotation.Nullable URI quest) { this.quest = quest; } - public APIConfigAccessLogsUrls xrElite(URI xrElite) { - + public APIConfigAccessLogsUrls xrElite(@javax.annotation.Nullable URI xrElite) { this.xrElite = xrElite; return this; } - /** + /** * Get xrElite * @return xrElite - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://help.vrchat.com/hc/en-us/articles/9521522810899-Where-do-I-find-my-output-logs#h_01HT1ZV67JGKX5AE4R1P28XMXR", value = "") - public URI getXrElite() { return xrElite; } - - public void setXrElite(URI xrElite) { + public void setXrElite(@javax.annotation.Nullable URI xrElite) { this.xrElite = xrElite; } @@ -199,10 +187,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -211,47 +196,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Default"); - openapiFields.add("Pico"); - openapiFields.add("Quest"); - openapiFields.add("XRElite"); + openapiFields = new HashSet(Arrays.asList("Default", "Pico", "Quest", "XRElite")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigAccessLogsUrls - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigAccessLogsUrls.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigAccessLogsUrls is not found in the empty JSON string", APIConfigAccessLogsUrls.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigAccessLogsUrls + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigAccessLogsUrls.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigAccessLogsUrls is not found in the empty JSON string", APIConfigAccessLogsUrls.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigAccessLogsUrls.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigAccessLogsUrls` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigAccessLogsUrls` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("Default") != null && !jsonObj.get("Default").isJsonNull()) && !jsonObj.get("Default").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Default").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `Default` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Default").toString())); } if ((jsonObj.get("Pico") != null && !jsonObj.get("Pico").isJsonNull()) && !jsonObj.get("Pico").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Pico` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Pico").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `Pico` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Pico").toString())); } if ((jsonObj.get("Quest") != null && !jsonObj.get("Quest").isJsonNull()) && !jsonObj.get("Quest").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Quest` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Quest").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `Quest` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Quest").toString())); } if ((jsonObj.get("XRElite") != null && !jsonObj.get("XRElite").isJsonNull()) && !jsonObj.get("XRElite").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `XRElite` to be a primitive type in the JSON string but got `%s`", jsonObj.get("XRElite").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `XRElite` to be a primitive type in the JSON string but got `%s`", jsonObj.get("XRElite").toString())); } } @@ -275,31 +257,31 @@ public void write(JsonWriter out, APIConfigAccessLogsUrls value) throws IOExcept @Override public APIConfigAccessLogsUrls read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigAccessLogsUrls given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigAccessLogsUrls - * @throws IOException if the JSON string is invalid with respect to APIConfigAccessLogsUrls - */ + /** + * Create an instance of APIConfigAccessLogsUrls given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigAccessLogsUrls + * @throws IOException if the JSON string is invalid with respect to APIConfigAccessLogsUrls + */ public static APIConfigAccessLogsUrls fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigAccessLogsUrls.class); } - /** - * Convert an instance of APIConfigAccessLogsUrls to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigAccessLogsUrls to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigAnnouncement.java b/src/main/java/io/github/vrchatapi/model/APIConfigAnnouncement.java index 7e0177f5..1625efe5 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigAnnouncement.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigAnnouncement.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,62 +49,55 @@ * @deprecated */ @Deprecated -@ApiModel(description = "Public Announcement") -@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 APIConfigAnnouncement { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) + @javax.annotation.Nonnull private String text; public APIConfigAnnouncement() { } - public APIConfigAnnouncement name(String name) { - + public APIConfigAnnouncement name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Announcement name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Announcement name") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public APIConfigAnnouncement text(String text) { - + public APIConfigAnnouncement text(@javax.annotation.Nonnull String text) { this.text = text; return this; } - /** + /** * Announcement text * @return text - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Announcement text") - public String getText() { return text; } - - public void setText(String text) { + public void setText(@javax.annotation.Nonnull String text) { this.text = text; } @@ -143,10 +136,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -155,48 +145,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("text"); + openapiFields = new HashSet(Arrays.asList("name", "text")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("text"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigAnnouncement - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigAnnouncement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigAnnouncement is not found in the empty JSON string", APIConfigAnnouncement.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("name", "text")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigAnnouncement + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigAnnouncement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigAnnouncement is not found in the empty JSON string", APIConfigAnnouncement.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigAnnouncement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigAnnouncement` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigAnnouncement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : APIConfigAnnouncement.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -220,31 +207,31 @@ public void write(JsonWriter out, APIConfigAnnouncement value) throws IOExceptio @Override public APIConfigAnnouncement read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigAnnouncement given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigAnnouncement - * @throws IOException if the JSON string is invalid with respect to APIConfigAnnouncement - */ + /** + * Create an instance of APIConfigAnnouncement given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigAnnouncement + * @throws IOException if the JSON string is invalid with respect to APIConfigAnnouncement + */ public static APIConfigAnnouncement fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigAnnouncement.class); } - /** - * Convert an instance of APIConfigAnnouncement to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigAnnouncement to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigAudioConfig.java b/src/main/java/io/github/vrchatapi/model/APIConfigAudioConfig.java index e0764c39..c80faf0c 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigAudioConfig.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigAudioConfig.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,305 +48,271 @@ /** * Global configuration for Steam Audio */ -@ApiModel(description = "Global configuration for Steam Audio") -@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 APIConfigAudioConfig { public static final String SERIALIZED_NAME_EQ = "eq"; @SerializedName(SERIALIZED_NAME_EQ) + @javax.annotation.Nonnull private BigDecimal eq; public static final String SERIALIZED_NAME_NEAR_FIELD_I_L_D_NUDGE = "nearFieldILDNudge"; @SerializedName(SERIALIZED_NAME_NEAR_FIELD_I_L_D_NUDGE) + @javax.annotation.Nonnull private BigDecimal nearFieldILDNudge; public static final String SERIALIZED_NAME_NEAR_FIELD_I_L_D_NUDGE_DISTANCE = "nearFieldILDNudgeDistance"; @SerializedName(SERIALIZED_NAME_NEAR_FIELD_I_L_D_NUDGE_DISTANCE) + @javax.annotation.Nonnull private BigDecimal nearFieldILDNudgeDistance; public static final String SERIALIZED_NAME_NEAR_FIELD_I_L_D_NUDGE_EAR_RADIUS = "nearFieldILDNudgeEarRadius"; @SerializedName(SERIALIZED_NAME_NEAR_FIELD_I_L_D_NUDGE_EAR_RADIUS) + @javax.annotation.Nonnull private BigDecimal nearFieldILDNudgeEarRadius; public static final String SERIALIZED_NAME_PER_EAR_DIRECTIONALITY_EAR_RADIUS = "perEarDirectionalityEarRadius"; @SerializedName(SERIALIZED_NAME_PER_EAR_DIRECTIONALITY_EAR_RADIUS) + @javax.annotation.Nonnull private BigDecimal perEarDirectionalityEarRadius; public static final String SERIALIZED_NAME_PER_EAR_DIRECTIONALITY_FADE_DISTANCE = "perEarDirectionalityFadeDistance"; @SerializedName(SERIALIZED_NAME_PER_EAR_DIRECTIONALITY_FADE_DISTANCE) + @javax.annotation.Nonnull private BigDecimal perEarDirectionalityFadeDistance; public static final String SERIALIZED_NAME_PER_EAR_DIRECTIONALITY_MAX_SCALE = "perEarDirectionalityMaxScale"; @SerializedName(SERIALIZED_NAME_PER_EAR_DIRECTIONALITY_MAX_SCALE) + @javax.annotation.Nonnull private BigDecimal perEarDirectionalityMaxScale; public static final String SERIALIZED_NAME_PER_EAR_DIRECTIONALITY_P_C_FACTOR = "perEarDirectionalityPCFactor"; @SerializedName(SERIALIZED_NAME_PER_EAR_DIRECTIONALITY_P_C_FACTOR) + @javax.annotation.Nonnull private BigDecimal perEarDirectionalityPCFactor; public static final String SERIALIZED_NAME_TRACKING_SCALE_MAX = "trackingScaleMax"; @SerializedName(SERIALIZED_NAME_TRACKING_SCALE_MAX) + @javax.annotation.Nonnull private BigDecimal trackingScaleMax; public static final String SERIALIZED_NAME_TRACKING_SCALE_MIN = "trackingScaleMin"; @SerializedName(SERIALIZED_NAME_TRACKING_SCALE_MIN) + @javax.annotation.Nonnull private BigDecimal trackingScaleMin; public static final String SERIALIZED_NAME_TRACKING_SCALE_MULTIPLIER = "trackingScaleMultiplier"; @SerializedName(SERIALIZED_NAME_TRACKING_SCALE_MULTIPLIER) + @javax.annotation.Nonnull private BigDecimal trackingScaleMultiplier; public APIConfigAudioConfig() { } - public APIConfigAudioConfig eq(BigDecimal eq) { - + public APIConfigAudioConfig eq(@javax.annotation.Nonnull BigDecimal eq) { this.eq = eq; return this; } - /** + /** * Unknown * @return eq - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public BigDecimal getEq() { return eq; } - - public void setEq(BigDecimal eq) { + public void setEq(@javax.annotation.Nonnull BigDecimal eq) { this.eq = eq; } - public APIConfigAudioConfig nearFieldILDNudge(BigDecimal nearFieldILDNudge) { - + public APIConfigAudioConfig nearFieldILDNudge(@javax.annotation.Nonnull BigDecimal nearFieldILDNudge) { this.nearFieldILDNudge = nearFieldILDNudge; return this; } - /** + /** * Unknown * @return nearFieldILDNudge - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public BigDecimal getNearFieldILDNudge() { return nearFieldILDNudge; } - - public void setNearFieldILDNudge(BigDecimal nearFieldILDNudge) { + public void setNearFieldILDNudge(@javax.annotation.Nonnull BigDecimal nearFieldILDNudge) { this.nearFieldILDNudge = nearFieldILDNudge; } - public APIConfigAudioConfig nearFieldILDNudgeDistance(BigDecimal nearFieldILDNudgeDistance) { - + public APIConfigAudioConfig nearFieldILDNudgeDistance(@javax.annotation.Nonnull BigDecimal nearFieldILDNudgeDistance) { this.nearFieldILDNudgeDistance = nearFieldILDNudgeDistance; return this; } - /** + /** * Unknown * @return nearFieldILDNudgeDistance - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public BigDecimal getNearFieldILDNudgeDistance() { return nearFieldILDNudgeDistance; } - - public void setNearFieldILDNudgeDistance(BigDecimal nearFieldILDNudgeDistance) { + public void setNearFieldILDNudgeDistance(@javax.annotation.Nonnull BigDecimal nearFieldILDNudgeDistance) { this.nearFieldILDNudgeDistance = nearFieldILDNudgeDistance; } - public APIConfigAudioConfig nearFieldILDNudgeEarRadius(BigDecimal nearFieldILDNudgeEarRadius) { - + public APIConfigAudioConfig nearFieldILDNudgeEarRadius(@javax.annotation.Nonnull BigDecimal nearFieldILDNudgeEarRadius) { this.nearFieldILDNudgeEarRadius = nearFieldILDNudgeEarRadius; return this; } - /** + /** * Unknown * @return nearFieldILDNudgeEarRadius - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public BigDecimal getNearFieldILDNudgeEarRadius() { return nearFieldILDNudgeEarRadius; } - - public void setNearFieldILDNudgeEarRadius(BigDecimal nearFieldILDNudgeEarRadius) { + public void setNearFieldILDNudgeEarRadius(@javax.annotation.Nonnull BigDecimal nearFieldILDNudgeEarRadius) { this.nearFieldILDNudgeEarRadius = nearFieldILDNudgeEarRadius; } - public APIConfigAudioConfig perEarDirectionalityEarRadius(BigDecimal perEarDirectionalityEarRadius) { - + public APIConfigAudioConfig perEarDirectionalityEarRadius(@javax.annotation.Nonnull BigDecimal perEarDirectionalityEarRadius) { this.perEarDirectionalityEarRadius = perEarDirectionalityEarRadius; return this; } - /** + /** * Unknown * @return perEarDirectionalityEarRadius - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public BigDecimal getPerEarDirectionalityEarRadius() { return perEarDirectionalityEarRadius; } - - public void setPerEarDirectionalityEarRadius(BigDecimal perEarDirectionalityEarRadius) { + public void setPerEarDirectionalityEarRadius(@javax.annotation.Nonnull BigDecimal perEarDirectionalityEarRadius) { this.perEarDirectionalityEarRadius = perEarDirectionalityEarRadius; } - public APIConfigAudioConfig perEarDirectionalityFadeDistance(BigDecimal perEarDirectionalityFadeDistance) { - + public APIConfigAudioConfig perEarDirectionalityFadeDistance(@javax.annotation.Nonnull BigDecimal perEarDirectionalityFadeDistance) { this.perEarDirectionalityFadeDistance = perEarDirectionalityFadeDistance; return this; } - /** + /** * Unknown * @return perEarDirectionalityFadeDistance - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public BigDecimal getPerEarDirectionalityFadeDistance() { return perEarDirectionalityFadeDistance; } - - public void setPerEarDirectionalityFadeDistance(BigDecimal perEarDirectionalityFadeDistance) { + public void setPerEarDirectionalityFadeDistance(@javax.annotation.Nonnull BigDecimal perEarDirectionalityFadeDistance) { this.perEarDirectionalityFadeDistance = perEarDirectionalityFadeDistance; } - public APIConfigAudioConfig perEarDirectionalityMaxScale(BigDecimal perEarDirectionalityMaxScale) { - + public APIConfigAudioConfig perEarDirectionalityMaxScale(@javax.annotation.Nonnull BigDecimal perEarDirectionalityMaxScale) { this.perEarDirectionalityMaxScale = perEarDirectionalityMaxScale; return this; } - /** + /** * Unknown * @return perEarDirectionalityMaxScale - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public BigDecimal getPerEarDirectionalityMaxScale() { return perEarDirectionalityMaxScale; } - - public void setPerEarDirectionalityMaxScale(BigDecimal perEarDirectionalityMaxScale) { + public void setPerEarDirectionalityMaxScale(@javax.annotation.Nonnull BigDecimal perEarDirectionalityMaxScale) { this.perEarDirectionalityMaxScale = perEarDirectionalityMaxScale; } - public APIConfigAudioConfig perEarDirectionalityPCFactor(BigDecimal perEarDirectionalityPCFactor) { - + public APIConfigAudioConfig perEarDirectionalityPCFactor(@javax.annotation.Nonnull BigDecimal perEarDirectionalityPCFactor) { this.perEarDirectionalityPCFactor = perEarDirectionalityPCFactor; return this; } - /** + /** * Unknown * @return perEarDirectionalityPCFactor - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public BigDecimal getPerEarDirectionalityPCFactor() { return perEarDirectionalityPCFactor; } - - public void setPerEarDirectionalityPCFactor(BigDecimal perEarDirectionalityPCFactor) { + public void setPerEarDirectionalityPCFactor(@javax.annotation.Nonnull BigDecimal perEarDirectionalityPCFactor) { this.perEarDirectionalityPCFactor = perEarDirectionalityPCFactor; } - public APIConfigAudioConfig trackingScaleMax(BigDecimal trackingScaleMax) { - + public APIConfigAudioConfig trackingScaleMax(@javax.annotation.Nonnull BigDecimal trackingScaleMax) { this.trackingScaleMax = trackingScaleMax; return this; } - /** + /** * Unknown * @return trackingScaleMax - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public BigDecimal getTrackingScaleMax() { return trackingScaleMax; } - - public void setTrackingScaleMax(BigDecimal trackingScaleMax) { + public void setTrackingScaleMax(@javax.annotation.Nonnull BigDecimal trackingScaleMax) { this.trackingScaleMax = trackingScaleMax; } - public APIConfigAudioConfig trackingScaleMin(BigDecimal trackingScaleMin) { - + public APIConfigAudioConfig trackingScaleMin(@javax.annotation.Nonnull BigDecimal trackingScaleMin) { this.trackingScaleMin = trackingScaleMin; return this; } - /** + /** * Unknown * @return trackingScaleMin - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public BigDecimal getTrackingScaleMin() { return trackingScaleMin; } - - public void setTrackingScaleMin(BigDecimal trackingScaleMin) { + public void setTrackingScaleMin(@javax.annotation.Nonnull BigDecimal trackingScaleMin) { this.trackingScaleMin = trackingScaleMin; } - public APIConfigAudioConfig trackingScaleMultiplier(BigDecimal trackingScaleMultiplier) { - + public APIConfigAudioConfig trackingScaleMultiplier(@javax.annotation.Nonnull BigDecimal trackingScaleMultiplier) { this.trackingScaleMultiplier = trackingScaleMultiplier; return this; } - /** + /** * Unknown * @return trackingScaleMultiplier - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public BigDecimal getTrackingScaleMultiplier() { return trackingScaleMultiplier; } - - public void setTrackingScaleMultiplier(BigDecimal trackingScaleMultiplier) { + public void setTrackingScaleMultiplier(@javax.annotation.Nonnull BigDecimal trackingScaleMultiplier) { this.trackingScaleMultiplier = trackingScaleMultiplier; } @@ -403,10 +369,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -415,61 +378,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eq"); - openapiFields.add("nearFieldILDNudge"); - openapiFields.add("nearFieldILDNudgeDistance"); - openapiFields.add("nearFieldILDNudgeEarRadius"); - openapiFields.add("perEarDirectionalityEarRadius"); - openapiFields.add("perEarDirectionalityFadeDistance"); - openapiFields.add("perEarDirectionalityMaxScale"); - openapiFields.add("perEarDirectionalityPCFactor"); - openapiFields.add("trackingScaleMax"); - openapiFields.add("trackingScaleMin"); - openapiFields.add("trackingScaleMultiplier"); + openapiFields = new HashSet(Arrays.asList("eq", "nearFieldILDNudge", "nearFieldILDNudgeDistance", "nearFieldILDNudgeEarRadius", "perEarDirectionalityEarRadius", "perEarDirectionalityFadeDistance", "perEarDirectionalityMaxScale", "perEarDirectionalityPCFactor", "trackingScaleMax", "trackingScaleMin", "trackingScaleMultiplier")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("eq"); - openapiRequiredFields.add("nearFieldILDNudge"); - openapiRequiredFields.add("nearFieldILDNudgeDistance"); - openapiRequiredFields.add("nearFieldILDNudgeEarRadius"); - openapiRequiredFields.add("perEarDirectionalityEarRadius"); - openapiRequiredFields.add("perEarDirectionalityFadeDistance"); - openapiRequiredFields.add("perEarDirectionalityMaxScale"); - openapiRequiredFields.add("perEarDirectionalityPCFactor"); - openapiRequiredFields.add("trackingScaleMax"); - openapiRequiredFields.add("trackingScaleMin"); - openapiRequiredFields.add("trackingScaleMultiplier"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigAudioConfig - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigAudioConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigAudioConfig is not found in the empty JSON string", APIConfigAudioConfig.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("eq", "nearFieldILDNudge", "nearFieldILDNudgeDistance", "nearFieldILDNudgeEarRadius", "perEarDirectionalityEarRadius", "perEarDirectionalityFadeDistance", "perEarDirectionalityMaxScale", "perEarDirectionalityPCFactor", "trackingScaleMax", "trackingScaleMin", "trackingScaleMultiplier")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigAudioConfig + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigAudioConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigAudioConfig is not found in the empty JSON string", APIConfigAudioConfig.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigAudioConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigAudioConfig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigAudioConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : APIConfigAudioConfig.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -492,31 +434,31 @@ public void write(JsonWriter out, APIConfigAudioConfig value) throws IOException @Override public APIConfigAudioConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigAudioConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigAudioConfig - * @throws IOException if the JSON string is invalid with respect to APIConfigAudioConfig - */ + /** + * Create an instance of APIConfigAudioConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigAudioConfig + * @throws IOException if the JSON string is invalid with respect to APIConfigAudioConfig + */ public static APIConfigAudioConfig fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigAudioConfig.class); } - /** - * Convert an instance of APIConfigAudioConfig to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigAudioConfig to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigAvatarPerfLimiter.java b/src/main/java/io/github/vrchatapi/model/APIConfigAvatarPerfLimiter.java index cac73d9d..bc5334e3 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigAvatarPerfLimiter.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigAvatarPerfLimiter.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.PerformanceLimiterInfo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,169 +48,151 @@ /** * APIConfigAvatarPerfLimiter */ -@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 APIConfigAvatarPerfLimiter { public static final String SERIALIZED_NAME_ANDROID_MOBILE = "AndroidMobile"; @SerializedName(SERIALIZED_NAME_ANDROID_MOBILE) + @javax.annotation.Nonnull private PerformanceLimiterInfo androidMobile; public static final String SERIALIZED_NAME_P_C = "PC"; @SerializedName(SERIALIZED_NAME_P_C) + @javax.annotation.Nonnull private PerformanceLimiterInfo PC; public static final String SERIALIZED_NAME_PICO = "Pico"; @SerializedName(SERIALIZED_NAME_PICO) + @javax.annotation.Nonnull private PerformanceLimiterInfo pico; public static final String SERIALIZED_NAME_QUEST = "Quest"; @SerializedName(SERIALIZED_NAME_QUEST) + @javax.annotation.Nonnull private PerformanceLimiterInfo quest; public static final String SERIALIZED_NAME_XR_ELITE = "XRElite"; @SerializedName(SERIALIZED_NAME_XR_ELITE) + @javax.annotation.Nonnull private PerformanceLimiterInfo xrElite; public static final String SERIALIZED_NAME_I_O_S_MOBILE = "iOSMobile"; @SerializedName(SERIALIZED_NAME_I_O_S_MOBILE) + @javax.annotation.Nonnull private PerformanceLimiterInfo iOSMobile; public APIConfigAvatarPerfLimiter() { } - public APIConfigAvatarPerfLimiter androidMobile(PerformanceLimiterInfo androidMobile) { - + public APIConfigAvatarPerfLimiter androidMobile(@javax.annotation.Nonnull PerformanceLimiterInfo androidMobile) { this.androidMobile = androidMobile; return this; } - /** + /** * Get androidMobile * @return androidMobile - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PerformanceLimiterInfo getAndroidMobile() { return androidMobile; } - - public void setAndroidMobile(PerformanceLimiterInfo androidMobile) { + public void setAndroidMobile(@javax.annotation.Nonnull PerformanceLimiterInfo androidMobile) { this.androidMobile = androidMobile; } - public APIConfigAvatarPerfLimiter PC(PerformanceLimiterInfo PC) { - + public APIConfigAvatarPerfLimiter PC(@javax.annotation.Nonnull PerformanceLimiterInfo PC) { this.PC = PC; return this; } - /** + /** * Get PC * @return PC - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PerformanceLimiterInfo getPC() { return PC; } - - public void setPC(PerformanceLimiterInfo PC) { + public void setPC(@javax.annotation.Nonnull PerformanceLimiterInfo PC) { this.PC = PC; } - public APIConfigAvatarPerfLimiter pico(PerformanceLimiterInfo pico) { - + public APIConfigAvatarPerfLimiter pico(@javax.annotation.Nonnull PerformanceLimiterInfo pico) { this.pico = pico; return this; } - /** + /** * Get pico * @return pico - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PerformanceLimiterInfo getPico() { return pico; } - - public void setPico(PerformanceLimiterInfo pico) { + public void setPico(@javax.annotation.Nonnull PerformanceLimiterInfo pico) { this.pico = pico; } - public APIConfigAvatarPerfLimiter quest(PerformanceLimiterInfo quest) { - + public APIConfigAvatarPerfLimiter quest(@javax.annotation.Nonnull PerformanceLimiterInfo quest) { this.quest = quest; return this; } - /** + /** * Get quest * @return quest - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PerformanceLimiterInfo getQuest() { return quest; } - - public void setQuest(PerformanceLimiterInfo quest) { + public void setQuest(@javax.annotation.Nonnull PerformanceLimiterInfo quest) { this.quest = quest; } - public APIConfigAvatarPerfLimiter xrElite(PerformanceLimiterInfo xrElite) { - + public APIConfigAvatarPerfLimiter xrElite(@javax.annotation.Nonnull PerformanceLimiterInfo xrElite) { this.xrElite = xrElite; return this; } - /** + /** * Get xrElite * @return xrElite - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PerformanceLimiterInfo getXrElite() { return xrElite; } - - public void setXrElite(PerformanceLimiterInfo xrElite) { + public void setXrElite(@javax.annotation.Nonnull PerformanceLimiterInfo xrElite) { this.xrElite = xrElite; } - public APIConfigAvatarPerfLimiter iOSMobile(PerformanceLimiterInfo iOSMobile) { - + public APIConfigAvatarPerfLimiter iOSMobile(@javax.annotation.Nonnull PerformanceLimiterInfo iOSMobile) { this.iOSMobile = iOSMobile; return this; } - /** + /** * Get iOSMobile * @return iOSMobile - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PerformanceLimiterInfo getiOSMobile() { return iOSMobile; } - - public void setiOSMobile(PerformanceLimiterInfo iOSMobile) { + public void setiOSMobile(@javax.annotation.Nonnull PerformanceLimiterInfo iOSMobile) { this.iOSMobile = iOSMobile; } @@ -257,10 +239,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -269,63 +248,52 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AndroidMobile"); - openapiFields.add("PC"); - openapiFields.add("Pico"); - openapiFields.add("Quest"); - openapiFields.add("XRElite"); - openapiFields.add("iOSMobile"); + openapiFields = new HashSet(Arrays.asList("AndroidMobile", "PC", "Pico", "Quest", "XRElite", "iOSMobile")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("AndroidMobile"); - openapiRequiredFields.add("PC"); - openapiRequiredFields.add("Pico"); - openapiRequiredFields.add("Quest"); - openapiRequiredFields.add("XRElite"); - openapiRequiredFields.add("iOSMobile"); + openapiRequiredFields = new HashSet(Arrays.asList("AndroidMobile", "PC", "Pico", "Quest", "XRElite", "iOSMobile")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigAvatarPerfLimiter - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigAvatarPerfLimiter.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigAvatarPerfLimiter is not found in the empty JSON string", APIConfigAvatarPerfLimiter.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigAvatarPerfLimiter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigAvatarPerfLimiter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigAvatarPerfLimiter is not found in the empty JSON string", APIConfigAvatarPerfLimiter.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigAvatarPerfLimiter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigAvatarPerfLimiter` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigAvatarPerfLimiter` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : APIConfigAvatarPerfLimiter.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `AndroidMobile` - PerformanceLimiterInfo.validateJsonObject(jsonObj.getAsJsonObject("AndroidMobile")); + PerformanceLimiterInfo.validateJsonElement(jsonObj.get("AndroidMobile")); // validate the required field `PC` - PerformanceLimiterInfo.validateJsonObject(jsonObj.getAsJsonObject("PC")); + PerformanceLimiterInfo.validateJsonElement(jsonObj.get("PC")); // validate the required field `Pico` - PerformanceLimiterInfo.validateJsonObject(jsonObj.getAsJsonObject("Pico")); + PerformanceLimiterInfo.validateJsonElement(jsonObj.get("Pico")); // validate the required field `Quest` - PerformanceLimiterInfo.validateJsonObject(jsonObj.getAsJsonObject("Quest")); + PerformanceLimiterInfo.validateJsonElement(jsonObj.get("Quest")); // validate the required field `XRElite` - PerformanceLimiterInfo.validateJsonObject(jsonObj.getAsJsonObject("XRElite")); + PerformanceLimiterInfo.validateJsonElement(jsonObj.get("XRElite")); // validate the required field `iOSMobile` - PerformanceLimiterInfo.validateJsonObject(jsonObj.getAsJsonObject("iOSMobile")); + PerformanceLimiterInfo.validateJsonElement(jsonObj.get("iOSMobile")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -348,31 +316,31 @@ public void write(JsonWriter out, APIConfigAvatarPerfLimiter value) throws IOExc @Override public APIConfigAvatarPerfLimiter read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigAvatarPerfLimiter given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigAvatarPerfLimiter - * @throws IOException if the JSON string is invalid with respect to APIConfigAvatarPerfLimiter - */ + /** + * Create an instance of APIConfigAvatarPerfLimiter given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigAvatarPerfLimiter + * @throws IOException if the JSON string is invalid with respect to APIConfigAvatarPerfLimiter + */ public static APIConfigAvatarPerfLimiter fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigAvatarPerfLimiter.class); } - /** - * Convert an instance of APIConfigAvatarPerfLimiter to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigAvatarPerfLimiter to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigConstants.java b/src/main/java/io/github/vrchatapi/model/APIConfigConstants.java index babfd5f4..d3094a6d 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigConstants.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstants.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,9 +21,8 @@ import io.github.vrchatapi.model.APIConfigConstantsGROUPS; import io.github.vrchatapi.model.APIConfigConstantsINSTANCE; import io.github.vrchatapi.model.APIConfigConstantsLANGUAGE; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,89 +50,79 @@ /** * Constants */ -@ApiModel(description = "Constants") -@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 APIConfigConstants { public static final String SERIALIZED_NAME_G_R_O_U_P_S = "GROUPS"; @SerializedName(SERIALIZED_NAME_G_R_O_U_P_S) + @javax.annotation.Nonnull private APIConfigConstantsGROUPS GROUPS; public static final String SERIALIZED_NAME_I_N_S_T_A_N_C_E = "INSTANCE"; @SerializedName(SERIALIZED_NAME_I_N_S_T_A_N_C_E) + @javax.annotation.Nonnull private APIConfigConstantsINSTANCE INSTANCE; public static final String SERIALIZED_NAME_L_A_N_G_U_A_G_E = "LANGUAGE"; @SerializedName(SERIALIZED_NAME_L_A_N_G_U_A_G_E) + @javax.annotation.Nonnull private APIConfigConstantsLANGUAGE LANGUAGE; public APIConfigConstants() { } - public APIConfigConstants GROUPS(APIConfigConstantsGROUPS GROUPS) { - + public APIConfigConstants GROUPS(@javax.annotation.Nonnull APIConfigConstantsGROUPS GROUPS) { this.GROUPS = GROUPS; return this; } - /** + /** * Get GROUPS * @return GROUPS - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public APIConfigConstantsGROUPS getGROUPS() { return GROUPS; } - - public void setGROUPS(APIConfigConstantsGROUPS GROUPS) { + public void setGROUPS(@javax.annotation.Nonnull APIConfigConstantsGROUPS GROUPS) { this.GROUPS = GROUPS; } - public APIConfigConstants INSTANCE(APIConfigConstantsINSTANCE INSTANCE) { - + public APIConfigConstants INSTANCE(@javax.annotation.Nonnull APIConfigConstantsINSTANCE INSTANCE) { this.INSTANCE = INSTANCE; return this; } - /** + /** * Get INSTANCE * @return INSTANCE - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public APIConfigConstantsINSTANCE getINSTANCE() { return INSTANCE; } - - public void setINSTANCE(APIConfigConstantsINSTANCE INSTANCE) { + public void setINSTANCE(@javax.annotation.Nonnull APIConfigConstantsINSTANCE INSTANCE) { this.INSTANCE = INSTANCE; } - public APIConfigConstants LANGUAGE(APIConfigConstantsLANGUAGE LANGUAGE) { - + public APIConfigConstants LANGUAGE(@javax.annotation.Nonnull APIConfigConstantsLANGUAGE LANGUAGE) { this.LANGUAGE = LANGUAGE; return this; } - /** + /** * Get LANGUAGE * @return LANGUAGE - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public APIConfigConstantsLANGUAGE getLANGUAGE() { return LANGUAGE; } - - public void setLANGUAGE(APIConfigConstantsLANGUAGE LANGUAGE) { + public void setLANGUAGE(@javax.annotation.Nonnull APIConfigConstantsLANGUAGE LANGUAGE) { this.LANGUAGE = LANGUAGE; } @@ -173,10 +163,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -185,51 +172,46 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("GROUPS"); - openapiFields.add("INSTANCE"); - openapiFields.add("LANGUAGE"); + openapiFields = new HashSet(Arrays.asList("GROUPS", "INSTANCE", "LANGUAGE")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("GROUPS"); - openapiRequiredFields.add("INSTANCE"); - openapiRequiredFields.add("LANGUAGE"); + openapiRequiredFields = new HashSet(Arrays.asList("GROUPS", "INSTANCE", "LANGUAGE")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigConstants - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigConstants.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigConstants is not found in the empty JSON string", APIConfigConstants.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigConstants + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigConstants.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigConstants is not found in the empty JSON string", APIConfigConstants.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigConstants.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigConstants` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigConstants` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : APIConfigConstants.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `GROUPS` - APIConfigConstantsGROUPS.validateJsonObject(jsonObj.getAsJsonObject("GROUPS")); + APIConfigConstantsGROUPS.validateJsonElement(jsonObj.get("GROUPS")); // validate the required field `INSTANCE` - APIConfigConstantsINSTANCE.validateJsonObject(jsonObj.getAsJsonObject("INSTANCE")); + APIConfigConstantsINSTANCE.validateJsonElement(jsonObj.get("INSTANCE")); // validate the required field `LANGUAGE` - APIConfigConstantsLANGUAGE.validateJsonObject(jsonObj.getAsJsonObject("LANGUAGE")); + APIConfigConstantsLANGUAGE.validateJsonElement(jsonObj.get("LANGUAGE")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -252,31 +234,31 @@ public void write(JsonWriter out, APIConfigConstants value) throws IOException { @Override public APIConfigConstants read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigConstants given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigConstants - * @throws IOException if the JSON string is invalid with respect to APIConfigConstants - */ + /** + * Create an instance of APIConfigConstants given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigConstants + * @throws IOException if the JSON string is invalid with respect to APIConfigConstants + */ public static APIConfigConstants fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigConstants.class); } - /** - * Convert an instance of APIConfigConstants to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigConstants to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsGROUPS.java b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsGROUPS.java index 2b3e8713..ae110265 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsGROUPS.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsGROUPS.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,77 +49,81 @@ /** * Group-related constants */ -@ApiModel(description = "Group-related constants") -@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 APIConfigConstantsGROUPS { public static final String SERIALIZED_NAME_C_A_P_A_C_I_T_Y = "CAPACITY"; @SerializedName(SERIALIZED_NAME_C_A_P_A_C_I_T_Y) + @javax.annotation.Nullable private Integer CAPACITY = 100000; public static final String SERIALIZED_NAME_G_R_O_U_P_T_R_A_N_S_F_E_R_R_E_Q_U_I_R_E_M_E_N_T_S = "GROUP_TRANSFER_REQUIREMENTS"; @SerializedName(SERIALIZED_NAME_G_R_O_U_P_T_R_A_N_S_F_E_R_R_E_Q_U_I_R_E_M_E_N_T_S) - private List GROUP_TRANSFER_REQUIREMENTS = null; + @javax.annotation.Nullable + private List GROUP_TRANSFER_REQUIREMENTS = new ArrayList<>(); public static final String SERIALIZED_NAME_M_A_X_I_N_V_I_T_E_S_R_E_Q_U_E_S_T_S = "MAX_INVITES_REQUESTS"; @SerializedName(SERIALIZED_NAME_M_A_X_I_N_V_I_T_E_S_R_E_Q_U_E_S_T_S) + @javax.annotation.Nullable private Integer MAX_INVITES_REQUESTS = 50; public static final String SERIALIZED_NAME_M_A_X_J_O_I_N_E_D = "MAX_JOINED"; @SerializedName(SERIALIZED_NAME_M_A_X_J_O_I_N_E_D) + @javax.annotation.Nullable private Integer MAX_JOINED = 100; public static final String SERIALIZED_NAME_M_A_X_J_O_I_N_E_D_P_L_U_S = "MAX_JOINED_PLUS"; @SerializedName(SERIALIZED_NAME_M_A_X_J_O_I_N_E_D_P_L_U_S) + @javax.annotation.Nullable private Integer MAX_JOINED_PLUS = 200; public static final String SERIALIZED_NAME_M_A_X_L_A_N_G_U_A_G_E_S = "MAX_LANGUAGES"; @SerializedName(SERIALIZED_NAME_M_A_X_L_A_N_G_U_A_G_E_S) + @javax.annotation.Nullable private Integer MAX_LANGUAGES = 10; public static final String SERIALIZED_NAME_M_A_X_L_I_N_K_S = "MAX_LINKS"; @SerializedName(SERIALIZED_NAME_M_A_X_L_I_N_K_S) + @javax.annotation.Nullable private Integer MAX_LINKS = 3; public static final String SERIALIZED_NAME_M_A_X_M_A_N_A_G_E_M_E_N_T_R_O_L_E_S = "MAX_MANAGEMENT_ROLES"; @SerializedName(SERIALIZED_NAME_M_A_X_M_A_N_A_G_E_M_E_N_T_R_O_L_E_S) + @javax.annotation.Nullable private Integer MAX_MANAGEMENT_ROLES = 5; public static final String SERIALIZED_NAME_M_A_X_O_W_N_E_D = "MAX_OWNED"; @SerializedName(SERIALIZED_NAME_M_A_X_O_W_N_E_D) + @javax.annotation.Nullable private Integer MAX_OWNED = 5; public static final String SERIALIZED_NAME_M_A_X_R_O_L_E_S = "MAX_ROLES"; @SerializedName(SERIALIZED_NAME_M_A_X_R_O_L_E_S) + @javax.annotation.Nullable private Integer MAX_ROLES = 50; public APIConfigConstantsGROUPS() { } - public APIConfigConstantsGROUPS CAPACITY(Integer CAPACITY) { - + public APIConfigConstantsGROUPS CAPACITY(@javax.annotation.Nullable Integer CAPACITY) { this.CAPACITY = CAPACITY; return this; } - /** + /** * Maximum group capacity * @return CAPACITY - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum group capacity") - public Integer getCAPACITY() { return CAPACITY; } - - public void setCAPACITY(Integer CAPACITY) { + public void setCAPACITY(@javax.annotation.Nullable Integer CAPACITY) { this.CAPACITY = CAPACITY; } - public APIConfigConstantsGROUPS GROUP_TRANSFER_REQUIREMENTS(List GROUP_TRANSFER_REQUIREMENTS) { - + public APIConfigConstantsGROUPS GROUP_TRANSFER_REQUIREMENTS(@javax.annotation.Nullable List GROUP_TRANSFER_REQUIREMENTS) { this.GROUP_TRANSFER_REQUIREMENTS = GROUP_TRANSFER_REQUIREMENTS; return this; } @@ -132,203 +136,168 @@ public APIConfigConstantsGROUPS addGROUPTRANSFERREQUIREMENTSItem(String GROUP_TR return this; } - /** + /** * Requirements for transferring group ownership * @return GROUP_TRANSFER_REQUIREMENTS - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Requirements for transferring group ownership") - public List getGROUPTRANSFERREQUIREMENTS() { return GROUP_TRANSFER_REQUIREMENTS; } - - public void setGROUPTRANSFERREQUIREMENTS(List GROUP_TRANSFER_REQUIREMENTS) { + public void setGROUPTRANSFERREQUIREMENTS(@javax.annotation.Nullable List GROUP_TRANSFER_REQUIREMENTS) { this.GROUP_TRANSFER_REQUIREMENTS = GROUP_TRANSFER_REQUIREMENTS; } - public APIConfigConstantsGROUPS MAX_INVITES_REQUESTS(Integer MAX_INVITES_REQUESTS) { - + public APIConfigConstantsGROUPS MAX_INVITES_REQUESTS(@javax.annotation.Nullable Integer MAX_INVITES_REQUESTS) { this.MAX_INVITES_REQUESTS = MAX_INVITES_REQUESTS; return this; } - /** + /** * Maximum number of invite requests * @return MAX_INVITES_REQUESTS - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum number of invite requests") - public Integer getMAXINVITESREQUESTS() { return MAX_INVITES_REQUESTS; } - - public void setMAXINVITESREQUESTS(Integer MAX_INVITES_REQUESTS) { + public void setMAXINVITESREQUESTS(@javax.annotation.Nullable Integer MAX_INVITES_REQUESTS) { this.MAX_INVITES_REQUESTS = MAX_INVITES_REQUESTS; } - public APIConfigConstantsGROUPS MAX_JOINED(Integer MAX_JOINED) { - + public APIConfigConstantsGROUPS MAX_JOINED(@javax.annotation.Nullable Integer MAX_JOINED) { this.MAX_JOINED = MAX_JOINED; return this; } - /** + /** * Maximum number of joined groups * @return MAX_JOINED - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum number of joined groups") - public Integer getMAXJOINED() { return MAX_JOINED; } - - public void setMAXJOINED(Integer MAX_JOINED) { + public void setMAXJOINED(@javax.annotation.Nullable Integer MAX_JOINED) { this.MAX_JOINED = MAX_JOINED; } - public APIConfigConstantsGROUPS MAX_JOINED_PLUS(Integer MAX_JOINED_PLUS) { - + public APIConfigConstantsGROUPS MAX_JOINED_PLUS(@javax.annotation.Nullable Integer MAX_JOINED_PLUS) { this.MAX_JOINED_PLUS = MAX_JOINED_PLUS; return this; } - /** + /** * Maximum number of joined groups for VRChat Plus members * @return MAX_JOINED_PLUS - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum number of joined groups for VRChat Plus members") - public Integer getMAXJOINEDPLUS() { return MAX_JOINED_PLUS; } - - public void setMAXJOINEDPLUS(Integer MAX_JOINED_PLUS) { + public void setMAXJOINEDPLUS(@javax.annotation.Nullable Integer MAX_JOINED_PLUS) { this.MAX_JOINED_PLUS = MAX_JOINED_PLUS; } - public APIConfigConstantsGROUPS MAX_LANGUAGES(Integer MAX_LANGUAGES) { - + public APIConfigConstantsGROUPS MAX_LANGUAGES(@javax.annotation.Nullable Integer MAX_LANGUAGES) { this.MAX_LANGUAGES = MAX_LANGUAGES; return this; } - /** + /** * Maximum number of supported languages * @return MAX_LANGUAGES - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum number of supported languages") - public Integer getMAXLANGUAGES() { return MAX_LANGUAGES; } - - public void setMAXLANGUAGES(Integer MAX_LANGUAGES) { + public void setMAXLANGUAGES(@javax.annotation.Nullable Integer MAX_LANGUAGES) { this.MAX_LANGUAGES = MAX_LANGUAGES; } - public APIConfigConstantsGROUPS MAX_LINKS(Integer MAX_LINKS) { - + public APIConfigConstantsGROUPS MAX_LINKS(@javax.annotation.Nullable Integer MAX_LINKS) { this.MAX_LINKS = MAX_LINKS; return this; } - /** + /** * Maximum number of group links * @return MAX_LINKS - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum number of group links") - public Integer getMAXLINKS() { return MAX_LINKS; } - - public void setMAXLINKS(Integer MAX_LINKS) { + public void setMAXLINKS(@javax.annotation.Nullable Integer MAX_LINKS) { this.MAX_LINKS = MAX_LINKS; } - public APIConfigConstantsGROUPS MAX_MANAGEMENT_ROLES(Integer MAX_MANAGEMENT_ROLES) { - + public APIConfigConstantsGROUPS MAX_MANAGEMENT_ROLES(@javax.annotation.Nullable Integer MAX_MANAGEMENT_ROLES) { this.MAX_MANAGEMENT_ROLES = MAX_MANAGEMENT_ROLES; return this; } - /** + /** * Maximum number of management roles in a group * @return MAX_MANAGEMENT_ROLES - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum number of management roles in a group") - public Integer getMAXMANAGEMENTROLES() { return MAX_MANAGEMENT_ROLES; } - - public void setMAXMANAGEMENTROLES(Integer MAX_MANAGEMENT_ROLES) { + public void setMAXMANAGEMENTROLES(@javax.annotation.Nullable Integer MAX_MANAGEMENT_ROLES) { this.MAX_MANAGEMENT_ROLES = MAX_MANAGEMENT_ROLES; } - public APIConfigConstantsGROUPS MAX_OWNED(Integer MAX_OWNED) { - + public APIConfigConstantsGROUPS MAX_OWNED(@javax.annotation.Nullable Integer MAX_OWNED) { this.MAX_OWNED = MAX_OWNED; return this; } - /** + /** * Maximum number of groups a user can own * @return MAX_OWNED - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum number of groups a user can own") - public Integer getMAXOWNED() { return MAX_OWNED; } - - public void setMAXOWNED(Integer MAX_OWNED) { + public void setMAXOWNED(@javax.annotation.Nullable Integer MAX_OWNED) { this.MAX_OWNED = MAX_OWNED; } - public APIConfigConstantsGROUPS MAX_ROLES(Integer MAX_ROLES) { - + public APIConfigConstantsGROUPS MAX_ROLES(@javax.annotation.Nullable Integer MAX_ROLES) { this.MAX_ROLES = MAX_ROLES; return this; } - /** + /** * Maximum number of roles in a group * @return MAX_ROLES - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum number of roles in a group") - public Integer getMAXROLES() { return MAX_ROLES; } - - public void setMAXROLES(Integer MAX_ROLES) { + public void setMAXROLES(@javax.annotation.Nullable Integer MAX_ROLES) { this.MAX_ROLES = MAX_ROLES; } @@ -383,10 +352,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -395,45 +361,36 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CAPACITY"); - openapiFields.add("GROUP_TRANSFER_REQUIREMENTS"); - openapiFields.add("MAX_INVITES_REQUESTS"); - openapiFields.add("MAX_JOINED"); - openapiFields.add("MAX_JOINED_PLUS"); - openapiFields.add("MAX_LANGUAGES"); - openapiFields.add("MAX_LINKS"); - openapiFields.add("MAX_MANAGEMENT_ROLES"); - openapiFields.add("MAX_OWNED"); - openapiFields.add("MAX_ROLES"); + openapiFields = new HashSet(Arrays.asList("CAPACITY", "GROUP_TRANSFER_REQUIREMENTS", "MAX_INVITES_REQUESTS", "MAX_JOINED", "MAX_JOINED_PLUS", "MAX_LANGUAGES", "MAX_LINKS", "MAX_MANAGEMENT_ROLES", "MAX_OWNED", "MAX_ROLES")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigConstantsGROUPS - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigConstantsGROUPS.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigConstantsGROUPS is not found in the empty JSON string", APIConfigConstantsGROUPS.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigConstantsGROUPS + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigConstantsGROUPS.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigConstantsGROUPS is not found in the empty JSON string", APIConfigConstantsGROUPS.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigConstantsGROUPS.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigConstantsGROUPS` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigConstantsGROUPS` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("GROUP_TRANSFER_REQUIREMENTS") != null && !jsonObj.get("GROUP_TRANSFER_REQUIREMENTS").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `GROUP_TRANSFER_REQUIREMENTS` to be an array in the JSON string but got `%s`", jsonObj.get("GROUP_TRANSFER_REQUIREMENTS").toString())); + if (jsonObj.get("GROUP_TRANSFER_REQUIREMENTS") != null && !jsonObj.get("GROUP_TRANSFER_REQUIREMENTS").isJsonNull() && !jsonObj.get("GROUP_TRANSFER_REQUIREMENTS").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `GROUP_TRANSFER_REQUIREMENTS` to be an array in the JSON string but got `%s`", jsonObj.get("GROUP_TRANSFER_REQUIREMENTS").toString())); } } @@ -457,31 +414,31 @@ public void write(JsonWriter out, APIConfigConstantsGROUPS value) throws IOExcep @Override public APIConfigConstantsGROUPS read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigConstantsGROUPS given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigConstantsGROUPS - * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsGROUPS - */ + /** + * Create an instance of APIConfigConstantsGROUPS given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigConstantsGROUPS + * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsGROUPS + */ public static APIConfigConstantsGROUPS fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigConstantsGROUPS.class); } - /** - * Convert an instance of APIConfigConstantsGROUPS to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigConstantsGROUPS to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCE.java b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCE.java index 5438f05c..4e927429 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCE.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCE.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETS; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,35 +48,31 @@ /** * Instance-related constants */ -@ApiModel(description = "Instance-related constants") -@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 APIConfigConstantsINSTANCE { public static final String SERIALIZED_NAME_P_O_P_U_L_A_T_I_O_N_B_R_A_C_K_E_T_S = "POPULATION_BRACKETS"; @SerializedName(SERIALIZED_NAME_P_O_P_U_L_A_T_I_O_N_B_R_A_C_K_E_T_S) + @javax.annotation.Nullable private APIConfigConstantsINSTANCEPOPULATIONBRACKETS POPULATION_BRACKETS; public APIConfigConstantsINSTANCE() { } - public APIConfigConstantsINSTANCE POPULATION_BRACKETS(APIConfigConstantsINSTANCEPOPULATIONBRACKETS POPULATION_BRACKETS) { - + public APIConfigConstantsINSTANCE POPULATION_BRACKETS(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETS POPULATION_BRACKETS) { this.POPULATION_BRACKETS = POPULATION_BRACKETS; return this; } - /** + /** * Get POPULATION_BRACKETS * @return POPULATION_BRACKETS - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public APIConfigConstantsINSTANCEPOPULATIONBRACKETS getPOPULATIONBRACKETS() { return POPULATION_BRACKETS; } - - public void setPOPULATIONBRACKETS(APIConfigConstantsINSTANCEPOPULATIONBRACKETS POPULATION_BRACKETS) { + public void setPOPULATIONBRACKETS(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETS POPULATION_BRACKETS) { this.POPULATION_BRACKETS = POPULATION_BRACKETS; } @@ -113,10 +109,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -125,36 +118,36 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("POPULATION_BRACKETS"); + openapiFields = new HashSet(Arrays.asList("POPULATION_BRACKETS")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigConstantsINSTANCE - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigConstantsINSTANCE.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigConstantsINSTANCE is not found in the empty JSON string", APIConfigConstantsINSTANCE.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigConstantsINSTANCE + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigConstantsINSTANCE.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigConstantsINSTANCE is not found in the empty JSON string", APIConfigConstantsINSTANCE.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigConstantsINSTANCE.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigConstantsINSTANCE` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigConstantsINSTANCE` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `POPULATION_BRACKETS` if (jsonObj.get("POPULATION_BRACKETS") != null && !jsonObj.get("POPULATION_BRACKETS").isJsonNull()) { - APIConfigConstantsINSTANCEPOPULATIONBRACKETS.validateJsonObject(jsonObj.getAsJsonObject("POPULATION_BRACKETS")); + APIConfigConstantsINSTANCEPOPULATIONBRACKETS.validateJsonElement(jsonObj.get("POPULATION_BRACKETS")); } } @@ -178,31 +171,31 @@ public void write(JsonWriter out, APIConfigConstantsINSTANCE value) throws IOExc @Override public APIConfigConstantsINSTANCE read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigConstantsINSTANCE given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigConstantsINSTANCE - * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsINSTANCE - */ + /** + * Create an instance of APIConfigConstantsINSTANCE given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigConstantsINSTANCE + * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsINSTANCE + */ public static APIConfigConstantsINSTANCE fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigConstantsINSTANCE.class); } - /** - * Convert an instance of APIConfigConstantsINSTANCE to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigConstantsINSTANCE to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETS.java b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETS.java index d81a64da..ce92e07d 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETS.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETS.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,9 +21,8 @@ import io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED; import io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW; import io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,89 +50,79 @@ /** * Population brackets based on instance population */ -@ApiModel(description = "Population brackets based on instance population") -@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 APIConfigConstantsINSTANCEPOPULATIONBRACKETS { public static final String SERIALIZED_NAME_C_R_O_W_D_E_D = "CROWDED"; @SerializedName(SERIALIZED_NAME_C_R_O_W_D_E_D) + @javax.annotation.Nullable private APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED CROWDED; public static final String SERIALIZED_NAME_F_E_W = "FEW"; @SerializedName(SERIALIZED_NAME_F_E_W) + @javax.annotation.Nullable private APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW FEW; public static final String SERIALIZED_NAME_M_A_N_Y = "MANY"; @SerializedName(SERIALIZED_NAME_M_A_N_Y) + @javax.annotation.Nullable private APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY MANY; public APIConfigConstantsINSTANCEPOPULATIONBRACKETS() { } - public APIConfigConstantsINSTANCEPOPULATIONBRACKETS CROWDED(APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED CROWDED) { - + public APIConfigConstantsINSTANCEPOPULATIONBRACKETS CROWDED(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED CROWDED) { this.CROWDED = CROWDED; return this; } - /** + /** * Get CROWDED * @return CROWDED - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED getCROWDED() { return CROWDED; } - - public void setCROWDED(APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED CROWDED) { + public void setCROWDED(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED CROWDED) { this.CROWDED = CROWDED; } - public APIConfigConstantsINSTANCEPOPULATIONBRACKETS FEW(APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW FEW) { - + public APIConfigConstantsINSTANCEPOPULATIONBRACKETS FEW(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW FEW) { this.FEW = FEW; return this; } - /** + /** * Get FEW * @return FEW - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW getFEW() { return FEW; } - - public void setFEW(APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW FEW) { + public void setFEW(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW FEW) { this.FEW = FEW; } - public APIConfigConstantsINSTANCEPOPULATIONBRACKETS MANY(APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY MANY) { - + public APIConfigConstantsINSTANCEPOPULATIONBRACKETS MANY(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY MANY) { this.MANY = MANY; return this; } - /** + /** * Get MANY * @return MANY - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY getMANY() { return MANY; } - - public void setMANY(APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY MANY) { + public void setMANY(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY MANY) { this.MANY = MANY; } @@ -173,10 +163,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -185,46 +172,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("CROWDED"); - openapiFields.add("FEW"); - openapiFields.add("MANY"); + openapiFields = new HashSet(Arrays.asList("CROWDED", "FEW", "MANY")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETS - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETS.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigConstantsINSTANCEPOPULATIONBRACKETS is not found in the empty JSON string", APIConfigConstantsINSTANCEPOPULATIONBRACKETS.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETS + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETS.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigConstantsINSTANCEPOPULATIONBRACKETS is not found in the empty JSON string", APIConfigConstantsINSTANCEPOPULATIONBRACKETS.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETS.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigConstantsINSTANCEPOPULATIONBRACKETS` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigConstantsINSTANCEPOPULATIONBRACKETS` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `CROWDED` if (jsonObj.get("CROWDED") != null && !jsonObj.get("CROWDED").isJsonNull()) { - APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.validateJsonObject(jsonObj.getAsJsonObject("CROWDED")); + APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.validateJsonElement(jsonObj.get("CROWDED")); } // validate the optional field `FEW` if (jsonObj.get("FEW") != null && !jsonObj.get("FEW").isJsonNull()) { - APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.validateJsonObject(jsonObj.getAsJsonObject("FEW")); + APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.validateJsonElement(jsonObj.get("FEW")); } // validate the optional field `MANY` if (jsonObj.get("MANY") != null && !jsonObj.get("MANY").isJsonNull()) { - APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.validateJsonObject(jsonObj.getAsJsonObject("MANY")); + APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.validateJsonElement(jsonObj.get("MANY")); } } @@ -248,31 +233,31 @@ public void write(JsonWriter out, APIConfigConstantsINSTANCEPOPULATIONBRACKETS v @Override public APIConfigConstantsINSTANCEPOPULATIONBRACKETS read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETS given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETS - * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETS - */ + /** + * Create an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETS given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETS + * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETS + */ public static APIConfigConstantsINSTANCEPOPULATIONBRACKETS fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigConstantsINSTANCEPOPULATIONBRACKETS.class); } - /** - * Convert an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETS to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETS to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.java b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.java index 0e7a276f..daa1a6d5 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,55 @@ /** * Crowded population range */ -@ApiModel(description = "Crowded population range") -@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 APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED { public static final String SERIALIZED_NAME_MAX = "max"; @SerializedName(SERIALIZED_NAME_MAX) + @javax.annotation.Nullable private Integer max; public static final String SERIALIZED_NAME_MIN = "min"; @SerializedName(SERIALIZED_NAME_MIN) + @javax.annotation.Nullable private Integer min; public APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED() { } - public APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED max(Integer max) { - + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED max(@javax.annotation.Nullable Integer max) { this.max = max; return this; } - /** + /** * Maximum population for a crowded instance * @return max - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum population for a crowded instance") - public Integer getMax() { return max; } - - public void setMax(Integer max) { + public void setMax(@javax.annotation.Nullable Integer max) { this.max = max; } - public APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED min(Integer min) { - + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED min(@javax.annotation.Nullable Integer min) { this.min = min; return this; } - /** + /** * Minimum population for a crowded instance * @return min - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Minimum population for a crowded instance") - public Integer getMin() { return min; } - - public void setMin(Integer min) { + public void setMin(@javax.annotation.Nullable Integer min) { this.min = min; } @@ -141,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,34 +143,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("max"); - openapiFields.add("min"); + openapiFields = new HashSet(Arrays.asList("max", "min")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED is not found in the empty JSON string", APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED is not found in the empty JSON string", APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -203,31 +192,31 @@ public void write(JsonWriter out, APIConfigConstantsINSTANCEPOPULATIONBRACKETSCR @Override public APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED - * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED - */ + /** + * Create an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED + * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED + */ public static APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.class); } - /** - * Convert an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.java b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.java index 987686e6..ab96a6ac 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,55 @@ /** * Few population range */ -@ApiModel(description = "Few population range") -@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 APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW { public static final String SERIALIZED_NAME_MAX = "max"; @SerializedName(SERIALIZED_NAME_MAX) + @javax.annotation.Nullable private Integer max; public static final String SERIALIZED_NAME_MIN = "min"; @SerializedName(SERIALIZED_NAME_MIN) + @javax.annotation.Nullable private Integer min; public APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW() { } - public APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW max(Integer max) { - + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW max(@javax.annotation.Nullable Integer max) { this.max = max; return this; } - /** + /** * Maximum population for a few instance * @return max - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum population for a few instance") - public Integer getMax() { return max; } - - public void setMax(Integer max) { + public void setMax(@javax.annotation.Nullable Integer max) { this.max = max; } - public APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW min(Integer min) { - + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW min(@javax.annotation.Nullable Integer min) { this.min = min; return this; } - /** + /** * Minimum population for a few instance * @return min - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Minimum population for a few instance") - public Integer getMin() { return min; } - - public void setMin(Integer min) { + public void setMin(@javax.annotation.Nullable Integer min) { this.min = min; } @@ -141,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,34 +143,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("max"); - openapiFields.add("min"); + openapiFields = new HashSet(Arrays.asList("max", "min")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW is not found in the empty JSON string", APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW is not found in the empty JSON string", APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -203,31 +192,31 @@ public void write(JsonWriter out, APIConfigConstantsINSTANCEPOPULATIONBRACKETSFE @Override public APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW - * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW - */ + /** + * Create an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW + * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW + */ public static APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.class); } - /** - * Convert an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.java b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.java index b53c2e7b..6d83ca1d 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,55 @@ /** * Many population range */ -@ApiModel(description = "Many population range") -@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 APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY { public static final String SERIALIZED_NAME_MAX = "max"; @SerializedName(SERIALIZED_NAME_MAX) + @javax.annotation.Nullable private Integer max; public static final String SERIALIZED_NAME_MIN = "min"; @SerializedName(SERIALIZED_NAME_MIN) + @javax.annotation.Nullable private Integer min; public APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY() { } - public APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY max(Integer max) { - + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY max(@javax.annotation.Nullable Integer max) { this.max = max; return this; } - /** + /** * Maximum population for a many instance * @return max - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum population for a many instance") - public Integer getMax() { return max; } - - public void setMax(Integer max) { + public void setMax(@javax.annotation.Nullable Integer max) { this.max = max; } - public APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY min(Integer min) { - + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY min(@javax.annotation.Nullable Integer min) { this.min = min; return this; } - /** + /** * Minimum population for a many instance * @return min - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Minimum population for a many instance") - public Integer getMin() { return min; } - - public void setMin(Integer min) { + public void setMin(@javax.annotation.Nullable Integer min) { this.min = min; } @@ -141,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,34 +143,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("max"); - openapiFields.add("min"); + openapiFields = new HashSet(Arrays.asList("max", "min")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY is not found in the empty JSON string", APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY is not found in the empty JSON string", APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -203,31 +192,31 @@ public void write(JsonWriter out, APIConfigConstantsINSTANCEPOPULATIONBRACKETSMA @Override public APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY - * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY - */ + /** + * Create an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY + * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY + */ public static APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.class); } - /** - * Convert an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsLANGUAGE.java b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsLANGUAGE.java index 4d1031f0..3b37ad44 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigConstantsLANGUAGE.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsLANGUAGE.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,18 +49,17 @@ /** * Language-related constants */ -@ApiModel(description = "Language-related constants") -@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 APIConfigConstantsLANGUAGE { public static final String SERIALIZED_NAME_S_P_O_K_E_N_L_A_N_G_U_A_G_E_O_P_T_I_O_N_S = "SPOKEN_LANGUAGE_OPTIONS"; @SerializedName(SERIALIZED_NAME_S_P_O_K_E_N_L_A_N_G_U_A_G_E_O_P_T_I_O_N_S) - private Map SPOKEN_LANGUAGE_OPTIONS = null; + @javax.annotation.Nullable + private Map SPOKEN_LANGUAGE_OPTIONS = new HashMap<>(); public APIConfigConstantsLANGUAGE() { } - public APIConfigConstantsLANGUAGE SPOKEN_LANGUAGE_OPTIONS(Map SPOKEN_LANGUAGE_OPTIONS) { - + public APIConfigConstantsLANGUAGE SPOKEN_LANGUAGE_OPTIONS(@javax.annotation.Nullable Map SPOKEN_LANGUAGE_OPTIONS) { this.SPOKEN_LANGUAGE_OPTIONS = SPOKEN_LANGUAGE_OPTIONS; return this; } @@ -73,19 +72,16 @@ public APIConfigConstantsLANGUAGE putSPOKENLANGUAGEOPTIONSItem(String key, Strin return this; } - /** + /** * Supported spoken language options * @return SPOKEN_LANGUAGE_OPTIONS - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Supported spoken language options") - public Map getSPOKENLANGUAGEOPTIONS() { return SPOKEN_LANGUAGE_OPTIONS; } - - public void setSPOKENLANGUAGEOPTIONS(Map SPOKEN_LANGUAGE_OPTIONS) { + public void setSPOKENLANGUAGEOPTIONS(@javax.annotation.Nullable Map SPOKEN_LANGUAGE_OPTIONS) { this.SPOKEN_LANGUAGE_OPTIONS = SPOKEN_LANGUAGE_OPTIONS; } @@ -122,10 +118,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -134,33 +127,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("SPOKEN_LANGUAGE_OPTIONS"); + openapiFields = new HashSet(Arrays.asList("SPOKEN_LANGUAGE_OPTIONS")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigConstantsLANGUAGE - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigConstantsLANGUAGE.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigConstantsLANGUAGE is not found in the empty JSON string", APIConfigConstantsLANGUAGE.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigConstantsLANGUAGE + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigConstantsLANGUAGE.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigConstantsLANGUAGE is not found in the empty JSON string", APIConfigConstantsLANGUAGE.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigConstantsLANGUAGE.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigConstantsLANGUAGE` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigConstantsLANGUAGE` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -183,31 +176,31 @@ public void write(JsonWriter out, APIConfigConstantsLANGUAGE value) throws IOExc @Override public APIConfigConstantsLANGUAGE read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigConstantsLANGUAGE given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigConstantsLANGUAGE - * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsLANGUAGE - */ + /** + * Create an instance of APIConfigConstantsLANGUAGE given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigConstantsLANGUAGE + * @throws IOException if the JSON string is invalid with respect to APIConfigConstantsLANGUAGE + */ public static APIConfigConstantsLANGUAGE fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigConstantsLANGUAGE.class); } - /** - * Convert an instance of APIConfigConstantsLANGUAGE to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigConstantsLANGUAGE to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigDownloadURLList.java b/src/main/java/io/github/vrchatapi/model/APIConfigDownloadURLList.java index 65bf0423..a51281df 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigDownloadURLList.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigDownloadURLList.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,145 +47,132 @@ /** * Download links for various development assets. */ -@ApiModel(description = "Download links for various development assets.") -@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 APIConfigDownloadURLList { public static final String SERIALIZED_NAME_BOOTSTRAP = "bootstrap"; @SerializedName(SERIALIZED_NAME_BOOTSTRAP) + @javax.annotation.Nonnull private String bootstrap; public static final String SERIALIZED_NAME_SDK2 = "sdk2"; + @Deprecated @SerializedName(SERIALIZED_NAME_SDK2) + @javax.annotation.Nonnull private String sdk2; public static final String SERIALIZED_NAME_SDK3_AVATARS = "sdk3-avatars"; @SerializedName(SERIALIZED_NAME_SDK3_AVATARS) + @javax.annotation.Nonnull private String sdk3Avatars; public static final String SERIALIZED_NAME_SDK3_WORLDS = "sdk3-worlds"; @SerializedName(SERIALIZED_NAME_SDK3_WORLDS) + @javax.annotation.Nonnull private String sdk3Worlds; public static final String SERIALIZED_NAME_VCC = "vcc"; @SerializedName(SERIALIZED_NAME_VCC) + @javax.annotation.Nonnull private String vcc; public APIConfigDownloadURLList() { } - public APIConfigDownloadURLList bootstrap(String bootstrap) { - + public APIConfigDownloadURLList bootstrap(@javax.annotation.Nonnull String bootstrap) { this.bootstrap = bootstrap; return this; } - /** + /** * Download link for ??? * @return bootstrap - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Download link for ???") - public String getBootstrap() { return bootstrap; } - - public void setBootstrap(String bootstrap) { + public void setBootstrap(@javax.annotation.Nonnull String bootstrap) { this.bootstrap = bootstrap; } - public APIConfigDownloadURLList sdk2(String sdk2) { - + @Deprecated + public APIConfigDownloadURLList sdk2(@javax.annotation.Nonnull String sdk2) { this.sdk2 = sdk2; return this; } - /** + /** * Download link for legacy SDK2 * @return sdk2 * @deprecated - **/ + */ @Deprecated @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Download link for legacy SDK2") - public String getSdk2() { return sdk2; } - - public void setSdk2(String sdk2) { + @Deprecated + public void setSdk2(@javax.annotation.Nonnull String sdk2) { this.sdk2 = sdk2; } - public APIConfigDownloadURLList sdk3Avatars(String sdk3Avatars) { - + public APIConfigDownloadURLList sdk3Avatars(@javax.annotation.Nonnull String sdk3Avatars) { this.sdk3Avatars = sdk3Avatars; return this; } - /** + /** * Download link for SDK3 for Avatars * @return sdk3Avatars - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Download link for SDK3 for Avatars") - public String getSdk3Avatars() { return sdk3Avatars; } - - public void setSdk3Avatars(String sdk3Avatars) { + public void setSdk3Avatars(@javax.annotation.Nonnull String sdk3Avatars) { this.sdk3Avatars = sdk3Avatars; } - public APIConfigDownloadURLList sdk3Worlds(String sdk3Worlds) { - + public APIConfigDownloadURLList sdk3Worlds(@javax.annotation.Nonnull String sdk3Worlds) { this.sdk3Worlds = sdk3Worlds; return this; } - /** + /** * Download link for SDK3 for Worlds * @return sdk3Worlds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Download link for SDK3 for Worlds") - public String getSdk3Worlds() { return sdk3Worlds; } - - public void setSdk3Worlds(String sdk3Worlds) { + public void setSdk3Worlds(@javax.annotation.Nonnull String sdk3Worlds) { this.sdk3Worlds = sdk3Worlds; } - public APIConfigDownloadURLList vcc(String vcc) { - + public APIConfigDownloadURLList vcc(@javax.annotation.Nonnull String vcc) { this.vcc = vcc; return this; } - /** + /** * Download link for the Creator Companion * @return vcc - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Download link for the Creator Companion") - public String getVcc() { return vcc; } - - public void setVcc(String vcc) { + public void setVcc(@javax.annotation.Nonnull String vcc) { this.vcc = vcc; } @@ -230,10 +217,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -242,63 +226,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bootstrap"); - openapiFields.add("sdk2"); - openapiFields.add("sdk3-avatars"); - openapiFields.add("sdk3-worlds"); - openapiFields.add("vcc"); + openapiFields = new HashSet(Arrays.asList("bootstrap", "sdk2", "sdk3-avatars", "sdk3-worlds", "vcc")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("bootstrap"); - openapiRequiredFields.add("sdk2"); - openapiRequiredFields.add("sdk3-avatars"); - openapiRequiredFields.add("sdk3-worlds"); - openapiRequiredFields.add("vcc"); + openapiRequiredFields = new HashSet(Arrays.asList("bootstrap", "sdk2", "sdk3-avatars", "sdk3-worlds", "vcc")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigDownloadURLList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigDownloadURLList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigDownloadURLList is not found in the empty JSON string", APIConfigDownloadURLList.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigDownloadURLList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigDownloadURLList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigDownloadURLList is not found in the empty JSON string", APIConfigDownloadURLList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigDownloadURLList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigDownloadURLList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigDownloadURLList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : APIConfigDownloadURLList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("bootstrap").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bootstrap` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bootstrap").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bootstrap` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bootstrap").toString())); } if (!jsonObj.get("sdk2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sdk2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdk2").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sdk2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdk2").toString())); } if (!jsonObj.get("sdk3-avatars").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sdk3-avatars` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdk3-avatars").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sdk3-avatars` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdk3-avatars").toString())); } if (!jsonObj.get("sdk3-worlds").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sdk3-worlds` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdk3-worlds").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sdk3-worlds` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdk3-worlds").toString())); } if (!jsonObj.get("vcc").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vcc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vcc").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `vcc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vcc").toString())); } } @@ -322,31 +297,31 @@ public void write(JsonWriter out, APIConfigDownloadURLList value) throws IOExcep @Override public APIConfigDownloadURLList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigDownloadURLList given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigDownloadURLList - * @throws IOException if the JSON string is invalid with respect to APIConfigDownloadURLList - */ + /** + * Create an instance of APIConfigDownloadURLList given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigDownloadURLList + * @throws IOException if the JSON string is invalid with respect to APIConfigDownloadURLList + */ public static APIConfigDownloadURLList fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigDownloadURLList.class); } - /** - * Convert an instance of APIConfigDownloadURLList to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigDownloadURLList to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigEvents.java b/src/main/java/io/github/vrchatapi/model/APIConfigEvents.java index 402f2353..c7b887be 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigEvents.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigEvents.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,304 +47,271 @@ /** * APIConfigEvents */ -@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 APIConfigEvents { public static final String SERIALIZED_NAME_DISTANCE_CLOSE = "distanceClose"; @SerializedName(SERIALIZED_NAME_DISTANCE_CLOSE) + @javax.annotation.Nonnull private Integer distanceClose; public static final String SERIALIZED_NAME_DISTANCE_FACTOR = "distanceFactor"; @SerializedName(SERIALIZED_NAME_DISTANCE_FACTOR) + @javax.annotation.Nonnull private Integer distanceFactor; public static final String SERIALIZED_NAME_DISTANCE_FAR = "distanceFar"; @SerializedName(SERIALIZED_NAME_DISTANCE_FAR) + @javax.annotation.Nonnull private Integer distanceFar; public static final String SERIALIZED_NAME_GROUP_DISTANCE = "groupDistance"; @SerializedName(SERIALIZED_NAME_GROUP_DISTANCE) + @javax.annotation.Nonnull private Integer groupDistance; public static final String SERIALIZED_NAME_MAXIMUM_BUNCH_SIZE = "maximumBunchSize"; @SerializedName(SERIALIZED_NAME_MAXIMUM_BUNCH_SIZE) + @javax.annotation.Nonnull private Integer maximumBunchSize; public static final String SERIALIZED_NAME_NOT_VISIBLE_FACTOR = "notVisibleFactor"; @SerializedName(SERIALIZED_NAME_NOT_VISIBLE_FACTOR) + @javax.annotation.Nonnull private Integer notVisibleFactor; public static final String SERIALIZED_NAME_PLAYER_ORDER_BUCKET_SIZE = "playerOrderBucketSize"; @SerializedName(SERIALIZED_NAME_PLAYER_ORDER_BUCKET_SIZE) + @javax.annotation.Nonnull private Integer playerOrderBucketSize; public static final String SERIALIZED_NAME_PLAYER_ORDER_FACTOR = "playerOrderFactor"; @SerializedName(SERIALIZED_NAME_PLAYER_ORDER_FACTOR) + @javax.annotation.Nonnull private Integer playerOrderFactor; public static final String SERIALIZED_NAME_SLOW_UPDATE_FACTOR_THRESHOLD = "slowUpdateFactorThreshold"; @SerializedName(SERIALIZED_NAME_SLOW_UPDATE_FACTOR_THRESHOLD) + @javax.annotation.Nonnull private Integer slowUpdateFactorThreshold; public static final String SERIALIZED_NAME_USE_DIRECT_PLAYER_SERIALIZATION = "useDirectPlayerSerialization"; @SerializedName(SERIALIZED_NAME_USE_DIRECT_PLAYER_SERIALIZATION) + @javax.annotation.Nonnull private Boolean useDirectPlayerSerialization; public static final String SERIALIZED_NAME_VIEW_SEGMENT_LENGTH = "viewSegmentLength"; @SerializedName(SERIALIZED_NAME_VIEW_SEGMENT_LENGTH) + @javax.annotation.Nonnull private Integer viewSegmentLength; public APIConfigEvents() { } - public APIConfigEvents distanceClose(Integer distanceClose) { - + public APIConfigEvents distanceClose(@javax.annotation.Nonnull Integer distanceClose) { this.distanceClose = distanceClose; return this; } - /** + /** * Unknown * @return distanceClose - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getDistanceClose() { return distanceClose; } - - public void setDistanceClose(Integer distanceClose) { + public void setDistanceClose(@javax.annotation.Nonnull Integer distanceClose) { this.distanceClose = distanceClose; } - public APIConfigEvents distanceFactor(Integer distanceFactor) { - + public APIConfigEvents distanceFactor(@javax.annotation.Nonnull Integer distanceFactor) { this.distanceFactor = distanceFactor; return this; } - /** + /** * Unknown * @return distanceFactor - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getDistanceFactor() { return distanceFactor; } - - public void setDistanceFactor(Integer distanceFactor) { + public void setDistanceFactor(@javax.annotation.Nonnull Integer distanceFactor) { this.distanceFactor = distanceFactor; } - public APIConfigEvents distanceFar(Integer distanceFar) { - + public APIConfigEvents distanceFar(@javax.annotation.Nonnull Integer distanceFar) { this.distanceFar = distanceFar; return this; } - /** + /** * Unknown * @return distanceFar - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getDistanceFar() { return distanceFar; } - - public void setDistanceFar(Integer distanceFar) { + public void setDistanceFar(@javax.annotation.Nonnull Integer distanceFar) { this.distanceFar = distanceFar; } - public APIConfigEvents groupDistance(Integer groupDistance) { - + public APIConfigEvents groupDistance(@javax.annotation.Nonnull Integer groupDistance) { this.groupDistance = groupDistance; return this; } - /** + /** * Unknown * @return groupDistance - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getGroupDistance() { return groupDistance; } - - public void setGroupDistance(Integer groupDistance) { + public void setGroupDistance(@javax.annotation.Nonnull Integer groupDistance) { this.groupDistance = groupDistance; } - public APIConfigEvents maximumBunchSize(Integer maximumBunchSize) { - + public APIConfigEvents maximumBunchSize(@javax.annotation.Nonnull Integer maximumBunchSize) { this.maximumBunchSize = maximumBunchSize; return this; } - /** + /** * Unknown * @return maximumBunchSize - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getMaximumBunchSize() { return maximumBunchSize; } - - public void setMaximumBunchSize(Integer maximumBunchSize) { + public void setMaximumBunchSize(@javax.annotation.Nonnull Integer maximumBunchSize) { this.maximumBunchSize = maximumBunchSize; } - public APIConfigEvents notVisibleFactor(Integer notVisibleFactor) { - + public APIConfigEvents notVisibleFactor(@javax.annotation.Nonnull Integer notVisibleFactor) { this.notVisibleFactor = notVisibleFactor; return this; } - /** + /** * Unknown * @return notVisibleFactor - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getNotVisibleFactor() { return notVisibleFactor; } - - public void setNotVisibleFactor(Integer notVisibleFactor) { + public void setNotVisibleFactor(@javax.annotation.Nonnull Integer notVisibleFactor) { this.notVisibleFactor = notVisibleFactor; } - public APIConfigEvents playerOrderBucketSize(Integer playerOrderBucketSize) { - + public APIConfigEvents playerOrderBucketSize(@javax.annotation.Nonnull Integer playerOrderBucketSize) { this.playerOrderBucketSize = playerOrderBucketSize; return this; } - /** + /** * Unknown * @return playerOrderBucketSize - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getPlayerOrderBucketSize() { return playerOrderBucketSize; } - - public void setPlayerOrderBucketSize(Integer playerOrderBucketSize) { + public void setPlayerOrderBucketSize(@javax.annotation.Nonnull Integer playerOrderBucketSize) { this.playerOrderBucketSize = playerOrderBucketSize; } - public APIConfigEvents playerOrderFactor(Integer playerOrderFactor) { - + public APIConfigEvents playerOrderFactor(@javax.annotation.Nonnull Integer playerOrderFactor) { this.playerOrderFactor = playerOrderFactor; return this; } - /** + /** * Unknown * @return playerOrderFactor - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getPlayerOrderFactor() { return playerOrderFactor; } - - public void setPlayerOrderFactor(Integer playerOrderFactor) { + public void setPlayerOrderFactor(@javax.annotation.Nonnull Integer playerOrderFactor) { this.playerOrderFactor = playerOrderFactor; } - public APIConfigEvents slowUpdateFactorThreshold(Integer slowUpdateFactorThreshold) { - + public APIConfigEvents slowUpdateFactorThreshold(@javax.annotation.Nonnull Integer slowUpdateFactorThreshold) { this.slowUpdateFactorThreshold = slowUpdateFactorThreshold; return this; } - /** + /** * Unknown * @return slowUpdateFactorThreshold - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getSlowUpdateFactorThreshold() { return slowUpdateFactorThreshold; } - - public void setSlowUpdateFactorThreshold(Integer slowUpdateFactorThreshold) { + public void setSlowUpdateFactorThreshold(@javax.annotation.Nonnull Integer slowUpdateFactorThreshold) { this.slowUpdateFactorThreshold = slowUpdateFactorThreshold; } - public APIConfigEvents useDirectPlayerSerialization(Boolean useDirectPlayerSerialization) { - + public APIConfigEvents useDirectPlayerSerialization(@javax.annotation.Nonnull Boolean useDirectPlayerSerialization) { this.useDirectPlayerSerialization = useDirectPlayerSerialization; return this; } - /** + /** * Unknown * @return useDirectPlayerSerialization - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Boolean getUseDirectPlayerSerialization() { return useDirectPlayerSerialization; } - - public void setUseDirectPlayerSerialization(Boolean useDirectPlayerSerialization) { + public void setUseDirectPlayerSerialization(@javax.annotation.Nonnull Boolean useDirectPlayerSerialization) { this.useDirectPlayerSerialization = useDirectPlayerSerialization; } - public APIConfigEvents viewSegmentLength(Integer viewSegmentLength) { - + public APIConfigEvents viewSegmentLength(@javax.annotation.Nonnull Integer viewSegmentLength) { this.viewSegmentLength = viewSegmentLength; return this; } - /** + /** * Unknown * @return viewSegmentLength - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public Integer getViewSegmentLength() { return viewSegmentLength; } - - public void setViewSegmentLength(Integer viewSegmentLength) { + public void setViewSegmentLength(@javax.annotation.Nonnull Integer viewSegmentLength) { this.viewSegmentLength = viewSegmentLength; } @@ -401,10 +368,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -413,61 +377,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("distanceClose"); - openapiFields.add("distanceFactor"); - openapiFields.add("distanceFar"); - openapiFields.add("groupDistance"); - openapiFields.add("maximumBunchSize"); - openapiFields.add("notVisibleFactor"); - openapiFields.add("playerOrderBucketSize"); - openapiFields.add("playerOrderFactor"); - openapiFields.add("slowUpdateFactorThreshold"); - openapiFields.add("useDirectPlayerSerialization"); - openapiFields.add("viewSegmentLength"); + openapiFields = new HashSet(Arrays.asList("distanceClose", "distanceFactor", "distanceFar", "groupDistance", "maximumBunchSize", "notVisibleFactor", "playerOrderBucketSize", "playerOrderFactor", "slowUpdateFactorThreshold", "useDirectPlayerSerialization", "viewSegmentLength")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("distanceClose"); - openapiRequiredFields.add("distanceFactor"); - openapiRequiredFields.add("distanceFar"); - openapiRequiredFields.add("groupDistance"); - openapiRequiredFields.add("maximumBunchSize"); - openapiRequiredFields.add("notVisibleFactor"); - openapiRequiredFields.add("playerOrderBucketSize"); - openapiRequiredFields.add("playerOrderFactor"); - openapiRequiredFields.add("slowUpdateFactorThreshold"); - openapiRequiredFields.add("useDirectPlayerSerialization"); - openapiRequiredFields.add("viewSegmentLength"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigEvents - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigEvents.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigEvents is not found in the empty JSON string", APIConfigEvents.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("distanceClose", "distanceFactor", "distanceFar", "groupDistance", "maximumBunchSize", "notVisibleFactor", "playerOrderBucketSize", "playerOrderFactor", "slowUpdateFactorThreshold", "useDirectPlayerSerialization", "viewSegmentLength")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigEvents + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigEvents.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigEvents is not found in the empty JSON string", APIConfigEvents.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigEvents.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigEvents` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigEvents` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : APIConfigEvents.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -490,31 +433,31 @@ public void write(JsonWriter out, APIConfigEvents value) throws IOException { @Override public APIConfigEvents read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigEvents given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigEvents - * @throws IOException if the JSON string is invalid with respect to APIConfigEvents - */ + /** + * Create an instance of APIConfigEvents given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigEvents + * @throws IOException if the JSON string is invalid with respect to APIConfigEvents + */ public static APIConfigEvents fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigEvents.class); } - /** - * Convert an instance of APIConfigEvents to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigEvents to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigIosVersion.java b/src/main/java/io/github/vrchatapi/model/APIConfigIosVersion.java index 0fa2cebc..23161f05 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigIosVersion.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigIosVersion.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,55 @@ /** * Current version for iOS */ -@ApiModel(description = "Current version for iOS") -@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 APIConfigIosVersion { public static final String SERIALIZED_NAME_MAJOR = "major"; @SerializedName(SERIALIZED_NAME_MAJOR) + @javax.annotation.Nonnull private Integer major; public static final String SERIALIZED_NAME_MINOR = "minor"; @SerializedName(SERIALIZED_NAME_MINOR) + @javax.annotation.Nonnull private Integer minor; public APIConfigIosVersion() { } - public APIConfigIosVersion major(Integer major) { - + public APIConfigIosVersion major(@javax.annotation.Nonnull Integer major) { this.major = major; return this; } - /** + /** * Get major * @return major - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getMajor() { return major; } - - public void setMajor(Integer major) { + public void setMajor(@javax.annotation.Nonnull Integer major) { this.major = major; } - public APIConfigIosVersion minor(Integer minor) { - + public APIConfigIosVersion minor(@javax.annotation.Nonnull Integer minor) { this.minor = minor; return this; } - /** + /** * Get minor * @return minor - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getMinor() { return minor; } - - public void setMinor(Integer minor) { + public void setMinor(@javax.annotation.Nonnull Integer minor) { this.minor = minor; } @@ -141,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,43 +143,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("major"); - openapiFields.add("minor"); + openapiFields = new HashSet(Arrays.asList("major", "minor")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("major"); - openapiRequiredFields.add("minor"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigIosVersion - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigIosVersion.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigIosVersion is not found in the empty JSON string", APIConfigIosVersion.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("major", "minor")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigIosVersion + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigIosVersion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigIosVersion is not found in the empty JSON string", APIConfigIosVersion.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigIosVersion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigIosVersion` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigIosVersion` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : APIConfigIosVersion.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -212,31 +199,31 @@ public void write(JsonWriter out, APIConfigIosVersion value) throws IOException @Override public APIConfigIosVersion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigIosVersion given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigIosVersion - * @throws IOException if the JSON string is invalid with respect to APIConfigIosVersion - */ + /** + * Create an instance of APIConfigIosVersion given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigIosVersion + * @throws IOException if the JSON string is invalid with respect to APIConfigIosVersion + */ public static APIConfigIosVersion fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigIosVersion.class); } - /** - * Convert an instance of APIConfigIosVersion to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigIosVersion to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigMinSupportedClientBuildNumber.java b/src/main/java/io/github/vrchatapi/model/APIConfigMinSupportedClientBuildNumber.java index a13ba46c..76999889 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigMinSupportedClientBuildNumber.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigMinSupportedClientBuildNumber.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.PlatformBuildInfo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,305 +48,271 @@ /** * Minimum supported client build number for various platforms */ -@ApiModel(description = "Minimum supported client build number for various platforms") -@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 APIConfigMinSupportedClientBuildNumber { public static final String SERIALIZED_NAME_APP_STORE = "AppStore"; @SerializedName(SERIALIZED_NAME_APP_STORE) + @javax.annotation.Nonnull private PlatformBuildInfo appStore; public static final String SERIALIZED_NAME_DEFAULT = "Default"; @SerializedName(SERIALIZED_NAME_DEFAULT) + @javax.annotation.Nonnull private PlatformBuildInfo _default; public static final String SERIALIZED_NAME_FIREBASE = "Firebase"; @SerializedName(SERIALIZED_NAME_FIREBASE) + @javax.annotation.Nonnull private PlatformBuildInfo firebase; public static final String SERIALIZED_NAME_FIREBASEI_O_S = "FirebaseiOS"; @SerializedName(SERIALIZED_NAME_FIREBASEI_O_S) + @javax.annotation.Nonnull private PlatformBuildInfo firebaseiOS; public static final String SERIALIZED_NAME_GOOGLE_PLAY = "GooglePlay"; @SerializedName(SERIALIZED_NAME_GOOGLE_PLAY) + @javax.annotation.Nonnull private PlatformBuildInfo googlePlay; public static final String SERIALIZED_NAME_P_C = "PC"; @SerializedName(SERIALIZED_NAME_P_C) + @javax.annotation.Nonnull private PlatformBuildInfo PC; public static final String SERIALIZED_NAME_PICO_STORE = "PicoStore"; @SerializedName(SERIALIZED_NAME_PICO_STORE) + @javax.annotation.Nonnull private PlatformBuildInfo picoStore; public static final String SERIALIZED_NAME_QUEST_APP_LAB = "QuestAppLab"; @SerializedName(SERIALIZED_NAME_QUEST_APP_LAB) + @javax.annotation.Nonnull private PlatformBuildInfo questAppLab; public static final String SERIALIZED_NAME_QUEST_STORE = "QuestStore"; @SerializedName(SERIALIZED_NAME_QUEST_STORE) + @javax.annotation.Nonnull private PlatformBuildInfo questStore; public static final String SERIALIZED_NAME_TEST_FLIGHT = "TestFlight"; @SerializedName(SERIALIZED_NAME_TEST_FLIGHT) + @javax.annotation.Nonnull private PlatformBuildInfo testFlight; public static final String SERIALIZED_NAME_XR_ELITE = "XRElite"; @SerializedName(SERIALIZED_NAME_XR_ELITE) + @javax.annotation.Nonnull private PlatformBuildInfo xrElite; public APIConfigMinSupportedClientBuildNumber() { } - public APIConfigMinSupportedClientBuildNumber appStore(PlatformBuildInfo appStore) { - + public APIConfigMinSupportedClientBuildNumber appStore(@javax.annotation.Nonnull PlatformBuildInfo appStore) { this.appStore = appStore; return this; } - /** + /** * Get appStore * @return appStore - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlatformBuildInfo getAppStore() { return appStore; } - - public void setAppStore(PlatformBuildInfo appStore) { + public void setAppStore(@javax.annotation.Nonnull PlatformBuildInfo appStore) { this.appStore = appStore; } - public APIConfigMinSupportedClientBuildNumber _default(PlatformBuildInfo _default) { - + public APIConfigMinSupportedClientBuildNumber _default(@javax.annotation.Nonnull PlatformBuildInfo _default) { this._default = _default; return this; } - /** + /** * Get _default * @return _default - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlatformBuildInfo getDefault() { return _default; } - - public void setDefault(PlatformBuildInfo _default) { + public void setDefault(@javax.annotation.Nonnull PlatformBuildInfo _default) { this._default = _default; } - public APIConfigMinSupportedClientBuildNumber firebase(PlatformBuildInfo firebase) { - + public APIConfigMinSupportedClientBuildNumber firebase(@javax.annotation.Nonnull PlatformBuildInfo firebase) { this.firebase = firebase; return this; } - /** + /** * Get firebase * @return firebase - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlatformBuildInfo getFirebase() { return firebase; } - - public void setFirebase(PlatformBuildInfo firebase) { + public void setFirebase(@javax.annotation.Nonnull PlatformBuildInfo firebase) { this.firebase = firebase; } - public APIConfigMinSupportedClientBuildNumber firebaseiOS(PlatformBuildInfo firebaseiOS) { - + public APIConfigMinSupportedClientBuildNumber firebaseiOS(@javax.annotation.Nonnull PlatformBuildInfo firebaseiOS) { this.firebaseiOS = firebaseiOS; return this; } - /** + /** * Get firebaseiOS * @return firebaseiOS - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlatformBuildInfo getFirebaseiOS() { return firebaseiOS; } - - public void setFirebaseiOS(PlatformBuildInfo firebaseiOS) { + public void setFirebaseiOS(@javax.annotation.Nonnull PlatformBuildInfo firebaseiOS) { this.firebaseiOS = firebaseiOS; } - public APIConfigMinSupportedClientBuildNumber googlePlay(PlatformBuildInfo googlePlay) { - + public APIConfigMinSupportedClientBuildNumber googlePlay(@javax.annotation.Nonnull PlatformBuildInfo googlePlay) { this.googlePlay = googlePlay; return this; } - /** + /** * Get googlePlay * @return googlePlay - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlatformBuildInfo getGooglePlay() { return googlePlay; } - - public void setGooglePlay(PlatformBuildInfo googlePlay) { + public void setGooglePlay(@javax.annotation.Nonnull PlatformBuildInfo googlePlay) { this.googlePlay = googlePlay; } - public APIConfigMinSupportedClientBuildNumber PC(PlatformBuildInfo PC) { - + public APIConfigMinSupportedClientBuildNumber PC(@javax.annotation.Nonnull PlatformBuildInfo PC) { this.PC = PC; return this; } - /** + /** * Get PC * @return PC - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlatformBuildInfo getPC() { return PC; } - - public void setPC(PlatformBuildInfo PC) { + public void setPC(@javax.annotation.Nonnull PlatformBuildInfo PC) { this.PC = PC; } - public APIConfigMinSupportedClientBuildNumber picoStore(PlatformBuildInfo picoStore) { - + public APIConfigMinSupportedClientBuildNumber picoStore(@javax.annotation.Nonnull PlatformBuildInfo picoStore) { this.picoStore = picoStore; return this; } - /** + /** * Get picoStore * @return picoStore - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlatformBuildInfo getPicoStore() { return picoStore; } - - public void setPicoStore(PlatformBuildInfo picoStore) { + public void setPicoStore(@javax.annotation.Nonnull PlatformBuildInfo picoStore) { this.picoStore = picoStore; } - public APIConfigMinSupportedClientBuildNumber questAppLab(PlatformBuildInfo questAppLab) { - + public APIConfigMinSupportedClientBuildNumber questAppLab(@javax.annotation.Nonnull PlatformBuildInfo questAppLab) { this.questAppLab = questAppLab; return this; } - /** + /** * Get questAppLab * @return questAppLab - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlatformBuildInfo getQuestAppLab() { return questAppLab; } - - public void setQuestAppLab(PlatformBuildInfo questAppLab) { + public void setQuestAppLab(@javax.annotation.Nonnull PlatformBuildInfo questAppLab) { this.questAppLab = questAppLab; } - public APIConfigMinSupportedClientBuildNumber questStore(PlatformBuildInfo questStore) { - + public APIConfigMinSupportedClientBuildNumber questStore(@javax.annotation.Nonnull PlatformBuildInfo questStore) { this.questStore = questStore; return this; } - /** + /** * Get questStore * @return questStore - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlatformBuildInfo getQuestStore() { return questStore; } - - public void setQuestStore(PlatformBuildInfo questStore) { + public void setQuestStore(@javax.annotation.Nonnull PlatformBuildInfo questStore) { this.questStore = questStore; } - public APIConfigMinSupportedClientBuildNumber testFlight(PlatformBuildInfo testFlight) { - + public APIConfigMinSupportedClientBuildNumber testFlight(@javax.annotation.Nonnull PlatformBuildInfo testFlight) { this.testFlight = testFlight; return this; } - /** + /** * Get testFlight * @return testFlight - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlatformBuildInfo getTestFlight() { return testFlight; } - - public void setTestFlight(PlatformBuildInfo testFlight) { + public void setTestFlight(@javax.annotation.Nonnull PlatformBuildInfo testFlight) { this.testFlight = testFlight; } - public APIConfigMinSupportedClientBuildNumber xrElite(PlatformBuildInfo xrElite) { - + public APIConfigMinSupportedClientBuildNumber xrElite(@javax.annotation.Nonnull PlatformBuildInfo xrElite) { this.xrElite = xrElite; return this; } - /** + /** * Get xrElite * @return xrElite - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlatformBuildInfo getXrElite() { return xrElite; } - - public void setXrElite(PlatformBuildInfo xrElite) { + public void setXrElite(@javax.annotation.Nonnull PlatformBuildInfo xrElite) { this.xrElite = xrElite; } @@ -403,10 +369,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -415,83 +378,62 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("AppStore"); - openapiFields.add("Default"); - openapiFields.add("Firebase"); - openapiFields.add("FirebaseiOS"); - openapiFields.add("GooglePlay"); - openapiFields.add("PC"); - openapiFields.add("PicoStore"); - openapiFields.add("QuestAppLab"); - openapiFields.add("QuestStore"); - openapiFields.add("TestFlight"); - openapiFields.add("XRElite"); + openapiFields = new HashSet(Arrays.asList("AppStore", "Default", "Firebase", "FirebaseiOS", "GooglePlay", "PC", "PicoStore", "QuestAppLab", "QuestStore", "TestFlight", "XRElite")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("AppStore"); - openapiRequiredFields.add("Default"); - openapiRequiredFields.add("Firebase"); - openapiRequiredFields.add("FirebaseiOS"); - openapiRequiredFields.add("GooglePlay"); - openapiRequiredFields.add("PC"); - openapiRequiredFields.add("PicoStore"); - openapiRequiredFields.add("QuestAppLab"); - openapiRequiredFields.add("QuestStore"); - openapiRequiredFields.add("TestFlight"); - openapiRequiredFields.add("XRElite"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigMinSupportedClientBuildNumber - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigMinSupportedClientBuildNumber.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigMinSupportedClientBuildNumber is not found in the empty JSON string", APIConfigMinSupportedClientBuildNumber.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("AppStore", "Default", "Firebase", "FirebaseiOS", "GooglePlay", "PC", "PicoStore", "QuestAppLab", "QuestStore", "TestFlight", "XRElite")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigMinSupportedClientBuildNumber + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigMinSupportedClientBuildNumber.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigMinSupportedClientBuildNumber is not found in the empty JSON string", APIConfigMinSupportedClientBuildNumber.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigMinSupportedClientBuildNumber.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigMinSupportedClientBuildNumber` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigMinSupportedClientBuildNumber` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : APIConfigMinSupportedClientBuildNumber.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `AppStore` - PlatformBuildInfo.validateJsonObject(jsonObj.getAsJsonObject("AppStore")); + PlatformBuildInfo.validateJsonElement(jsonObj.get("AppStore")); // validate the required field `Default` - PlatformBuildInfo.validateJsonObject(jsonObj.getAsJsonObject("Default")); + PlatformBuildInfo.validateJsonElement(jsonObj.get("Default")); // validate the required field `Firebase` - PlatformBuildInfo.validateJsonObject(jsonObj.getAsJsonObject("Firebase")); + PlatformBuildInfo.validateJsonElement(jsonObj.get("Firebase")); // validate the required field `FirebaseiOS` - PlatformBuildInfo.validateJsonObject(jsonObj.getAsJsonObject("FirebaseiOS")); + PlatformBuildInfo.validateJsonElement(jsonObj.get("FirebaseiOS")); // validate the required field `GooglePlay` - PlatformBuildInfo.validateJsonObject(jsonObj.getAsJsonObject("GooglePlay")); + PlatformBuildInfo.validateJsonElement(jsonObj.get("GooglePlay")); // validate the required field `PC` - PlatformBuildInfo.validateJsonObject(jsonObj.getAsJsonObject("PC")); + PlatformBuildInfo.validateJsonElement(jsonObj.get("PC")); // validate the required field `PicoStore` - PlatformBuildInfo.validateJsonObject(jsonObj.getAsJsonObject("PicoStore")); + PlatformBuildInfo.validateJsonElement(jsonObj.get("PicoStore")); // validate the required field `QuestAppLab` - PlatformBuildInfo.validateJsonObject(jsonObj.getAsJsonObject("QuestAppLab")); + PlatformBuildInfo.validateJsonElement(jsonObj.get("QuestAppLab")); // validate the required field `QuestStore` - PlatformBuildInfo.validateJsonObject(jsonObj.getAsJsonObject("QuestStore")); + PlatformBuildInfo.validateJsonElement(jsonObj.get("QuestStore")); // validate the required field `TestFlight` - PlatformBuildInfo.validateJsonObject(jsonObj.getAsJsonObject("TestFlight")); + PlatformBuildInfo.validateJsonElement(jsonObj.get("TestFlight")); // validate the required field `XRElite` - PlatformBuildInfo.validateJsonObject(jsonObj.getAsJsonObject("XRElite")); + PlatformBuildInfo.validateJsonElement(jsonObj.get("XRElite")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -514,31 +456,31 @@ public void write(JsonWriter out, APIConfigMinSupportedClientBuildNumber value) @Override public APIConfigMinSupportedClientBuildNumber read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigMinSupportedClientBuildNumber given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigMinSupportedClientBuildNumber - * @throws IOException if the JSON string is invalid with respect to APIConfigMinSupportedClientBuildNumber - */ + /** + * Create an instance of APIConfigMinSupportedClientBuildNumber given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigMinSupportedClientBuildNumber + * @throws IOException if the JSON string is invalid with respect to APIConfigMinSupportedClientBuildNumber + */ public static APIConfigMinSupportedClientBuildNumber fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigMinSupportedClientBuildNumber.class); } - /** - * Convert an instance of APIConfigMinSupportedClientBuildNumber to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigMinSupportedClientBuildNumber to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIConfigOfflineAnalysis.java b/src/main/java/io/github/vrchatapi/model/APIConfigOfflineAnalysis.java index dfe90513..ee10139d 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfigOfflineAnalysis.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfigOfflineAnalysis.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,55 @@ /** * Whether to allow offline analysis */ -@ApiModel(description = "Whether to allow offline analysis") -@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 APIConfigOfflineAnalysis { public static final String SERIALIZED_NAME_ANDROID = "android"; @SerializedName(SERIALIZED_NAME_ANDROID) + @javax.annotation.Nullable private Boolean android = true; public static final String SERIALIZED_NAME_STANDALONEWINDOWS = "standalonewindows"; @SerializedName(SERIALIZED_NAME_STANDALONEWINDOWS) + @javax.annotation.Nullable private Boolean standalonewindows = true; public APIConfigOfflineAnalysis() { } - public APIConfigOfflineAnalysis android(Boolean android) { - + public APIConfigOfflineAnalysis android(@javax.annotation.Nullable Boolean android) { this.android = android; return this; } - /** + /** * Whether to allow offline analysis * @return android - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether to allow offline analysis") - public Boolean getAndroid() { return android; } - - public void setAndroid(Boolean android) { + public void setAndroid(@javax.annotation.Nullable Boolean android) { this.android = android; } - public APIConfigOfflineAnalysis standalonewindows(Boolean standalonewindows) { - + public APIConfigOfflineAnalysis standalonewindows(@javax.annotation.Nullable Boolean standalonewindows) { this.standalonewindows = standalonewindows; return this; } - /** + /** * Whether to allow offline analysis * @return standalonewindows - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether to allow offline analysis") - public Boolean getStandalonewindows() { return standalonewindows; } - - public void setStandalonewindows(Boolean standalonewindows) { + public void setStandalonewindows(@javax.annotation.Nullable Boolean standalonewindows) { this.standalonewindows = standalonewindows; } @@ -141,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,34 +143,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("android"); - openapiFields.add("standalonewindows"); + openapiFields = new HashSet(Arrays.asList("android", "standalonewindows")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIConfigOfflineAnalysis - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIConfigOfflineAnalysis.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIConfigOfflineAnalysis is not found in the empty JSON string", APIConfigOfflineAnalysis.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIConfigOfflineAnalysis + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIConfigOfflineAnalysis.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIConfigOfflineAnalysis is not found in the empty JSON string", APIConfigOfflineAnalysis.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIConfigOfflineAnalysis.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIConfigOfflineAnalysis` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIConfigOfflineAnalysis` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -203,31 +192,31 @@ public void write(JsonWriter out, APIConfigOfflineAnalysis value) throws IOExcep @Override public APIConfigOfflineAnalysis read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIConfigOfflineAnalysis given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIConfigOfflineAnalysis - * @throws IOException if the JSON string is invalid with respect to APIConfigOfflineAnalysis - */ + /** + * Create an instance of APIConfigOfflineAnalysis given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIConfigOfflineAnalysis + * @throws IOException if the JSON string is invalid with respect to APIConfigOfflineAnalysis + */ public static APIConfigOfflineAnalysis fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIConfigOfflineAnalysis.class); } - /** - * Convert an instance of APIConfigOfflineAnalysis to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIConfigOfflineAnalysis to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/APIHealth.java b/src/main/java/io/github/vrchatapi/model/APIHealth.java index 785ecf47..7a1d327f 100644 --- a/src/main/java/io/github/vrchatapi/model/APIHealth.java +++ b/src/main/java/io/github/vrchatapi/model/APIHealth.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,88 +47,79 @@ /** * APIHealth */ -@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 APIHealth { public static final String SERIALIZED_NAME_BUILD_VERSION_TAG = "buildVersionTag"; @SerializedName(SERIALIZED_NAME_BUILD_VERSION_TAG) + @javax.annotation.Nonnull private String buildVersionTag; public static final String SERIALIZED_NAME_OK = "ok"; @SerializedName(SERIALIZED_NAME_OK) + @javax.annotation.Nonnull private Boolean ok; public static final String SERIALIZED_NAME_SERVER_NAME = "serverName"; @SerializedName(SERIALIZED_NAME_SERVER_NAME) + @javax.annotation.Nonnull private String serverName; public APIHealth() { } - public APIHealth buildVersionTag(String buildVersionTag) { - + public APIHealth buildVersionTag(@javax.annotation.Nonnull String buildVersionTag) { this.buildVersionTag = buildVersionTag; return this; } - /** + /** * Get buildVersionTag * @return buildVersionTag - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getBuildVersionTag() { return buildVersionTag; } - - public void setBuildVersionTag(String buildVersionTag) { + public void setBuildVersionTag(@javax.annotation.Nonnull String buildVersionTag) { this.buildVersionTag = buildVersionTag; } - public APIHealth ok(Boolean ok) { - + public APIHealth ok(@javax.annotation.Nonnull Boolean ok) { this.ok = ok; return this; } - /** + /** * Get ok * @return ok - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getOk() { return ok; } - - public void setOk(Boolean ok) { + public void setOk(@javax.annotation.Nonnull Boolean ok) { this.ok = ok; } - public APIHealth serverName(String serverName) { - + public APIHealth serverName(@javax.annotation.Nonnull String serverName) { this.serverName = serverName; return this; } - /** + /** * Get serverName * @return serverName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getServerName() { return serverName; } - - public void setServerName(String serverName) { + public void setServerName(@javax.annotation.Nonnull String serverName) { this.serverName = serverName; } @@ -169,10 +160,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -181,50 +169,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("buildVersionTag"); - openapiFields.add("ok"); - openapiFields.add("serverName"); + openapiFields = new HashSet(Arrays.asList("buildVersionTag", "ok", "serverName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("buildVersionTag"); - openapiRequiredFields.add("ok"); - openapiRequiredFields.add("serverName"); + openapiRequiredFields = new HashSet(Arrays.asList("buildVersionTag", "ok", "serverName")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to APIHealth - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!APIHealth.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in APIHealth is not found in the empty JSON string", APIHealth.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to APIHealth + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!APIHealth.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIHealth is not found in the empty JSON string", APIHealth.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!APIHealth.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `APIHealth` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIHealth` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : APIHealth.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("buildVersionTag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `buildVersionTag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buildVersionTag").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `buildVersionTag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buildVersionTag").toString())); } if (!jsonObj.get("serverName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `serverName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serverName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `serverName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serverName").toString())); } } @@ -248,31 +231,31 @@ public void write(JsonWriter out, APIHealth value) throws IOException { @Override public APIHealth read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of APIHealth given an JSON string - * - * @param jsonString JSON string - * @return An instance of APIHealth - * @throws IOException if the JSON string is invalid with respect to APIHealth - */ + /** + * Create an instance of APIHealth given an JSON string + * + * @param jsonString JSON string + * @return An instance of APIHealth + * @throws IOException if the JSON string is invalid with respect to APIHealth + */ public static APIHealth fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, APIHealth.class); } - /** - * Convert an instance of APIHealth to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of APIHealth to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AbstractOpenApiSchema.java b/src/main/java/io/github/vrchatapi/model/AbstractOpenApiSchema.java index 3ed6fc2f..3266fd59 100644 --- a/src/main/java/io/github/vrchatapi/model/AbstractOpenApiSchema.java +++ b/src/main/java/io/github/vrchatapi/model/AbstractOpenApiSchema.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,14 +16,11 @@ import java.util.Objects; import java.lang.reflect.Type; import java.util.Map; -import javax.ws.rs.core.GenericType; - -//import com.fasterxml.jackson.annotation.JsonValue; /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@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 abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object @@ -45,7 +42,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { * * @return an instance of the actual schema/object */ - public abstract Map getSchemas(); + public abstract Map> getSchemas(); /** * Get the actual instance @@ -106,10 +103,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public boolean equals(Object o) { diff --git a/src/main/java/io/github/vrchatapi/model/AccountDeletionLog.java b/src/main/java/io/github/vrchatapi/model/AccountDeletionLog.java index fd0a517c..087dda85 100644 --- a/src/main/java/io/github/vrchatapi/model/AccountDeletionLog.java +++ b/src/main/java/io/github/vrchatapi/model/AccountDeletionLog.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,88 +49,79 @@ /** * AccountDeletionLog */ -@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 AccountDeletionLog { public static final String SERIALIZED_NAME_DATE_TIME = "dateTime"; @SerializedName(SERIALIZED_NAME_DATE_TIME) + @javax.annotation.Nullable private OffsetDateTime dateTime; public static final String SERIALIZED_NAME_DELETION_SCHEDULED = "deletionScheduled"; @SerializedName(SERIALIZED_NAME_DELETION_SCHEDULED) + @javax.annotation.Nullable private OffsetDateTime deletionScheduled; public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nullable private String message = "Deletion requested"; public AccountDeletionLog() { } - public AccountDeletionLog dateTime(OffsetDateTime dateTime) { - + public AccountDeletionLog dateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; return this; } - /** + /** * Date and time of the deletion request. * @return dateTime - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Date and time of the deletion request.") - public OffsetDateTime getDateTime() { return dateTime; } - - public void setDateTime(OffsetDateTime dateTime) { + public void setDateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { this.dateTime = dateTime; } - public AccountDeletionLog deletionScheduled(OffsetDateTime deletionScheduled) { - + public AccountDeletionLog deletionScheduled(@javax.annotation.Nullable OffsetDateTime deletionScheduled) { this.deletionScheduled = deletionScheduled; return this; } - /** + /** * When the deletion is scheduled to happen, standard is 14 days after the request. * @return deletionScheduled - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "When the deletion is scheduled to happen, standard is 14 days after the request.") - public OffsetDateTime getDeletionScheduled() { return deletionScheduled; } - - public void setDeletionScheduled(OffsetDateTime deletionScheduled) { + public void setDeletionScheduled(@javax.annotation.Nullable OffsetDateTime deletionScheduled) { this.deletionScheduled = deletionScheduled; } - public AccountDeletionLog message(String message) { - + public AccountDeletionLog message(@javax.annotation.Nullable String message) { this.message = message; return this; } - /** + /** * Typically \"Deletion requested\" or \"Deletion canceled\". Other messages like \"Deletion completed\" may exist, but are these are not possible to see as a regular user. * @return message - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Deletion requested", value = "Typically \"Deletion requested\" or \"Deletion canceled\". Other messages like \"Deletion completed\" may exist, but are these are not possible to see as a regular user.") - public String getMessage() { return message; } - - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } @@ -182,10 +173,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -194,37 +182,35 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dateTime"); - openapiFields.add("deletionScheduled"); - openapiFields.add("message"); + openapiFields = new HashSet(Arrays.asList("dateTime", "deletionScheduled", "message")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AccountDeletionLog - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AccountDeletionLog.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccountDeletionLog is not found in the empty JSON string", AccountDeletionLog.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AccountDeletionLog + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AccountDeletionLog.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AccountDeletionLog is not found in the empty JSON string", AccountDeletionLog.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AccountDeletionLog.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccountDeletionLog` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AccountDeletionLog` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -248,31 +234,31 @@ public void write(JsonWriter out, AccountDeletionLog value) throws IOException { @Override public AccountDeletionLog read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AccountDeletionLog given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccountDeletionLog - * @throws IOException if the JSON string is invalid with respect to AccountDeletionLog - */ + /** + * Create an instance of AccountDeletionLog given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountDeletionLog + * @throws IOException if the JSON string is invalid with respect to AccountDeletionLog + */ public static AccountDeletionLog fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AccountDeletionLog.class); } - /** - * Convert an instance of AccountDeletionLog to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AccountDeletionLog to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AddFavoriteRequest.java b/src/main/java/io/github/vrchatapi/model/AddFavoriteRequest.java index b5ab4fd3..376d52a4 100644 --- a/src/main/java/io/github/vrchatapi/model/AddFavoriteRequest.java +++ b/src/main/java/io/github/vrchatapi/model/AddFavoriteRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.FavoriteType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,93 +50,87 @@ /** * AddFavoriteRequest */ -@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 AddFavoriteRequest { public static final String SERIALIZED_NAME_FAVORITE_ID = "favoriteId"; @SerializedName(SERIALIZED_NAME_FAVORITE_ID) + @javax.annotation.Nonnull private String favoriteId; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private FavoriteType type = FavoriteType.FRIEND; public AddFavoriteRequest() { } - public AddFavoriteRequest favoriteId(String favoriteId) { - + public AddFavoriteRequest favoriteId(@javax.annotation.Nonnull String favoriteId) { this.favoriteId = favoriteId; return this; } - /** + /** * Must be either AvatarID, WorldID or UserID. * @return favoriteId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Must be either AvatarID, WorldID or UserID.") - public String getFavoriteId() { return favoriteId; } - - public void setFavoriteId(String favoriteId) { + public void setFavoriteId(@javax.annotation.Nonnull String favoriteId) { this.favoriteId = favoriteId; } - public AddFavoriteRequest tags(List tags) { - + public AddFavoriteRequest tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public AddFavoriteRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Tags indicate which group this favorite belongs to. Adding multiple groups makes it show up in all. Removing it from one in that case removes it from all. * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Tags indicate which group this favorite belongs to. Adding multiple groups makes it show up in all. Removing it from one in that case removes it from all.") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public AddFavoriteRequest type(FavoriteType type) { - + public AddFavoriteRequest type(@javax.annotation.Nonnull FavoriteType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FavoriteType getType() { return type; } - - public void setType(FavoriteType type) { + public void setType(@javax.annotation.Nonnull FavoriteType type) { this.type = type; } @@ -177,10 +171,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -189,54 +180,51 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("favoriteId"); - openapiFields.add("tags"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("favoriteId", "tags", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("favoriteId"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("type"); + openapiRequiredFields = new HashSet(Arrays.asList("favoriteId", "tags", "type")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AddFavoriteRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AddFavoriteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AddFavoriteRequest is not found in the empty JSON string", AddFavoriteRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AddFavoriteRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AddFavoriteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AddFavoriteRequest is not found in the empty JSON string", AddFavoriteRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AddFavoriteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AddFavoriteRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AddFavoriteRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AddFavoriteRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("favoriteId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `favoriteId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("favoriteId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `favoriteId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("favoriteId").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } + // validate the required field `type` + FavoriteType.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -259,31 +247,31 @@ public void write(JsonWriter out, AddFavoriteRequest value) throws IOException { @Override public AddFavoriteRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AddFavoriteRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AddFavoriteRequest - * @throws IOException if the JSON string is invalid with respect to AddFavoriteRequest - */ + /** + * Create an instance of AddFavoriteRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AddFavoriteRequest + * @throws IOException if the JSON string is invalid with respect to AddFavoriteRequest + */ public static AddFavoriteRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AddFavoriteRequest.class); } - /** - * Convert an instance of AddFavoriteRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AddFavoriteRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AddGroupGalleryImageRequest.java b/src/main/java/io/github/vrchatapi/model/AddGroupGalleryImageRequest.java index 6395966d..06889095 100644 --- a/src/main/java/io/github/vrchatapi/model/AddGroupGalleryImageRequest.java +++ b/src/main/java/io/github/vrchatapi/model/AddGroupGalleryImageRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * AddGroupGalleryImageRequest */ -@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 AddGroupGalleryImageRequest { public static final String SERIALIZED_NAME_FILE_ID = "fileId"; @SerializedName(SERIALIZED_NAME_FILE_ID) + @javax.annotation.Nonnull private String fileId; public AddGroupGalleryImageRequest() { } - public AddGroupGalleryImageRequest fileId(String fileId) { - + public AddGroupGalleryImageRequest fileId(@javax.annotation.Nonnull String fileId) { this.fileId = fileId; return this; } - /** + /** * Get fileId * @return fileId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", required = true, value = "") - public String getFileId() { return fileId; } - - public void setFileId(String fileId) { + public void setFileId(@javax.annotation.Nonnull String fileId) { this.fileId = fileId; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,43 +117,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fileId"); + openapiFields = new HashSet(Arrays.asList("fileId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fileId"); + openapiRequiredFields = new HashSet(Arrays.asList("fileId")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AddGroupGalleryImageRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AddGroupGalleryImageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AddGroupGalleryImageRequest is not found in the empty JSON string", AddGroupGalleryImageRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AddGroupGalleryImageRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AddGroupGalleryImageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AddGroupGalleryImageRequest is not found in the empty JSON string", AddGroupGalleryImageRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AddGroupGalleryImageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AddGroupGalleryImageRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AddGroupGalleryImageRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AddGroupGalleryImageRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileId").toString())); } } @@ -183,31 +176,31 @@ public void write(JsonWriter out, AddGroupGalleryImageRequest value) throws IOEx @Override public AddGroupGalleryImageRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AddGroupGalleryImageRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AddGroupGalleryImageRequest - * @throws IOException if the JSON string is invalid with respect to AddGroupGalleryImageRequest - */ + /** + * Create an instance of AddGroupGalleryImageRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AddGroupGalleryImageRequest + * @throws IOException if the JSON string is invalid with respect to AddGroupGalleryImageRequest + */ public static AddGroupGalleryImageRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AddGroupGalleryImageRequest.class); } - /** - * Convert an instance of AddGroupGalleryImageRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AddGroupGalleryImageRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AdminAssetBundle.java b/src/main/java/io/github/vrchatapi/model/AdminAssetBundle.java index 75ae2419..36bc2a6e 100644 --- a/src/main/java/io/github/vrchatapi/model/AdminAssetBundle.java +++ b/src/main/java/io/github/vrchatapi/model/AdminAssetBundle.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,11 +20,10 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.AdminUnityPackage; import io.github.vrchatapi.model.ReleaseStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -40,13 +38,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -54,369 +54,335 @@ /** * */ -@ApiModel(description = "") -@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 AdminAssetBundle { public static final String SERIALIZED_NAME_CREATED_AT = "_created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "_updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_ASSET_TYPE = "assetType"; @SerializedName(SERIALIZED_NAME_ASSET_TYPE) + @javax.annotation.Nonnull private String assetType; public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nonnull private String authorId; public static final String SERIALIZED_NAME_AUTHOR_NAME = "authorName"; @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nonnull private String authorName; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_RELEASE_STATUS = "releaseStatus"; @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) + @javax.annotation.Nonnull private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_THUMBNAIL_IMAGE_URL = "thumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nonnull private String thumbnailImageUrl; public static final String SERIALIZED_NAME_UNITY_PACKAGE_URL = "unityPackageUrl"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGE_URL) + @javax.annotation.Nullable private String unityPackageUrl; public static final String SERIALIZED_NAME_UNITY_PACKAGES = "unityPackages"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGES) + @javax.annotation.Nonnull private Set unityPackages = new LinkedHashSet<>(); public AdminAssetBundle() { } - public AdminAssetBundle createdAt(OffsetDateTime createdAt) { - + public AdminAssetBundle createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public AdminAssetBundle updatedAt(OffsetDateTime updatedAt) { - + public AdminAssetBundle updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public AdminAssetBundle assetType(String assetType) { - + public AdminAssetBundle assetType(@javax.annotation.Nonnull String assetType) { this.assetType = assetType; return this; } - /** + /** * Get assetType * @return assetType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAssetType() { return assetType; } - - public void setAssetType(String assetType) { + public void setAssetType(@javax.annotation.Nonnull String assetType) { this.assetType = assetType; } - public AdminAssetBundle authorId(String authorId) { - + public AdminAssetBundle authorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; } - public AdminAssetBundle authorName(String authorName) { - + public AdminAssetBundle authorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; return this; } - /** + /** * Get authorName * @return authorName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAuthorName() { return authorName; } - - public void setAuthorName(String authorName) { + public void setAuthorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; } - public AdminAssetBundle description(String description) { - + public AdminAssetBundle description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public AdminAssetBundle imageUrl(String imageUrl) { - + public AdminAssetBundle imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public AdminAssetBundle name(String name) { - + public AdminAssetBundle name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public AdminAssetBundle releaseStatus(ReleaseStatus releaseStatus) { - + public AdminAssetBundle releaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; return this; } - /** + /** * Get releaseStatus * @return releaseStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ReleaseStatus getReleaseStatus() { return releaseStatus; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { + public void setReleaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; } - public AdminAssetBundle tags(List tags) { - + public AdminAssetBundle tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public AdminAssetBundle addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public AdminAssetBundle thumbnailImageUrl(String thumbnailImageUrl) { - + public AdminAssetBundle thumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; return this; } - /** + /** * Get thumbnailImageUrl * @return thumbnailImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getThumbnailImageUrl() { return thumbnailImageUrl; } - - public void setThumbnailImageUrl(String thumbnailImageUrl) { + public void setThumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; } - public AdminAssetBundle unityPackageUrl(String unityPackageUrl) { - + public AdminAssetBundle unityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; return this; } - /** + /** * Get unityPackageUrl * @return unityPackageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getUnityPackageUrl() { return unityPackageUrl; } - - public void setUnityPackageUrl(String unityPackageUrl) { + public void setUnityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; } - public AdminAssetBundle unityPackages(Set unityPackages) { - + public AdminAssetBundle unityPackages(@javax.annotation.Nonnull Set unityPackages) { this.unityPackages = unityPackages; return this; } public AdminAssetBundle addUnityPackagesItem(AdminUnityPackage unityPackagesItem) { + if (this.unityPackages == null) { + this.unityPackages = new LinkedHashSet<>(); + } this.unityPackages.add(unityPackagesItem); return this; } - /** + /** * Get unityPackages * @return unityPackages - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Set getUnityPackages() { return unityPackages; } - - public void setUnityPackages(Set unityPackages) { + public void setUnityPackages(@javax.annotation.Nonnull Set unityPackages) { this.unityPackages = unityPackages; } @@ -477,10 +443,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -489,105 +452,82 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("_created_at"); - openapiFields.add("_updated_at"); - openapiFields.add("assetType"); - openapiFields.add("authorId"); - openapiFields.add("authorName"); - openapiFields.add("description"); - openapiFields.add("imageUrl"); - openapiFields.add("name"); - openapiFields.add("releaseStatus"); - openapiFields.add("tags"); - openapiFields.add("thumbnailImageUrl"); - openapiFields.add("unityPackageUrl"); - openapiFields.add("unityPackages"); + openapiFields = new HashSet(Arrays.asList("_created_at", "_updated_at", "assetType", "authorId", "authorName", "description", "imageUrl", "name", "releaseStatus", "tags", "thumbnailImageUrl", "unityPackageUrl", "unityPackages")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("_created_at"); - openapiRequiredFields.add("_updated_at"); - openapiRequiredFields.add("assetType"); - openapiRequiredFields.add("authorId"); - openapiRequiredFields.add("authorName"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("releaseStatus"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("thumbnailImageUrl"); - openapiRequiredFields.add("unityPackageUrl"); - openapiRequiredFields.add("unityPackages"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AdminAssetBundle - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AdminAssetBundle.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdminAssetBundle is not found in the empty JSON string", AdminAssetBundle.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("_created_at", "_updated_at", "assetType", "authorId", "authorName", "description", "imageUrl", "name", "releaseStatus", "tags", "thumbnailImageUrl", "unityPackageUrl", "unityPackages")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AdminAssetBundle + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AdminAssetBundle.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AdminAssetBundle is not found in the empty JSON string", AdminAssetBundle.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AdminAssetBundle.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdminAssetBundle` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AdminAssetBundle` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AdminAssetBundle.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("assetType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetType").toString())); } if (!jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if (!jsonObj.get("authorName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } + // validate the required field `releaseStatus` + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("thumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); } - if (!jsonObj.get("unityPackageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); + if ((jsonObj.get("unityPackageUrl") != null && !jsonObj.get("unityPackageUrl").isJsonNull()) && !jsonObj.get("unityPackageUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); } - // ensure the json data is an array - if (!jsonObj.get("unityPackages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); + if (jsonObj.get("unityPackages") != null) { + if (!jsonObj.get("unityPackages").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); + } + JsonArray jsonArrayunityPackages = jsonObj.getAsJsonArray("unityPackages"); + // validate the required field `unityPackages` (array) + for (int i = 0; i < jsonArrayunityPackages.size(); i++) { + AdminUnityPackage.validateJsonElement(jsonArrayunityPackages.get(i)); + } } - - JsonArray jsonArrayunityPackages = jsonObj.getAsJsonArray("unityPackages"); - // validate the required field `unityPackages` (array) - for (int i = 0; i < jsonArrayunityPackages.size(); i++) { - AdminUnityPackage.validateJsonObject(jsonArrayunityPackages.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -610,31 +550,31 @@ public void write(JsonWriter out, AdminAssetBundle value) throws IOException { @Override public AdminAssetBundle read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AdminAssetBundle given an JSON string - * - * @param jsonString JSON string - * @return An instance of AdminAssetBundle - * @throws IOException if the JSON string is invalid with respect to AdminAssetBundle - */ + /** + * Create an instance of AdminAssetBundle given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdminAssetBundle + * @throws IOException if the JSON string is invalid with respect to AdminAssetBundle + */ public static AdminAssetBundle fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AdminAssetBundle.class); } - /** - * Convert an instance of AdminAssetBundle to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AdminAssetBundle to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AdminUnityPackage.java b/src/main/java/io/github/vrchatapi/model/AdminUnityPackage.java index 815d1b3c..aae3a7aa 100644 --- a/src/main/java/io/github/vrchatapi/model/AdminUnityPackage.java +++ b/src/main/java/io/github/vrchatapi/model/AdminUnityPackage.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,144 +47,128 @@ /** * */ -@ApiModel(description = "") -@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 AdminUnityPackage { public static final String SERIALIZED_NAME_ASSET_URL = "assetUrl"; @SerializedName(SERIALIZED_NAME_ASSET_URL) + @javax.annotation.Nonnull private String assetUrl; public static final String SERIALIZED_NAME_ASSET_VERSION = "assetVersion"; @SerializedName(SERIALIZED_NAME_ASSET_VERSION) + @javax.annotation.Nonnull private Integer assetVersion; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nonnull private String platform; public static final String SERIALIZED_NAME_UNITY_VERSION = "unityVersion"; @SerializedName(SERIALIZED_NAME_UNITY_VERSION) + @javax.annotation.Nonnull private String unityVersion = "2022.3.22f1-DWR"; public static final String SERIALIZED_NAME_VARIANT = "variant"; @SerializedName(SERIALIZED_NAME_VARIANT) + @javax.annotation.Nonnull private String variant; public AdminUnityPackage() { } - public AdminUnityPackage assetUrl(String assetUrl) { - + public AdminUnityPackage assetUrl(@javax.annotation.Nonnull String assetUrl) { this.assetUrl = assetUrl; return this; } - /** + /** * Get assetUrl * @return assetUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://assets.vrchat.com/adminfiles/adfl_fba880f3-7d8c-4429-87e6-0e2d50000076ie_chad_rat_standalonewindows", required = true, value = "") - public String getAssetUrl() { return assetUrl; } - - public void setAssetUrl(String assetUrl) { + public void setAssetUrl(@javax.annotation.Nonnull String assetUrl) { this.assetUrl = assetUrl; } - public AdminUnityPackage assetVersion(Integer assetVersion) { - + public AdminUnityPackage assetVersion(@javax.annotation.Nonnull Integer assetVersion) { this.assetVersion = assetVersion; return this; } - /** + /** * Get assetVersion * minimum: 0 * @return assetVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "4", required = true, value = "") - public Integer getAssetVersion() { return assetVersion; } - - public void setAssetVersion(Integer assetVersion) { + public void setAssetVersion(@javax.annotation.Nonnull Integer assetVersion) { this.assetVersion = assetVersion; } - public AdminUnityPackage platform(String platform) { - + public AdminUnityPackage platform(@javax.annotation.Nonnull String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows", required = true, value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nonnull String platform) { this.platform = platform; } - public AdminUnityPackage unityVersion(String unityVersion) { - + public AdminUnityPackage unityVersion(@javax.annotation.Nonnull String unityVersion) { this.unityVersion = unityVersion; return this; } - /** + /** * Get unityVersion * @return unityVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2022.3.22f1-DWR", required = true, value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nonnull String unityVersion) { this.unityVersion = unityVersion; } - public AdminUnityPackage variant(String variant) { - + public AdminUnityPackage variant(@javax.annotation.Nonnull String variant) { this.variant = variant; return this; } - /** + /** * Get variant * @return variant - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getVariant() { return variant; } - - public void setVariant(String variant) { + public void setVariant(@javax.annotation.Nonnull String variant) { this.variant = variant; } @@ -229,10 +213,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -241,60 +222,51 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assetUrl"); - openapiFields.add("assetVersion"); - openapiFields.add("platform"); - openapiFields.add("unityVersion"); - openapiFields.add("variant"); + openapiFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "platform", "unityVersion", "variant")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("assetUrl"); - openapiRequiredFields.add("assetVersion"); - openapiRequiredFields.add("platform"); - openapiRequiredFields.add("unityVersion"); - openapiRequiredFields.add("variant"); + openapiRequiredFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "platform", "unityVersion", "variant")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AdminUnityPackage - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AdminUnityPackage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdminUnityPackage is not found in the empty JSON string", AdminUnityPackage.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AdminUnityPackage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AdminUnityPackage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AdminUnityPackage is not found in the empty JSON string", AdminUnityPackage.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AdminUnityPackage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdminUnityPackage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AdminUnityPackage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AdminUnityPackage.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("assetUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); } if (!jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if (!jsonObj.get("unityVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); } if (!jsonObj.get("variant").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `variant` to be a primitive type in the JSON string but got `%s`", jsonObj.get("variant").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `variant` to be a primitive type in the JSON string but got `%s`", jsonObj.get("variant").toString())); } } @@ -318,31 +290,31 @@ public void write(JsonWriter out, AdminUnityPackage value) throws IOException { @Override public AdminUnityPackage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AdminUnityPackage given an JSON string - * - * @param jsonString JSON string - * @return An instance of AdminUnityPackage - * @throws IOException if the JSON string is invalid with respect to AdminUnityPackage - */ + /** + * Create an instance of AdminUnityPackage given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdminUnityPackage + * @throws IOException if the JSON string is invalid with respect to AdminUnityPackage + */ public static AdminUnityPackage fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AdminUnityPackage.class); } - /** - * Convert an instance of AdminUnityPackage to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AdminUnityPackage to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AgeVerificationStatus.java b/src/main/java/io/github/vrchatapi/model/AgeVerificationStatus.java index 04ae1f75..e8b1c3f1 100644 --- a/src/main/java/io/github/vrchatapi/model/AgeVerificationStatus.java +++ b/src/main/java/io/github/vrchatapi/model/AgeVerificationStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -71,5 +70,10 @@ public AgeVerificationStatus read(final JsonReader jsonReader) throws IOExceptio return AgeVerificationStatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AgeVerificationStatus.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/Agreement.java b/src/main/java/io/github/vrchatapi/model/Agreement.java index 1096505b..d51e16b6 100644 --- a/src/main/java/io/github/vrchatapi/model/Agreement.java +++ b/src/main/java/io/github/vrchatapi/model/Agreement.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.AgreementCode; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,228 +50,207 @@ /** * Agreement */ -@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 Agreement { public static final String SERIALIZED_NAME_AGREEMENT_CODE = "agreementCode"; @SerializedName(SERIALIZED_NAME_AGREEMENT_CODE) + @javax.annotation.Nonnull private AgreementCode agreementCode = AgreementCode.CONTENT_COPYRIGHT_OWNED; public static final String SERIALIZED_NAME_AGREEMENT_FULLTEXT = "agreementFulltext"; @SerializedName(SERIALIZED_NAME_AGREEMENT_FULLTEXT) + @javax.annotation.Nullable private String agreementFulltext; public static final String SERIALIZED_NAME_CONTENT_ID = "contentId"; @SerializedName(SERIALIZED_NAME_CONTENT_ID) + @javax.annotation.Nonnull private String contentId; public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull private String created; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nonnull private String userId; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nonnull private Integer version; public Agreement() { } - public Agreement agreementCode(AgreementCode agreementCode) { - + public Agreement agreementCode(@javax.annotation.Nonnull AgreementCode agreementCode) { this.agreementCode = agreementCode; return this; } - /** + /** * Get agreementCode * @return agreementCode - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AgreementCode getAgreementCode() { return agreementCode; } - - public void setAgreementCode(AgreementCode agreementCode) { + public void setAgreementCode(@javax.annotation.Nonnull AgreementCode agreementCode) { this.agreementCode = agreementCode; } - public Agreement agreementFulltext(String agreementFulltext) { - + public Agreement agreementFulltext(@javax.annotation.Nullable String agreementFulltext) { this.agreementFulltext = agreementFulltext; return this; } - /** + /** * The full text of the agreement. * @return agreementFulltext - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "By clicking OK, I certify that I have the necessary rights to upload this content and that it will not infringe on any third-party legal or intellectual property rights.", value = "The full text of the agreement.") - public String getAgreementFulltext() { return agreementFulltext; } - - public void setAgreementFulltext(String agreementFulltext) { + public void setAgreementFulltext(@javax.annotation.Nullable String agreementFulltext) { this.agreementFulltext = agreementFulltext; } - public Agreement contentId(String contentId) { - + public Agreement contentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; return this; } - /** + /** * The id of the content being uploaded, such as a WorldID, AvatarID, or PropID. * @return contentId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_c38a1615-5bf5-42b4-84eb-a8b6c37cbd11", required = true, value = "The id of the content being uploaded, such as a WorldID, AvatarID, or PropID.") - public String getContentId() { return contentId; } - - public void setContentId(String contentId) { + public void setContentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; } - public Agreement created(String created) { - + public Agreement created(@javax.annotation.Nonnull String created) { this.created = created; return this; } - /** + /** * When the agreement was created * @return created - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "When the agreement was created") - public String getCreated() { return created; } - - public void setCreated(String created) { + public void setCreated(@javax.annotation.Nonnull String created) { this.created = created; } - public Agreement id(String id) { - + public Agreement id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * The id of the agreement. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The id of the agreement.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Agreement tags(List tags) { - + public Agreement tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public Agreement addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public Agreement userId(String userId) { - + public Agreement userId(@javax.annotation.Nonnull String userId) { this.userId = userId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return userId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getUserId() { return userId; } - - public void setUserId(String userId) { + public void setUserId(@javax.annotation.Nonnull String userId) { this.userId = userId; } - public Agreement version(Integer version) { - + public Agreement version(@javax.annotation.Nonnull Integer version) { this.version = version; return this; } - /** + /** * The version of the agreement. * @return version - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "1", required = true, value = "The version of the agreement.") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nonnull Integer version) { this.version = version; } @@ -322,10 +301,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -334,74 +310,62 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("agreementCode"); - openapiFields.add("agreementFulltext"); - openapiFields.add("contentId"); - openapiFields.add("created"); - openapiFields.add("id"); - openapiFields.add("tags"); - openapiFields.add("userId"); - openapiFields.add("version"); + openapiFields = new HashSet(Arrays.asList("agreementCode", "agreementFulltext", "contentId", "created", "id", "tags", "userId", "version")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("agreementCode"); - openapiRequiredFields.add("contentId"); - openapiRequiredFields.add("created"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("userId"); - openapiRequiredFields.add("version"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Agreement - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Agreement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Agreement is not found in the empty JSON string", Agreement.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("agreementCode", "contentId", "created", "id", "tags", "userId", "version")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Agreement + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Agreement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Agreement is not found in the empty JSON string", Agreement.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Agreement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Agreement` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Agreement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Agreement.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `agreementCode` + AgreementCode.validateJsonElement(jsonObj.get("agreementCode")); if ((jsonObj.get("agreementFulltext") != null && !jsonObj.get("agreementFulltext").isJsonNull()) && !jsonObj.get("agreementFulltext").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `agreementFulltext` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agreementFulltext").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `agreementFulltext` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agreementFulltext").toString())); } if (!jsonObj.get("contentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); } if (!jsonObj.get("created").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("created").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `created` to be a primitive type in the JSON string but got `%s`", jsonObj.get("created").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("userId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); } } @@ -425,31 +389,31 @@ public void write(JsonWriter out, Agreement value) throws IOException { @Override public Agreement read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Agreement given an JSON string - * - * @param jsonString JSON string - * @return An instance of Agreement - * @throws IOException if the JSON string is invalid with respect to Agreement - */ + /** + * Create an instance of Agreement given an JSON string + * + * @param jsonString JSON string + * @return An instance of Agreement + * @throws IOException if the JSON string is invalid with respect to Agreement + */ public static Agreement fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Agreement.class); } - /** - * Convert an instance of Agreement to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Agreement to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AgreementCode.java b/src/main/java/io/github/vrchatapi/model/AgreementCode.java index 712feaa9..c9ea70d3 100644 --- a/src/main/java/io/github/vrchatapi/model/AgreementCode.java +++ b/src/main/java/io/github/vrchatapi/model/AgreementCode.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -67,5 +66,10 @@ public AgreementCode read(final JsonReader jsonReader) throws IOException { return AgreementCode.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AgreementCode.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/AgreementRequest.java b/src/main/java/io/github/vrchatapi/model/AgreementRequest.java index a357ab5b..f451ef04 100644 --- a/src/main/java/io/github/vrchatapi/model/AgreementRequest.java +++ b/src/main/java/io/github/vrchatapi/model/AgreementRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.AgreementCode; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,115 +48,103 @@ /** * AgreementRequest */ -@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 AgreementRequest { public static final String SERIALIZED_NAME_AGREEMENT_CODE = "agreementCode"; @SerializedName(SERIALIZED_NAME_AGREEMENT_CODE) + @javax.annotation.Nonnull private AgreementCode agreementCode = AgreementCode.CONTENT_COPYRIGHT_OWNED; public static final String SERIALIZED_NAME_AGREEMENT_FULLTEXT = "agreementFulltext"; @SerializedName(SERIALIZED_NAME_AGREEMENT_FULLTEXT) + @javax.annotation.Nonnull private String agreementFulltext; public static final String SERIALIZED_NAME_CONTENT_ID = "contentId"; @SerializedName(SERIALIZED_NAME_CONTENT_ID) + @javax.annotation.Nonnull private String contentId; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nonnull private Integer version; public AgreementRequest() { } - public AgreementRequest agreementCode(AgreementCode agreementCode) { - + public AgreementRequest agreementCode(@javax.annotation.Nonnull AgreementCode agreementCode) { this.agreementCode = agreementCode; return this; } - /** + /** * Get agreementCode * @return agreementCode - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AgreementCode getAgreementCode() { return agreementCode; } - - public void setAgreementCode(AgreementCode agreementCode) { + public void setAgreementCode(@javax.annotation.Nonnull AgreementCode agreementCode) { this.agreementCode = agreementCode; } - public AgreementRequest agreementFulltext(String agreementFulltext) { - + public AgreementRequest agreementFulltext(@javax.annotation.Nonnull String agreementFulltext) { this.agreementFulltext = agreementFulltext; return this; } - /** + /** * The full text of the agreement (currently `By clicking OK, I certify that I have the necessary rights to upload this content and that it will not infringe on any third-party legal or intellectual property rights.`). * @return agreementFulltext - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "By clicking OK, I certify that I have the necessary rights to upload this content and that it will not infringe on any third-party legal or intellectual property rights.", required = true, value = "The full text of the agreement (currently `By clicking OK, I certify that I have the necessary rights to upload this content and that it will not infringe on any third-party legal or intellectual property rights.`).") - public String getAgreementFulltext() { return agreementFulltext; } - - public void setAgreementFulltext(String agreementFulltext) { + public void setAgreementFulltext(@javax.annotation.Nonnull String agreementFulltext) { this.agreementFulltext = agreementFulltext; } - public AgreementRequest contentId(String contentId) { - + public AgreementRequest contentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; return this; } - /** + /** * The id of the content being uploaded, such as a WorldID, AvatarID, or PropID. * @return contentId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_c38a1615-5bf5-42b4-84eb-a8b6c37cbd11", required = true, value = "The id of the content being uploaded, such as a WorldID, AvatarID, or PropID.") - public String getContentId() { return contentId; } - - public void setContentId(String contentId) { + public void setContentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; } - public AgreementRequest version(Integer version) { - + public AgreementRequest version(@javax.annotation.Nonnull Integer version) { this.version = version; return this; } - /** + /** * The version of the agreement (currently `1`). * @return version - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "1", required = true, value = "The version of the agreement (currently `1`).") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nonnull Integer version) { this.version = version; } @@ -199,10 +187,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -211,52 +196,47 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("agreementCode"); - openapiFields.add("agreementFulltext"); - openapiFields.add("contentId"); - openapiFields.add("version"); + openapiFields = new HashSet(Arrays.asList("agreementCode", "agreementFulltext", "contentId", "version")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("agreementCode"); - openapiRequiredFields.add("agreementFulltext"); - openapiRequiredFields.add("contentId"); - openapiRequiredFields.add("version"); + openapiRequiredFields = new HashSet(Arrays.asList("agreementCode", "agreementFulltext", "contentId", "version")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AgreementRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AgreementRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AgreementRequest is not found in the empty JSON string", AgreementRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AgreementRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AgreementRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AgreementRequest is not found in the empty JSON string", AgreementRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AgreementRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AgreementRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AgreementRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AgreementRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `agreementCode` + AgreementCode.validateJsonElement(jsonObj.get("agreementCode")); if (!jsonObj.get("agreementFulltext").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `agreementFulltext` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agreementFulltext").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `agreementFulltext` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agreementFulltext").toString())); } if (!jsonObj.get("contentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); } } @@ -280,31 +260,31 @@ public void write(JsonWriter out, AgreementRequest value) throws IOException { @Override public AgreementRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AgreementRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of AgreementRequest - * @throws IOException if the JSON string is invalid with respect to AgreementRequest - */ + /** + * Create an instance of AgreementRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AgreementRequest + * @throws IOException if the JSON string is invalid with respect to AgreementRequest + */ public static AgreementRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AgreementRequest.class); } - /** - * Convert an instance of AgreementRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AgreementRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AgreementStatus.java b/src/main/java/io/github/vrchatapi/model/AgreementStatus.java index 115231c9..262c9b78 100644 --- a/src/main/java/io/github/vrchatapi/model/AgreementStatus.java +++ b/src/main/java/io/github/vrchatapi/model/AgreementStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.AgreementCode; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,142 +48,127 @@ /** * AgreementStatus */ -@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 AgreementStatus { public static final String SERIALIZED_NAME_AGREED = "agreed"; @SerializedName(SERIALIZED_NAME_AGREED) + @javax.annotation.Nonnull private Boolean agreed; public static final String SERIALIZED_NAME_AGREEMENT_CODE = "agreementCode"; @SerializedName(SERIALIZED_NAME_AGREEMENT_CODE) + @javax.annotation.Nonnull private AgreementCode agreementCode = AgreementCode.CONTENT_COPYRIGHT_OWNED; public static final String SERIALIZED_NAME_CONTENT_ID = "contentId"; @SerializedName(SERIALIZED_NAME_CONTENT_ID) + @javax.annotation.Nonnull private String contentId; public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nonnull private String userId; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nonnull private Integer version; public AgreementStatus() { } - public AgreementStatus agreed(Boolean agreed) { - + public AgreementStatus agreed(@javax.annotation.Nonnull Boolean agreed) { this.agreed = agreed; return this; } - /** + /** * Whether the user has agreed for this content. * @return agreed - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "false", required = true, value = "Whether the user has agreed for this content.") - public Boolean getAgreed() { return agreed; } - - public void setAgreed(Boolean agreed) { + public void setAgreed(@javax.annotation.Nonnull Boolean agreed) { this.agreed = agreed; } - public AgreementStatus agreementCode(AgreementCode agreementCode) { - + public AgreementStatus agreementCode(@javax.annotation.Nonnull AgreementCode agreementCode) { this.agreementCode = agreementCode; return this; } - /** + /** * Get agreementCode * @return agreementCode - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AgreementCode getAgreementCode() { return agreementCode; } - - public void setAgreementCode(AgreementCode agreementCode) { + public void setAgreementCode(@javax.annotation.Nonnull AgreementCode agreementCode) { this.agreementCode = agreementCode; } - public AgreementStatus contentId(String contentId) { - + public AgreementStatus contentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; return this; } - /** + /** * The id of the content being uploaded, such as a WorldID, AvatarID, or PropID. * @return contentId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_c38a1615-5bf5-42b4-84eb-a8b6c37cbd11", required = true, value = "The id of the content being uploaded, such as a WorldID, AvatarID, or PropID.") - public String getContentId() { return contentId; } - - public void setContentId(String contentId) { + public void setContentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; } - public AgreementStatus userId(String userId) { - + public AgreementStatus userId(@javax.annotation.Nonnull String userId) { this.userId = userId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return userId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getUserId() { return userId; } - - public void setUserId(String userId) { + public void setUserId(@javax.annotation.Nonnull String userId) { this.userId = userId; } - public AgreementStatus version(Integer version) { - + public AgreementStatus version(@javax.annotation.Nonnull Integer version) { this.version = version; return this; } - /** + /** * The version of the agreement. * @return version - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "1", required = true, value = "The version of the agreement.") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nonnull Integer version) { this.version = version; } @@ -228,10 +213,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -240,54 +222,47 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("agreed"); - openapiFields.add("agreementCode"); - openapiFields.add("contentId"); - openapiFields.add("userId"); - openapiFields.add("version"); + openapiFields = new HashSet(Arrays.asList("agreed", "agreementCode", "contentId", "userId", "version")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("agreed"); - openapiRequiredFields.add("agreementCode"); - openapiRequiredFields.add("contentId"); - openapiRequiredFields.add("userId"); - openapiRequiredFields.add("version"); + openapiRequiredFields = new HashSet(Arrays.asList("agreed", "agreementCode", "contentId", "userId", "version")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AgreementStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AgreementStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AgreementStatus is not found in the empty JSON string", AgreementStatus.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AgreementStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AgreementStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AgreementStatus is not found in the empty JSON string", AgreementStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AgreementStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AgreementStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AgreementStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AgreementStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `agreementCode` + AgreementCode.validateJsonElement(jsonObj.get("agreementCode")); if (!jsonObj.get("contentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); } if (!jsonObj.get("userId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); } } @@ -311,31 +286,31 @@ public void write(JsonWriter out, AgreementStatus value) throws IOException { @Override public AgreementStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AgreementStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of AgreementStatus - * @throws IOException if the JSON string is invalid with respect to AgreementStatus - */ + /** + * Create an instance of AgreementStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of AgreementStatus + * @throws IOException if the JSON string is invalid with respect to AgreementStatus + */ public static AgreementStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AgreementStatus.class); } - /** - * Convert an instance of AgreementStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AgreementStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Avatar.java b/src/main/java/io/github/vrchatapi/model/Avatar.java index c7a8aaf9..b91ce84d 100644 --- a/src/main/java/io/github/vrchatapi/model/Avatar.java +++ b/src/main/java/io/github/vrchatapi/model/Avatar.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,11 +24,10 @@ import io.github.vrchatapi.model.AvatarUnityPackageUrlObject; import io.github.vrchatapi.model.ReleaseStatus; import io.github.vrchatapi.model.UnityPackage; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -44,13 +42,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -58,571 +58,524 @@ /** * */ -@ApiModel(description = "") -@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 Avatar { public static final String SERIALIZED_NAME_ACKNOWLEDGEMENTS = "acknowledgements"; @SerializedName(SERIALIZED_NAME_ACKNOWLEDGEMENTS) + @javax.annotation.Nullable private String acknowledgements; public static final String SERIALIZED_NAME_ACTIVE_ASSET_REVIEW_ID = "activeAssetReviewId"; @SerializedName(SERIALIZED_NAME_ACTIVE_ASSET_REVIEW_ID) + @javax.annotation.Nullable private String activeAssetReviewId; public static final String SERIALIZED_NAME_ASSET_URL = "assetUrl"; @SerializedName(SERIALIZED_NAME_ASSET_URL) + @javax.annotation.Nullable private String assetUrl; public static final String SERIALIZED_NAME_ASSET_URL_OBJECT = "assetUrlObject"; @SerializedName(SERIALIZED_NAME_ASSET_URL_OBJECT) + @javax.annotation.Nullable private Object assetUrlObject; public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nonnull private String authorId; public static final String SERIALIZED_NAME_AUTHOR_NAME = "authorName"; @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nonnull private String authorName; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_FEATURED = "featured"; @SerializedName(SERIALIZED_NAME_FEATURED) + @javax.annotation.Nonnull private Boolean featured = false; public static final String SERIALIZED_NAME_HIGHEST_PRICE = "highestPrice"; @SerializedName(SERIALIZED_NAME_HIGHEST_PRICE) + @javax.annotation.Nullable private Integer highestPrice; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_LISTING_DATE = "listingDate"; @SerializedName(SERIALIZED_NAME_LISTING_DATE) + @javax.annotation.Nullable private String listingDate; public static final String SERIALIZED_NAME_LOCK = "lock"; @SerializedName(SERIALIZED_NAME_LOCK) + @javax.annotation.Nullable private Boolean lock; public static final String SERIALIZED_NAME_LOWEST_PRICE = "lowestPrice"; @SerializedName(SERIALIZED_NAME_LOWEST_PRICE) + @javax.annotation.Nullable private Integer lowestPrice; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_PENDING_UPLOAD = "pendingUpload"; @SerializedName(SERIALIZED_NAME_PENDING_UPLOAD) + @javax.annotation.Nullable private Boolean pendingUpload = false; public static final String SERIALIZED_NAME_PERFORMANCE = "performance"; @SerializedName(SERIALIZED_NAME_PERFORMANCE) + @javax.annotation.Nonnull private AvatarPerformance performance; public static final String SERIALIZED_NAME_PRODUCT_ID = "productId"; @SerializedName(SERIALIZED_NAME_PRODUCT_ID) + @javax.annotation.Nullable private String productId; public static final String SERIALIZED_NAME_PUBLISHED_LISTINGS = "publishedListings"; @SerializedName(SERIALIZED_NAME_PUBLISHED_LISTINGS) - private List publishedListings = null; + @javax.annotation.Nullable + private List publishedListings = new ArrayList<>(); public static final String SERIALIZED_NAME_RELEASE_STATUS = "releaseStatus"; @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) + @javax.annotation.Nonnull private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; public static final String SERIALIZED_NAME_SEARCHABLE = "searchable"; @SerializedName(SERIALIZED_NAME_SEARCHABLE) + @javax.annotation.Nullable private Boolean searchable = false; public static final String SERIALIZED_NAME_STYLES = "styles"; @SerializedName(SERIALIZED_NAME_STYLES) + @javax.annotation.Nonnull private AvatarStyles styles; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_THUMBNAIL_IMAGE_URL = "thumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nonnull private String thumbnailImageUrl; public static final String SERIALIZED_NAME_UNITY_PACKAGE_URL = "unityPackageUrl"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGE_URL) + @javax.annotation.Nonnull private String unityPackageUrl; public static final String SERIALIZED_NAME_UNITY_PACKAGE_URL_OBJECT = "unityPackageUrlObject"; + @Deprecated @SerializedName(SERIALIZED_NAME_UNITY_PACKAGE_URL_OBJECT) + @javax.annotation.Nonnull private AvatarUnityPackageUrlObject unityPackageUrlObject; public static final String SERIALIZED_NAME_UNITY_PACKAGES = "unityPackages"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGES) + @javax.annotation.Nonnull private Set unityPackages = new LinkedHashSet<>(); public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nonnull private Integer version = 0; public Avatar() { } - public Avatar acknowledgements(String acknowledgements) { - + public Avatar acknowledgements(@javax.annotation.Nullable String acknowledgements) { this.acknowledgements = acknowledgements; return this; } - /** + /** * Get acknowledgements * @return acknowledgements - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAcknowledgements() { return acknowledgements; } - - public void setAcknowledgements(String acknowledgements) { + public void setAcknowledgements(@javax.annotation.Nullable String acknowledgements) { this.acknowledgements = acknowledgements; } - public Avatar activeAssetReviewId(String activeAssetReviewId) { - + public Avatar activeAssetReviewId(@javax.annotation.Nullable String activeAssetReviewId) { this.activeAssetReviewId = activeAssetReviewId; return this; } - /** + /** * Only present for the avatar author on avatars under active review. * @return activeAssetReviewId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only present for the avatar author on avatars under active review.") - public String getActiveAssetReviewId() { return activeAssetReviewId; } - - public void setActiveAssetReviewId(String activeAssetReviewId) { + public void setActiveAssetReviewId(@javax.annotation.Nullable String activeAssetReviewId) { this.activeAssetReviewId = activeAssetReviewId; } - public Avatar assetUrl(String assetUrl) { - + public Avatar assetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; return this; } - /** + /** * Not present from general search `/avatars`, only on specific requests `/avatars/{avatarId}`. * @return assetUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Not present from general search `/avatars`, only on specific requests `/avatars/{avatarId}`.") - public String getAssetUrl() { return assetUrl; } - - public void setAssetUrl(String assetUrl) { + public void setAssetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; } - public Avatar assetUrlObject(Object assetUrlObject) { - + public Avatar assetUrlObject(@javax.annotation.Nullable Object assetUrlObject) { this.assetUrlObject = assetUrlObject; return this; } - /** + /** * Not present from general search `/avatars`, only on specific requests `/avatars/{avatarId}`. **Deprecation:** `Object` has unknown usage/fields, and is always empty. Use normal `Url` field instead. * @return assetUrlObject - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Not present from general search `/avatars`, only on specific requests `/avatars/{avatarId}`. **Deprecation:** `Object` has unknown usage/fields, and is always empty. Use normal `Url` field instead.") - public Object getAssetUrlObject() { return assetUrlObject; } - - public void setAssetUrlObject(Object assetUrlObject) { + public void setAssetUrlObject(@javax.annotation.Nullable Object assetUrlObject) { this.assetUrlObject = assetUrlObject; } - public Avatar authorId(String authorId) { - + public Avatar authorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; } - public Avatar authorName(String authorName) { - + public Avatar authorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; return this; } - /** + /** * Get authorName * @return authorName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAuthorName() { return authorName; } - - public void setAuthorName(String authorName) { + public void setAuthorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; } - public Avatar createdAt(OffsetDateTime createdAt) { - + public Avatar createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public Avatar description(String description) { - + public Avatar description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public Avatar featured(Boolean featured) { - + public Avatar featured(@javax.annotation.Nonnull Boolean featured) { this.featured = featured; return this; } - /** + /** * Get featured * @return featured - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getFeatured() { return featured; } - - public void setFeatured(Boolean featured) { + public void setFeatured(@javax.annotation.Nonnull Boolean featured) { this.featured = featured; } - public Avatar highestPrice(Integer highestPrice) { - + public Avatar highestPrice(@javax.annotation.Nullable Integer highestPrice) { this.highestPrice = highestPrice; return this; } - /** + /** * Get highestPrice * @return highestPrice - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getHighestPrice() { return highestPrice; } - - public void setHighestPrice(Integer highestPrice) { + public void setHighestPrice(@javax.annotation.Nullable Integer highestPrice) { this.highestPrice = highestPrice; } - public Avatar id(String id) { - + public Avatar id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_912d66a4-4714-43b8-8407-7de2cafbf55b", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Avatar imageUrl(String imageUrl) { - + public Avatar imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public Avatar listingDate(String listingDate) { - + public Avatar listingDate(@javax.annotation.Nullable String listingDate) { this.listingDate = listingDate; return this; } - /** + /** * Get listingDate * @return listingDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getListingDate() { return listingDate; } - - public void setListingDate(String listingDate) { + public void setListingDate(@javax.annotation.Nullable String listingDate) { this.listingDate = listingDate; } - public Avatar lock(Boolean lock) { - + public Avatar lock(@javax.annotation.Nullable Boolean lock) { this.lock = lock; return this; } - /** + /** * Get lock * @return lock - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getLock() { return lock; } - - public void setLock(Boolean lock) { + public void setLock(@javax.annotation.Nullable Boolean lock) { this.lock = lock; } - public Avatar lowestPrice(Integer lowestPrice) { - + public Avatar lowestPrice(@javax.annotation.Nullable Integer lowestPrice) { this.lowestPrice = lowestPrice; return this; } - /** + /** * Get lowestPrice * @return lowestPrice - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getLowestPrice() { return lowestPrice; } - - public void setLowestPrice(Integer lowestPrice) { + public void setLowestPrice(@javax.annotation.Nullable Integer lowestPrice) { this.lowestPrice = lowestPrice; } - public Avatar name(String name) { - + public Avatar name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public Avatar pendingUpload(Boolean pendingUpload) { - + public Avatar pendingUpload(@javax.annotation.Nullable Boolean pendingUpload) { this.pendingUpload = pendingUpload; return this; } - /** + /** * Get pendingUpload * @return pendingUpload - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getPendingUpload() { return pendingUpload; } - - public void setPendingUpload(Boolean pendingUpload) { + public void setPendingUpload(@javax.annotation.Nullable Boolean pendingUpload) { this.pendingUpload = pendingUpload; } - public Avatar performance(AvatarPerformance performance) { - + public Avatar performance(@javax.annotation.Nonnull AvatarPerformance performance) { this.performance = performance; return this; } - /** + /** * Get performance * @return performance - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AvatarPerformance getPerformance() { return performance; } - - public void setPerformance(AvatarPerformance performance) { + public void setPerformance(@javax.annotation.Nonnull AvatarPerformance performance) { this.performance = performance; } - public Avatar productId(String productId) { - + public Avatar productId(@javax.annotation.Nullable String productId) { this.productId = productId; return this; } - /** + /** * Get productId * @return productId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProductId() { return productId; } - - public void setProductId(String productId) { + public void setProductId(@javax.annotation.Nullable String productId) { this.productId = productId; } - public Avatar publishedListings(List publishedListings) { - + public Avatar publishedListings(@javax.annotation.Nullable List publishedListings) { this.publishedListings = publishedListings; return this; } @@ -635,262 +588,227 @@ public Avatar addPublishedListingsItem(AvatarPublishedListingsInner publishedLis return this; } - /** + /** * Get publishedListings * @return publishedListings - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getPublishedListings() { return publishedListings; } - - public void setPublishedListings(List publishedListings) { + public void setPublishedListings(@javax.annotation.Nullable List publishedListings) { this.publishedListings = publishedListings; } - public Avatar releaseStatus(ReleaseStatus releaseStatus) { - + public Avatar releaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; return this; } - /** + /** * Get releaseStatus * @return releaseStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ReleaseStatus getReleaseStatus() { return releaseStatus; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { + public void setReleaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; } - public Avatar searchable(Boolean searchable) { - + public Avatar searchable(@javax.annotation.Nullable Boolean searchable) { this.searchable = searchable; return this; } - /** + /** * Get searchable * @return searchable - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getSearchable() { return searchable; } - - public void setSearchable(Boolean searchable) { + public void setSearchable(@javax.annotation.Nullable Boolean searchable) { this.searchable = searchable; } - public Avatar styles(AvatarStyles styles) { - + public Avatar styles(@javax.annotation.Nonnull AvatarStyles styles) { this.styles = styles; return this; } - /** + /** * Get styles * @return styles - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AvatarStyles getStyles() { return styles; } - - public void setStyles(AvatarStyles styles) { + public void setStyles(@javax.annotation.Nonnull AvatarStyles styles) { this.styles = styles; } - public Avatar tags(List tags) { - + public Avatar tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public Avatar addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public Avatar thumbnailImageUrl(String thumbnailImageUrl) { - + public Avatar thumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; return this; } - /** + /** * Get thumbnailImageUrl * @return thumbnailImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getThumbnailImageUrl() { return thumbnailImageUrl; } - - public void setThumbnailImageUrl(String thumbnailImageUrl) { + public void setThumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; } - public Avatar unityPackageUrl(String unityPackageUrl) { - + public Avatar unityPackageUrl(@javax.annotation.Nonnull String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; return this; } - /** + /** * Get unityPackageUrl * @return unityPackageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getUnityPackageUrl() { return unityPackageUrl; } - - public void setUnityPackageUrl(String unityPackageUrl) { + public void setUnityPackageUrl(@javax.annotation.Nonnull String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; } - public Avatar unityPackageUrlObject(AvatarUnityPackageUrlObject unityPackageUrlObject) { - + @Deprecated + public Avatar unityPackageUrlObject(@javax.annotation.Nonnull AvatarUnityPackageUrlObject unityPackageUrlObject) { this.unityPackageUrlObject = unityPackageUrlObject; return this; } - /** + /** * Get unityPackageUrlObject * @return unityPackageUrlObject * @deprecated - **/ + */ @Deprecated @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AvatarUnityPackageUrlObject getUnityPackageUrlObject() { return unityPackageUrlObject; } - - public void setUnityPackageUrlObject(AvatarUnityPackageUrlObject unityPackageUrlObject) { + @Deprecated + public void setUnityPackageUrlObject(@javax.annotation.Nonnull AvatarUnityPackageUrlObject unityPackageUrlObject) { this.unityPackageUrlObject = unityPackageUrlObject; } - public Avatar unityPackages(Set unityPackages) { - + public Avatar unityPackages(@javax.annotation.Nonnull Set unityPackages) { this.unityPackages = unityPackages; return this; } public Avatar addUnityPackagesItem(UnityPackage unityPackagesItem) { + if (this.unityPackages == null) { + this.unityPackages = new LinkedHashSet<>(); + } this.unityPackages.add(unityPackagesItem); return this; } - /** + /** * Get unityPackages * @return unityPackages - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Set getUnityPackages() { return unityPackages; } - - public void setUnityPackages(Set unityPackages) { + public void setUnityPackages(@javax.annotation.Nonnull Set unityPackages) { this.unityPackages = unityPackages; } - public Avatar updatedAt(OffsetDateTime updatedAt) { - + public Avatar updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public Avatar version(Integer version) { - + public Avatar version(@javax.annotation.Nonnull Integer version) { this.version = version; return this; } - /** + /** * Get version * minimum: 0 * @return version - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "68", required = true, value = "") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nonnull Integer version) { this.version = version; } @@ -985,10 +903,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -997,163 +912,117 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("acknowledgements"); - openapiFields.add("activeAssetReviewId"); - openapiFields.add("assetUrl"); - openapiFields.add("assetUrlObject"); - openapiFields.add("authorId"); - openapiFields.add("authorName"); - openapiFields.add("created_at"); - openapiFields.add("description"); - openapiFields.add("featured"); - openapiFields.add("highestPrice"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("listingDate"); - openapiFields.add("lock"); - openapiFields.add("lowestPrice"); - openapiFields.add("name"); - openapiFields.add("pendingUpload"); - openapiFields.add("performance"); - openapiFields.add("productId"); - openapiFields.add("publishedListings"); - openapiFields.add("releaseStatus"); - openapiFields.add("searchable"); - openapiFields.add("styles"); - openapiFields.add("tags"); - openapiFields.add("thumbnailImageUrl"); - openapiFields.add("unityPackageUrl"); - openapiFields.add("unityPackageUrlObject"); - openapiFields.add("unityPackages"); - openapiFields.add("updated_at"); - openapiFields.add("version"); + openapiFields = new HashSet(Arrays.asList("acknowledgements", "activeAssetReviewId", "assetUrl", "assetUrlObject", "authorId", "authorName", "created_at", "description", "featured", "highestPrice", "id", "imageUrl", "listingDate", "lock", "lowestPrice", "name", "pendingUpload", "performance", "productId", "publishedListings", "releaseStatus", "searchable", "styles", "tags", "thumbnailImageUrl", "unityPackageUrl", "unityPackageUrlObject", "unityPackages", "updated_at", "version")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("authorId"); - openapiRequiredFields.add("authorName"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("featured"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("listingDate"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("performance"); - openapiRequiredFields.add("releaseStatus"); - openapiRequiredFields.add("styles"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("thumbnailImageUrl"); - openapiRequiredFields.add("unityPackageUrl"); - openapiRequiredFields.add("unityPackageUrlObject"); - openapiRequiredFields.add("unityPackages"); - openapiRequiredFields.add("updated_at"); - openapiRequiredFields.add("version"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Avatar - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Avatar.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Avatar is not found in the empty JSON string", Avatar.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("authorId", "authorName", "created_at", "description", "featured", "id", "imageUrl", "listingDate", "name", "performance", "releaseStatus", "styles", "tags", "thumbnailImageUrl", "unityPackageUrl", "unityPackageUrlObject", "unityPackages", "updated_at", "version")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Avatar + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Avatar.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Avatar is not found in the empty JSON string", Avatar.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Avatar.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Avatar` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Avatar` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Avatar.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("acknowledgements") != null && !jsonObj.get("acknowledgements").isJsonNull()) && !jsonObj.get("acknowledgements").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `acknowledgements` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acknowledgements").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `acknowledgements` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acknowledgements").toString())); } if ((jsonObj.get("activeAssetReviewId") != null && !jsonObj.get("activeAssetReviewId").isJsonNull()) && !jsonObj.get("activeAssetReviewId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `activeAssetReviewId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("activeAssetReviewId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `activeAssetReviewId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("activeAssetReviewId").toString())); } if ((jsonObj.get("assetUrl") != null && !jsonObj.get("assetUrl").isJsonNull()) && !jsonObj.get("assetUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); } if (!jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if (!jsonObj.get("authorName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } - if (!jsonObj.get("listingDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingDate").toString())); + if ((jsonObj.get("listingDate") != null && !jsonObj.get("listingDate").isJsonNull()) && !jsonObj.get("listingDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingDate").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the required field `performance` - AvatarPerformance.validateJsonObject(jsonObj.getAsJsonObject("performance")); + AvatarPerformance.validateJsonElement(jsonObj.get("performance")); if ((jsonObj.get("productId") != null && !jsonObj.get("productId").isJsonNull()) && !jsonObj.get("productId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `productId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `productId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productId").toString())); } if (jsonObj.get("publishedListings") != null && !jsonObj.get("publishedListings").isJsonNull()) { JsonArray jsonArraypublishedListings = jsonObj.getAsJsonArray("publishedListings"); if (jsonArraypublishedListings != null) { // ensure the json data is an array if (!jsonObj.get("publishedListings").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `publishedListings` to be an array in the JSON string but got `%s`", jsonObj.get("publishedListings").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `publishedListings` to be an array in the JSON string but got `%s`", jsonObj.get("publishedListings").toString())); } // validate the optional field `publishedListings` (array) for (int i = 0; i < jsonArraypublishedListings.size(); i++) { - AvatarPublishedListingsInner.validateJsonObject(jsonArraypublishedListings.get(i).getAsJsonObject()); + AvatarPublishedListingsInner.validateJsonElement(jsonArraypublishedListings.get(i)); }; } } + // validate the required field `releaseStatus` + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); // validate the required field `styles` - AvatarStyles.validateJsonObject(jsonObj.getAsJsonObject("styles")); + AvatarStyles.validateJsonElement(jsonObj.get("styles")); // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("thumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); } if (!jsonObj.get("unityPackageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); } // validate the required field `unityPackageUrlObject` - AvatarUnityPackageUrlObject.validateJsonObject(jsonObj.getAsJsonObject("unityPackageUrlObject")); - // ensure the json data is an array - if (!jsonObj.get("unityPackages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); + AvatarUnityPackageUrlObject.validateJsonElement(jsonObj.get("unityPackageUrlObject")); + if (jsonObj.get("unityPackages") != null) { + if (!jsonObj.get("unityPackages").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); + } + JsonArray jsonArrayunityPackages = jsonObj.getAsJsonArray("unityPackages"); + // validate the required field `unityPackages` (array) + for (int i = 0; i < jsonArrayunityPackages.size(); i++) { + UnityPackage.validateJsonElement(jsonArrayunityPackages.get(i)); + } } - - JsonArray jsonArrayunityPackages = jsonObj.getAsJsonArray("unityPackages"); - // validate the required field `unityPackages` (array) - for (int i = 0; i < jsonArrayunityPackages.size(); i++) { - UnityPackage.validateJsonObject(jsonArrayunityPackages.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -1176,31 +1045,31 @@ public void write(JsonWriter out, Avatar value) throws IOException { @Override public Avatar read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Avatar given an JSON string - * - * @param jsonString JSON string - * @return An instance of Avatar - * @throws IOException if the JSON string is invalid with respect to Avatar - */ + /** + * Create an instance of Avatar given an JSON string + * + * @param jsonString JSON string + * @return An instance of Avatar + * @throws IOException if the JSON string is invalid with respect to Avatar + */ public static Avatar fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Avatar.class); } - /** - * Convert an instance of Avatar to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Avatar to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AvatarModeration.java b/src/main/java/io/github/vrchatapi/model/AvatarModeration.java index c448ca9b..63b6087f 100644 --- a/src/main/java/io/github/vrchatapi/model/AvatarModeration.java +++ b/src/main/java/io/github/vrchatapi/model/AvatarModeration.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.AvatarModerationType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,88 +49,79 @@ /** * AvatarModeration */ -@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 AvatarModeration { public static final String SERIALIZED_NAME_AVATAR_MODERATION_TYPE = "avatarModerationType"; @SerializedName(SERIALIZED_NAME_AVATAR_MODERATION_TYPE) + @javax.annotation.Nonnull private AvatarModerationType avatarModerationType; public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull private OffsetDateTime created; public static final String SERIALIZED_NAME_TARGET_AVATAR_ID = "targetAvatarId"; @SerializedName(SERIALIZED_NAME_TARGET_AVATAR_ID) + @javax.annotation.Nonnull private String targetAvatarId; public AvatarModeration() { } - public AvatarModeration avatarModerationType(AvatarModerationType avatarModerationType) { - + public AvatarModeration avatarModerationType(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { this.avatarModerationType = avatarModerationType; return this; } - /** + /** * Get avatarModerationType * @return avatarModerationType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AvatarModerationType getAvatarModerationType() { return avatarModerationType; } - - public void setAvatarModerationType(AvatarModerationType avatarModerationType) { + public void setAvatarModerationType(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { this.avatarModerationType = avatarModerationType; } - public AvatarModeration created(OffsetDateTime created) { - + public AvatarModeration created(@javax.annotation.Nonnull OffsetDateTime created) { this.created = created; return this; } - /** + /** * Get created * @return created - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreated() { return created; } - - public void setCreated(OffsetDateTime created) { + public void setCreated(@javax.annotation.Nonnull OffsetDateTime created) { this.created = created; } - public AvatarModeration targetAvatarId(String targetAvatarId) { - + public AvatarModeration targetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { this.targetAvatarId = targetAvatarId; return this; } - /** + /** * Get targetAvatarId * @return targetAvatarId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_912d66a4-4714-43b8-8407-7de2cafbf55b", required = true, value = "") - public String getTargetAvatarId() { return targetAvatarId; } - - public void setTargetAvatarId(String targetAvatarId) { + public void setTargetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { this.targetAvatarId = targetAvatarId; } @@ -171,10 +162,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -183,47 +171,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatarModerationType"); - openapiFields.add("created"); - openapiFields.add("targetAvatarId"); + openapiFields = new HashSet(Arrays.asList("avatarModerationType", "created", "targetAvatarId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("avatarModerationType"); - openapiRequiredFields.add("created"); - openapiRequiredFields.add("targetAvatarId"); + openapiRequiredFields = new HashSet(Arrays.asList("avatarModerationType", "created", "targetAvatarId")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AvatarModeration - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AvatarModeration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AvatarModeration is not found in the empty JSON string", AvatarModeration.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AvatarModeration + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AvatarModeration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AvatarModeration is not found in the empty JSON string", AvatarModeration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AvatarModeration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AvatarModeration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AvatarModeration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AvatarModeration.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `avatarModerationType` + AvatarModerationType.validateJsonElement(jsonObj.get("avatarModerationType")); if (!jsonObj.get("targetAvatarId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `targetAvatarId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetAvatarId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `targetAvatarId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetAvatarId").toString())); } } @@ -247,31 +232,31 @@ public void write(JsonWriter out, AvatarModeration value) throws IOException { @Override public AvatarModeration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AvatarModeration given an JSON string - * - * @param jsonString JSON string - * @return An instance of AvatarModeration - * @throws IOException if the JSON string is invalid with respect to AvatarModeration - */ + /** + * Create an instance of AvatarModeration given an JSON string + * + * @param jsonString JSON string + * @return An instance of AvatarModeration + * @throws IOException if the JSON string is invalid with respect to AvatarModeration + */ public static AvatarModeration fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AvatarModeration.class); } - /** - * Convert an instance of AvatarModeration to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AvatarModeration to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AvatarModerationCreated.java b/src/main/java/io/github/vrchatapi/model/AvatarModerationCreated.java index bd9f6067..4da3cf26 100644 --- a/src/main/java/io/github/vrchatapi/model/AvatarModerationCreated.java +++ b/src/main/java/io/github/vrchatapi/model/AvatarModerationCreated.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.AvatarModerationType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,88 +48,79 @@ /** * AvatarModerationCreated */ -@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 AvatarModerationCreated { public static final String SERIALIZED_NAME_AVATAR_MODERATION_TYPE = "avatarModerationType"; @SerializedName(SERIALIZED_NAME_AVATAR_MODERATION_TYPE) + @javax.annotation.Nonnull private AvatarModerationType avatarModerationType; public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull private Long created; public static final String SERIALIZED_NAME_TARGET_AVATAR_ID = "targetAvatarId"; @SerializedName(SERIALIZED_NAME_TARGET_AVATAR_ID) + @javax.annotation.Nonnull private String targetAvatarId; public AvatarModerationCreated() { } - public AvatarModerationCreated avatarModerationType(AvatarModerationType avatarModerationType) { - + public AvatarModerationCreated avatarModerationType(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { this.avatarModerationType = avatarModerationType; return this; } - /** + /** * Get avatarModerationType * @return avatarModerationType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AvatarModerationType getAvatarModerationType() { return avatarModerationType; } - - public void setAvatarModerationType(AvatarModerationType avatarModerationType) { + public void setAvatarModerationType(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { this.avatarModerationType = avatarModerationType; } - public AvatarModerationCreated created(Long created) { - + public AvatarModerationCreated created(@javax.annotation.Nonnull Long created) { this.created = created; return this; } - /** + /** * Timestamp in milliseconds since Unix epoch * @return created - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Timestamp in milliseconds since Unix epoch") - public Long getCreated() { return created; } - - public void setCreated(Long created) { + public void setCreated(@javax.annotation.Nonnull Long created) { this.created = created; } - public AvatarModerationCreated targetAvatarId(String targetAvatarId) { - + public AvatarModerationCreated targetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { this.targetAvatarId = targetAvatarId; return this; } - /** + /** * Get targetAvatarId * @return targetAvatarId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_912d66a4-4714-43b8-8407-7de2cafbf55b", required = true, value = "") - public String getTargetAvatarId() { return targetAvatarId; } - - public void setTargetAvatarId(String targetAvatarId) { + public void setTargetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { this.targetAvatarId = targetAvatarId; } @@ -170,10 +161,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -182,47 +170,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatarModerationType"); - openapiFields.add("created"); - openapiFields.add("targetAvatarId"); + openapiFields = new HashSet(Arrays.asList("avatarModerationType", "created", "targetAvatarId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("avatarModerationType"); - openapiRequiredFields.add("created"); - openapiRequiredFields.add("targetAvatarId"); + openapiRequiredFields = new HashSet(Arrays.asList("avatarModerationType", "created", "targetAvatarId")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AvatarModerationCreated - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AvatarModerationCreated.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AvatarModerationCreated is not found in the empty JSON string", AvatarModerationCreated.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AvatarModerationCreated + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AvatarModerationCreated.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AvatarModerationCreated is not found in the empty JSON string", AvatarModerationCreated.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AvatarModerationCreated.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AvatarModerationCreated` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AvatarModerationCreated` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AvatarModerationCreated.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `avatarModerationType` + AvatarModerationType.validateJsonElement(jsonObj.get("avatarModerationType")); if (!jsonObj.get("targetAvatarId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `targetAvatarId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetAvatarId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `targetAvatarId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetAvatarId").toString())); } } @@ -246,31 +231,31 @@ public void write(JsonWriter out, AvatarModerationCreated value) throws IOExcept @Override public AvatarModerationCreated read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AvatarModerationCreated given an JSON string - * - * @param jsonString JSON string - * @return An instance of AvatarModerationCreated - * @throws IOException if the JSON string is invalid with respect to AvatarModerationCreated - */ + /** + * Create an instance of AvatarModerationCreated given an JSON string + * + * @param jsonString JSON string + * @return An instance of AvatarModerationCreated + * @throws IOException if the JSON string is invalid with respect to AvatarModerationCreated + */ public static AvatarModerationCreated fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AvatarModerationCreated.class); } - /** - * Convert an instance of AvatarModerationCreated to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AvatarModerationCreated to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AvatarModerationType.java b/src/main/java/io/github/vrchatapi/model/AvatarModerationType.java index 9c4bc791..76762055 100644 --- a/src/main/java/io/github/vrchatapi/model/AvatarModerationType.java +++ b/src/main/java/io/github/vrchatapi/model/AvatarModerationType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -66,5 +66,10 @@ public AvatarModerationType read(final JsonReader jsonReader) throws IOException return AvatarModerationType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AvatarModerationType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/AvatarPerformance.java b/src/main/java/io/github/vrchatapi/model/AvatarPerformance.java index f45f7dfb..39cd1a11 100644 --- a/src/main/java/io/github/vrchatapi/model/AvatarPerformance.java +++ b/src/main/java/io/github/vrchatapi/model/AvatarPerformance.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,169 +47,151 @@ /** * AvatarPerformance */ -@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 AvatarPerformance { public static final String SERIALIZED_NAME_ANDROID = "android"; @SerializedName(SERIALIZED_NAME_ANDROID) + @javax.annotation.Nullable private String android; public static final String SERIALIZED_NAME_ANDROID_SORT = "android-sort"; @SerializedName(SERIALIZED_NAME_ANDROID_SORT) + @javax.annotation.Nullable private Integer androidSort; public static final String SERIALIZED_NAME_IOS = "ios"; @SerializedName(SERIALIZED_NAME_IOS) + @javax.annotation.Nullable private String ios; public static final String SERIALIZED_NAME_IOS_SORT = "ios-sort"; @SerializedName(SERIALIZED_NAME_IOS_SORT) + @javax.annotation.Nullable private Integer iosSort; public static final String SERIALIZED_NAME_STANDALONEWINDOWS = "standalonewindows"; @SerializedName(SERIALIZED_NAME_STANDALONEWINDOWS) + @javax.annotation.Nullable private String standalonewindows; public static final String SERIALIZED_NAME_STANDALONEWINDOWS_SORT = "standalonewindows-sort"; @SerializedName(SERIALIZED_NAME_STANDALONEWINDOWS_SORT) + @javax.annotation.Nullable private Integer standalonewindowsSort; public AvatarPerformance() { } - public AvatarPerformance android(String android) { - + public AvatarPerformance android(@javax.annotation.Nullable String android) { this.android = android; return this; } - /** + /** * Get android * @return android - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAndroid() { return android; } - - public void setAndroid(String android) { + public void setAndroid(@javax.annotation.Nullable String android) { this.android = android; } - public AvatarPerformance androidSort(Integer androidSort) { - + public AvatarPerformance androidSort(@javax.annotation.Nullable Integer androidSort) { this.androidSort = androidSort; return this; } - /** + /** * Get androidSort * @return androidSort - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getAndroidSort() { return androidSort; } - - public void setAndroidSort(Integer androidSort) { + public void setAndroidSort(@javax.annotation.Nullable Integer androidSort) { this.androidSort = androidSort; } - public AvatarPerformance ios(String ios) { - + public AvatarPerformance ios(@javax.annotation.Nullable String ios) { this.ios = ios; return this; } - /** + /** * Get ios * @return ios - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIos() { return ios; } - - public void setIos(String ios) { + public void setIos(@javax.annotation.Nullable String ios) { this.ios = ios; } - public AvatarPerformance iosSort(Integer iosSort) { - + public AvatarPerformance iosSort(@javax.annotation.Nullable Integer iosSort) { this.iosSort = iosSort; return this; } - /** + /** * Get iosSort * @return iosSort - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getIosSort() { return iosSort; } - - public void setIosSort(Integer iosSort) { + public void setIosSort(@javax.annotation.Nullable Integer iosSort) { this.iosSort = iosSort; } - public AvatarPerformance standalonewindows(String standalonewindows) { - + public AvatarPerformance standalonewindows(@javax.annotation.Nullable String standalonewindows) { this.standalonewindows = standalonewindows; return this; } - /** + /** * Get standalonewindows * @return standalonewindows - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getStandalonewindows() { return standalonewindows; } - - public void setStandalonewindows(String standalonewindows) { + public void setStandalonewindows(@javax.annotation.Nullable String standalonewindows) { this.standalonewindows = standalonewindows; } - public AvatarPerformance standalonewindowsSort(Integer standalonewindowsSort) { - + public AvatarPerformance standalonewindowsSort(@javax.annotation.Nullable Integer standalonewindowsSort) { this.standalonewindowsSort = standalonewindowsSort; return this; } - /** + /** * Get standalonewindowsSort * @return standalonewindowsSort - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getStandalonewindowsSort() { return standalonewindowsSort; } - - public void setStandalonewindowsSort(Integer standalonewindowsSort) { + public void setStandalonewindowsSort(@javax.annotation.Nullable Integer standalonewindowsSort) { this.standalonewindowsSort = standalonewindowsSort; } @@ -256,10 +238,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -268,46 +247,41 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("android"); - openapiFields.add("android-sort"); - openapiFields.add("ios"); - openapiFields.add("ios-sort"); - openapiFields.add("standalonewindows"); - openapiFields.add("standalonewindows-sort"); + openapiFields = new HashSet(Arrays.asList("android", "android-sort", "ios", "ios-sort", "standalonewindows", "standalonewindows-sort")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AvatarPerformance - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AvatarPerformance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AvatarPerformance is not found in the empty JSON string", AvatarPerformance.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AvatarPerformance + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AvatarPerformance.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AvatarPerformance is not found in the empty JSON string", AvatarPerformance.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AvatarPerformance.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AvatarPerformance` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AvatarPerformance` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("android") != null && !jsonObj.get("android").isJsonNull()) && !jsonObj.get("android").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `android` to be a primitive type in the JSON string but got `%s`", jsonObj.get("android").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `android` to be a primitive type in the JSON string but got `%s`", jsonObj.get("android").toString())); } if ((jsonObj.get("ios") != null && !jsonObj.get("ios").isJsonNull()) && !jsonObj.get("ios").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ios` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ios").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ios` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ios").toString())); } if ((jsonObj.get("standalonewindows") != null && !jsonObj.get("standalonewindows").isJsonNull()) && !jsonObj.get("standalonewindows").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `standalonewindows` to be a primitive type in the JSON string but got `%s`", jsonObj.get("standalonewindows").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `standalonewindows` to be a primitive type in the JSON string but got `%s`", jsonObj.get("standalonewindows").toString())); } } @@ -331,31 +305,31 @@ public void write(JsonWriter out, AvatarPerformance value) throws IOException { @Override public AvatarPerformance read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AvatarPerformance given an JSON string - * - * @param jsonString JSON string - * @return An instance of AvatarPerformance - * @throws IOException if the JSON string is invalid with respect to AvatarPerformance - */ + /** + * Create an instance of AvatarPerformance given an JSON string + * + * @param jsonString JSON string + * @return An instance of AvatarPerformance + * @throws IOException if the JSON string is invalid with respect to AvatarPerformance + */ public static AvatarPerformance fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AvatarPerformance.class); } - /** - * Convert an instance of AvatarPerformance to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AvatarPerformance to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AvatarPublishedListingsInner.java b/src/main/java/io/github/vrchatapi/model/AvatarPublishedListingsInner.java index cc58b9f4..2b33ee7d 100644 --- a/src/main/java/io/github/vrchatapi/model/AvatarPublishedListingsInner.java +++ b/src/main/java/io/github/vrchatapi/model/AvatarPublishedListingsInner.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,169 +47,151 @@ /** * AvatarPublishedListingsInner */ -@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 AvatarPublishedListingsInner { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable private String displayName; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nullable private String imageId; public static final String SERIALIZED_NAME_LISTING_ID = "listingId"; @SerializedName(SERIALIZED_NAME_LISTING_ID) + @javax.annotation.Nullable private String listingId; public static final String SERIALIZED_NAME_LISTING_TYPE = "listingType"; @SerializedName(SERIALIZED_NAME_LISTING_TYPE) + @javax.annotation.Nullable private String listingType; public static final String SERIALIZED_NAME_PRICE_TOKENS = "priceTokens"; @SerializedName(SERIALIZED_NAME_PRICE_TOKENS) + @javax.annotation.Nullable private Integer priceTokens; public AvatarPublishedListingsInner() { } - public AvatarPublishedListingsInner description(String description) { - + public AvatarPublishedListingsInner description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public AvatarPublishedListingsInner displayName(String displayName) { - + public AvatarPublishedListingsInner displayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; } - public AvatarPublishedListingsInner imageId(String imageId) { - + public AvatarPublishedListingsInner imageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; } - public AvatarPublishedListingsInner listingId(String listingId) { - + public AvatarPublishedListingsInner listingId(@javax.annotation.Nullable String listingId) { this.listingId = listingId; return this; } - /** + /** * Get listingId * @return listingId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getListingId() { return listingId; } - - public void setListingId(String listingId) { + public void setListingId(@javax.annotation.Nullable String listingId) { this.listingId = listingId; } - public AvatarPublishedListingsInner listingType(String listingType) { - + public AvatarPublishedListingsInner listingType(@javax.annotation.Nullable String listingType) { this.listingType = listingType; return this; } - /** + /** * Get listingType * @return listingType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getListingType() { return listingType; } - - public void setListingType(String listingType) { + public void setListingType(@javax.annotation.Nullable String listingType) { this.listingType = listingType; } - public AvatarPublishedListingsInner priceTokens(Integer priceTokens) { - + public AvatarPublishedListingsInner priceTokens(@javax.annotation.Nullable Integer priceTokens) { this.priceTokens = priceTokens; return this; } - /** + /** * Get priceTokens * @return priceTokens - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getPriceTokens() { return priceTokens; } - - public void setPriceTokens(Integer priceTokens) { + public void setPriceTokens(@javax.annotation.Nullable Integer priceTokens) { this.priceTokens = priceTokens; } @@ -256,10 +238,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -268,52 +247,47 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("displayName"); - openapiFields.add("imageId"); - openapiFields.add("listingId"); - openapiFields.add("listingType"); - openapiFields.add("priceTokens"); + openapiFields = new HashSet(Arrays.asList("description", "displayName", "imageId", "listingId", "listingType", "priceTokens")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AvatarPublishedListingsInner - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AvatarPublishedListingsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AvatarPublishedListingsInner is not found in the empty JSON string", AvatarPublishedListingsInner.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AvatarPublishedListingsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AvatarPublishedListingsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AvatarPublishedListingsInner is not found in the empty JSON string", AvatarPublishedListingsInner.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AvatarPublishedListingsInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AvatarPublishedListingsInner` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AvatarPublishedListingsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } if ((jsonObj.get("listingId") != null && !jsonObj.get("listingId").isJsonNull()) && !jsonObj.get("listingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingId").toString())); } if ((jsonObj.get("listingType") != null && !jsonObj.get("listingType").isJsonNull()) && !jsonObj.get("listingType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingType").toString())); } } @@ -337,31 +311,31 @@ public void write(JsonWriter out, AvatarPublishedListingsInner value) throws IOE @Override public AvatarPublishedListingsInner read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AvatarPublishedListingsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of AvatarPublishedListingsInner - * @throws IOException if the JSON string is invalid with respect to AvatarPublishedListingsInner - */ + /** + * Create an instance of AvatarPublishedListingsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of AvatarPublishedListingsInner + * @throws IOException if the JSON string is invalid with respect to AvatarPublishedListingsInner + */ public static AvatarPublishedListingsInner fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AvatarPublishedListingsInner.class); } - /** - * Convert an instance of AvatarPublishedListingsInner to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AvatarPublishedListingsInner to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AvatarStyle.java b/src/main/java/io/github/vrchatapi/model/AvatarStyle.java index 0e0a19a7..e6c75e7a 100644 --- a/src/main/java/io/github/vrchatapi/model/AvatarStyle.java +++ b/src/main/java/io/github/vrchatapi/model/AvatarStyle.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,55 @@ /** * */ -@ApiModel(description = "") -@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 AvatarStyle { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_STYLE_NAME = "styleName"; @SerializedName(SERIALIZED_NAME_STYLE_NAME) + @javax.annotation.Nonnull private String styleName; public AvatarStyle() { } - public AvatarStyle id(String id) { - + public AvatarStyle id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avst_f0659ed2-094d-48fb-9e40-de05564d96c7", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public AvatarStyle styleName(String styleName) { - + public AvatarStyle styleName(@javax.annotation.Nonnull String styleName) { this.styleName = styleName; return this; } - /** + /** * Get styleName * @return styleName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getStyleName() { return styleName; } - - public void setStyleName(String styleName) { + public void setStyleName(@javax.annotation.Nonnull String styleName) { this.styleName = styleName; } @@ -141,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,48 +143,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("styleName"); + openapiFields = new HashSet(Arrays.asList("id", "styleName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("styleName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AvatarStyle - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AvatarStyle.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AvatarStyle is not found in the empty JSON string", AvatarStyle.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("id", "styleName")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AvatarStyle + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AvatarStyle.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AvatarStyle is not found in the empty JSON string", AvatarStyle.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AvatarStyle.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AvatarStyle` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AvatarStyle` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AvatarStyle.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("styleName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `styleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("styleName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `styleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("styleName").toString())); } } @@ -218,31 +205,31 @@ public void write(JsonWriter out, AvatarStyle value) throws IOException { @Override public AvatarStyle read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AvatarStyle given an JSON string - * - * @param jsonString JSON string - * @return An instance of AvatarStyle - * @throws IOException if the JSON string is invalid with respect to AvatarStyle - */ + /** + * Create an instance of AvatarStyle given an JSON string + * + * @param jsonString JSON string + * @return An instance of AvatarStyle + * @throws IOException if the JSON string is invalid with respect to AvatarStyle + */ public static AvatarStyle fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AvatarStyle.class); } - /** - * Convert an instance of AvatarStyle to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AvatarStyle to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AvatarStyles.java b/src/main/java/io/github/vrchatapi/model/AvatarStyles.java index a96865da..f5d3c0ed 100644 --- a/src/main/java/io/github/vrchatapi/model/AvatarStyles.java +++ b/src/main/java/io/github/vrchatapi/model/AvatarStyles.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,71 +50,65 @@ /** * AvatarStyles */ -@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 AvatarStyles { public static final String SERIALIZED_NAME_PRIMARY = "primary"; @SerializedName(SERIALIZED_NAME_PRIMARY) + @javax.annotation.Nullable private String primary; public static final String SERIALIZED_NAME_SECONDARY = "secondary"; @SerializedName(SERIALIZED_NAME_SECONDARY) + @javax.annotation.Nullable private String secondary; public static final String SERIALIZED_NAME_SUPPLEMENTARY = "supplementary"; @SerializedName(SERIALIZED_NAME_SUPPLEMENTARY) - private List supplementary = null; + @javax.annotation.Nullable + private List supplementary = new ArrayList<>(); public AvatarStyles() { } - public AvatarStyles primary(String primary) { - + public AvatarStyles primary(@javax.annotation.Nullable String primary) { this.primary = primary; return this; } - /** + /** * Get primary * @return primary - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPrimary() { return primary; } - - public void setPrimary(String primary) { + public void setPrimary(@javax.annotation.Nullable String primary) { this.primary = primary; } - public AvatarStyles secondary(String secondary) { - + public AvatarStyles secondary(@javax.annotation.Nullable String secondary) { this.secondary = secondary; return this; } - /** + /** * Get secondary * @return secondary - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getSecondary() { return secondary; } - - public void setSecondary(String secondary) { + public void setSecondary(@javax.annotation.Nullable String secondary) { this.secondary = secondary; } - public AvatarStyles supplementary(List supplementary) { - + public AvatarStyles supplementary(@javax.annotation.Nullable List supplementary) { this.supplementary = supplementary; return this; } @@ -127,19 +121,16 @@ public AvatarStyles addSupplementaryItem(String supplementaryItem) { return this; } - /** + /** * Get supplementary * @return supplementary - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getSupplementary() { return supplementary; } - - public void setSupplementary(List supplementary) { + public void setSupplementary(@javax.annotation.Nullable List supplementary) { this.supplementary = supplementary; } @@ -191,10 +182,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -203,44 +191,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("primary"); - openapiFields.add("secondary"); - openapiFields.add("supplementary"); + openapiFields = new HashSet(Arrays.asList("primary", "secondary", "supplementary")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AvatarStyles - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AvatarStyles.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AvatarStyles is not found in the empty JSON string", AvatarStyles.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AvatarStyles + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AvatarStyles.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AvatarStyles is not found in the empty JSON string", AvatarStyles.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AvatarStyles.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AvatarStyles` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AvatarStyles` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("primary") != null && !jsonObj.get("primary").isJsonNull()) && !jsonObj.get("primary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `primary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primary").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `primary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primary").toString())); } if ((jsonObj.get("secondary") != null && !jsonObj.get("secondary").isJsonNull()) && !jsonObj.get("secondary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secondary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondary").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `secondary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondary").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("supplementary") != null && !jsonObj.get("supplementary").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `supplementary` to be an array in the JSON string but got `%s`", jsonObj.get("supplementary").toString())); + if (jsonObj.get("supplementary") != null && !jsonObj.get("supplementary").isJsonNull() && !jsonObj.get("supplementary").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `supplementary` to be an array in the JSON string but got `%s`", jsonObj.get("supplementary").toString())); } } @@ -264,31 +250,31 @@ public void write(JsonWriter out, AvatarStyles value) throws IOException { @Override public AvatarStyles read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AvatarStyles given an JSON string - * - * @param jsonString JSON string - * @return An instance of AvatarStyles - * @throws IOException if the JSON string is invalid with respect to AvatarStyles - */ + /** + * Create an instance of AvatarStyles given an JSON string + * + * @param jsonString JSON string + * @return An instance of AvatarStyles + * @throws IOException if the JSON string is invalid with respect to AvatarStyles + */ public static AvatarStyles fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AvatarStyles.class); } - /** - * Convert an instance of AvatarStyles to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AvatarStyles to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/AvatarUnityPackageUrlObject.java b/src/main/java/io/github/vrchatapi/model/AvatarUnityPackageUrlObject.java index 9f8bc097..0b59f14a 100644 --- a/src/main/java/io/github/vrchatapi/model/AvatarUnityPackageUrlObject.java +++ b/src/main/java/io/github/vrchatapi/model/AvatarUnityPackageUrlObject.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,35 +49,31 @@ * @deprecated */ @Deprecated -@ApiModel(description = "**Deprecation:** `Object` has unknown usage/fields, and is always empty. Use normal `Url` field instead.") -@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 AvatarUnityPackageUrlObject { public static final String SERIALIZED_NAME_UNITY_PACKAGE_URL = "unityPackageUrl"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGE_URL) + @javax.annotation.Nullable private String unityPackageUrl; public AvatarUnityPackageUrlObject() { } - public AvatarUnityPackageUrlObject unityPackageUrl(String unityPackageUrl) { - + public AvatarUnityPackageUrlObject unityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; return this; } - /** + /** * Get unityPackageUrl * @return unityPackageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUnityPackageUrl() { return unityPackageUrl; } - - public void setUnityPackageUrl(String unityPackageUrl) { + public void setUnityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; } @@ -114,10 +110,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -126,35 +119,35 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("unityPackageUrl"); + openapiFields = new HashSet(Arrays.asList("unityPackageUrl")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AvatarUnityPackageUrlObject - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AvatarUnityPackageUrlObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AvatarUnityPackageUrlObject is not found in the empty JSON string", AvatarUnityPackageUrlObject.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AvatarUnityPackageUrlObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AvatarUnityPackageUrlObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in AvatarUnityPackageUrlObject is not found in the empty JSON string", AvatarUnityPackageUrlObject.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AvatarUnityPackageUrlObject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AvatarUnityPackageUrlObject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `AvatarUnityPackageUrlObject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("unityPackageUrl") != null && !jsonObj.get("unityPackageUrl").isJsonNull()) && !jsonObj.get("unityPackageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); } } @@ -178,31 +171,31 @@ public void write(JsonWriter out, AvatarUnityPackageUrlObject value) throws IOEx @Override public AvatarUnityPackageUrlObject read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of AvatarUnityPackageUrlObject given an JSON string - * - * @param jsonString JSON string - * @return An instance of AvatarUnityPackageUrlObject - * @throws IOException if the JSON string is invalid with respect to AvatarUnityPackageUrlObject - */ + /** + * Create an instance of AvatarUnityPackageUrlObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of AvatarUnityPackageUrlObject + * @throws IOException if the JSON string is invalid with respect to AvatarUnityPackageUrlObject + */ public static AvatarUnityPackageUrlObject fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AvatarUnityPackageUrlObject.class); } - /** - * Convert an instance of AvatarUnityPackageUrlObject to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of AvatarUnityPackageUrlObject to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Badge.java b/src/main/java/io/github/vrchatapi/model/Badge.java index 5344a392..de9d9cd5 100644 --- a/src/main/java/io/github/vrchatapi/model/Badge.java +++ b/src/main/java/io/github/vrchatapi/model/Badge.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,223 +49,223 @@ /** * Badge */ -@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 Badge { public static final String SERIALIZED_NAME_ASSIGNED_AT = "assignedAt"; @SerializedName(SERIALIZED_NAME_ASSIGNED_AT) + @javax.annotation.Nullable private OffsetDateTime assignedAt; public static final String SERIALIZED_NAME_BADGE_DESCRIPTION = "badgeDescription"; @SerializedName(SERIALIZED_NAME_BADGE_DESCRIPTION) + @javax.annotation.Nonnull private String badgeDescription; public static final String SERIALIZED_NAME_BADGE_ID = "badgeId"; @SerializedName(SERIALIZED_NAME_BADGE_ID) + @javax.annotation.Nonnull private String badgeId; public static final String SERIALIZED_NAME_BADGE_IMAGE_URL = "badgeImageUrl"; @SerializedName(SERIALIZED_NAME_BADGE_IMAGE_URL) + @javax.annotation.Nonnull private String badgeImageUrl; public static final String SERIALIZED_NAME_BADGE_NAME = "badgeName"; @SerializedName(SERIALIZED_NAME_BADGE_NAME) + @javax.annotation.Nonnull private String badgeName; public static final String SERIALIZED_NAME_HIDDEN = "hidden"; @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable private Boolean hidden; + public static final String SERIALIZED_NAME_IS_QUANTIFIABLE = "isQuantifiable"; + @SerializedName(SERIALIZED_NAME_IS_QUANTIFIABLE) + @javax.annotation.Nullable + private Boolean isQuantifiable; + public static final String SERIALIZED_NAME_SHOWCASED = "showcased"; @SerializedName(SERIALIZED_NAME_SHOWCASED) + @javax.annotation.Nonnull private Boolean showcased; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public Badge() { } - public Badge assignedAt(OffsetDateTime assignedAt) { - + public Badge assignedAt(@javax.annotation.Nullable OffsetDateTime assignedAt) { this.assignedAt = assignedAt; return this; } - /** + /** * only present in CurrentUser badges * @return assignedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "only present in CurrentUser badges") - public OffsetDateTime getAssignedAt() { return assignedAt; } - - public void setAssignedAt(OffsetDateTime assignedAt) { + public void setAssignedAt(@javax.annotation.Nullable OffsetDateTime assignedAt) { this.assignedAt = assignedAt; } - public Badge badgeDescription(String badgeDescription) { - + public Badge badgeDescription(@javax.annotation.Nonnull String badgeDescription) { this.badgeDescription = badgeDescription; return this; } - /** + /** * Get badgeDescription * @return badgeDescription - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getBadgeDescription() { return badgeDescription; } - - public void setBadgeDescription(String badgeDescription) { + public void setBadgeDescription(@javax.annotation.Nonnull String badgeDescription) { this.badgeDescription = badgeDescription; } - public Badge badgeId(String badgeId) { - + public Badge badgeId(@javax.annotation.Nonnull String badgeId) { this.badgeId = badgeId; return this; } - /** + /** * Get badgeId * @return badgeId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "bdg_a60e514a-8cb7-4702-8f24-2786992be1a8", required = true, value = "") - public String getBadgeId() { return badgeId; } - - public void setBadgeId(String badgeId) { + public void setBadgeId(@javax.annotation.Nonnull String badgeId) { this.badgeId = badgeId; } - public Badge badgeImageUrl(String badgeImageUrl) { - + public Badge badgeImageUrl(@javax.annotation.Nonnull String badgeImageUrl) { this.badgeImageUrl = badgeImageUrl; return this; } - /** + /** * direct url to image * @return badgeImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "direct url to image") - public String getBadgeImageUrl() { return badgeImageUrl; } - - public void setBadgeImageUrl(String badgeImageUrl) { + public void setBadgeImageUrl(@javax.annotation.Nonnull String badgeImageUrl) { this.badgeImageUrl = badgeImageUrl; } - public Badge badgeName(String badgeName) { - + public Badge badgeName(@javax.annotation.Nonnull String badgeName) { this.badgeName = badgeName; return this; } - /** + /** * Get badgeName * @return badgeName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getBadgeName() { return badgeName; } - - public void setBadgeName(String badgeName) { + public void setBadgeName(@javax.annotation.Nonnull String badgeName) { this.badgeName = badgeName; } - public Badge hidden(Boolean hidden) { - + public Badge hidden(@javax.annotation.Nullable Boolean hidden) { this.hidden = hidden; return this; } - /** + /** * only present in CurrentUser badges * @return hidden - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "only present in CurrentUser badges") - public Boolean getHidden() { return hidden; } - - public void setHidden(Boolean hidden) { + public void setHidden(@javax.annotation.Nullable Boolean hidden) { this.hidden = hidden; } - public Badge showcased(Boolean showcased) { - + public Badge isQuantifiable(@javax.annotation.Nullable Boolean isQuantifiable) { + this.isQuantifiable = isQuantifiable; + return this; + } + + /** + * Get isQuantifiable + * @return isQuantifiable + */ + @javax.annotation.Nullable + public Boolean getIsQuantifiable() { + return isQuantifiable; + } + + public void setIsQuantifiable(@javax.annotation.Nullable Boolean isQuantifiable) { + this.isQuantifiable = isQuantifiable; + } + + + public Badge showcased(@javax.annotation.Nonnull Boolean showcased) { this.showcased = showcased; return this; } - /** + /** * Get showcased * @return showcased - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getShowcased() { return showcased; } - - public void setShowcased(Boolean showcased) { + public void setShowcased(@javax.annotation.Nonnull Boolean showcased) { this.showcased = showcased; } - public Badge updatedAt(OffsetDateTime updatedAt) { - + public Badge updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * only present in CurrentUser badges * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "only present in CurrentUser badges") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -286,6 +286,7 @@ public boolean equals(Object o) { Objects.equals(this.badgeImageUrl, badge.badgeImageUrl) && Objects.equals(this.badgeName, badge.badgeName) && Objects.equals(this.hidden, badge.hidden) && + Objects.equals(this.isQuantifiable, badge.isQuantifiable) && Objects.equals(this.showcased, badge.showcased) && Objects.equals(this.updatedAt, badge.updatedAt); } @@ -296,7 +297,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(assignedAt, badgeDescription, badgeId, badgeImageUrl, badgeName, hidden, showcased, updatedAt); + return Objects.hash(assignedAt, badgeDescription, badgeId, badgeImageUrl, badgeName, hidden, isQuantifiable, showcased, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -316,6 +317,7 @@ public String toString() { sb.append(" badgeImageUrl: ").append(toIndentedString(badgeImageUrl)).append("\n"); sb.append(" badgeName: ").append(toIndentedString(badgeName)).append("\n"); sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" isQuantifiable: ").append(toIndentedString(isQuantifiable)).append("\n"); sb.append(" showcased: ").append(toIndentedString(showcased)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); @@ -327,10 +329,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -339,63 +338,51 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assignedAt"); - openapiFields.add("badgeDescription"); - openapiFields.add("badgeId"); - openapiFields.add("badgeImageUrl"); - openapiFields.add("badgeName"); - openapiFields.add("hidden"); - openapiFields.add("showcased"); - openapiFields.add("updatedAt"); + openapiFields = new HashSet(Arrays.asList("assignedAt", "badgeDescription", "badgeId", "badgeImageUrl", "badgeName", "hidden", "isQuantifiable", "showcased", "updatedAt")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("badgeDescription"); - openapiRequiredFields.add("badgeId"); - openapiRequiredFields.add("badgeImageUrl"); - openapiRequiredFields.add("badgeName"); - openapiRequiredFields.add("showcased"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Badge - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Badge.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Badge is not found in the empty JSON string", Badge.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("badgeDescription", "badgeId", "badgeImageUrl", "badgeName", "showcased")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Badge + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Badge.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Badge is not found in the empty JSON string", Badge.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Badge.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Badge` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Badge` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Badge.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("badgeDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `badgeDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("badgeDescription").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badgeDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("badgeDescription").toString())); } if (!jsonObj.get("badgeId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `badgeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("badgeId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badgeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("badgeId").toString())); } if (!jsonObj.get("badgeImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `badgeImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("badgeImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badgeImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("badgeImageUrl").toString())); } if (!jsonObj.get("badgeName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `badgeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("badgeName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badgeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("badgeName").toString())); } } @@ -419,31 +406,31 @@ public void write(JsonWriter out, Badge value) throws IOException { @Override public Badge read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Badge given an JSON string - * - * @param jsonString JSON string - * @return An instance of Badge - * @throws IOException if the JSON string is invalid with respect to Badge - */ + /** + * Create an instance of Badge given an JSON string + * + * @param jsonString JSON string + * @return An instance of Badge + * @throws IOException if the JSON string is invalid with respect to Badge + */ public static Badge fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Badge.class); } - /** - * Convert an instance of Badge to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Badge to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Balance.java b/src/main/java/io/github/vrchatapi/model/Balance.java index e9f67f43..87411590 100644 --- a/src/main/java/io/github/vrchatapi/model/Balance.java +++ b/src/main/java/io/github/vrchatapi/model/Balance.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,89 +47,79 @@ /** * */ -@ApiModel(description = "") -@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 Balance { public static final String SERIALIZED_NAME_BALANCE = "balance"; @SerializedName(SERIALIZED_NAME_BALANCE) + @javax.annotation.Nonnull private Integer balance = 0; public static final String SERIALIZED_NAME_NO_TRANSACTIONS = "noTransactions"; @SerializedName(SERIALIZED_NAME_NO_TRANSACTIONS) + @javax.annotation.Nullable private Boolean noTransactions; public static final String SERIALIZED_NAME_TILIA_RESPONSE = "tiliaResponse"; @SerializedName(SERIALIZED_NAME_TILIA_RESPONSE) + @javax.annotation.Nullable private Boolean tiliaResponse; public Balance() { } - public Balance balance(Integer balance) { - + public Balance balance(@javax.annotation.Nonnull Integer balance) { this.balance = balance; return this; } - /** + /** * Get balance * @return balance - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getBalance() { return balance; } - - public void setBalance(Integer balance) { + public void setBalance(@javax.annotation.Nonnull Integer balance) { this.balance = balance; } - public Balance noTransactions(Boolean noTransactions) { - + public Balance noTransactions(@javax.annotation.Nullable Boolean noTransactions) { this.noTransactions = noTransactions; return this; } - /** + /** * Get noTransactions * @return noTransactions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getNoTransactions() { return noTransactions; } - - public void setNoTransactions(Boolean noTransactions) { + public void setNoTransactions(@javax.annotation.Nullable Boolean noTransactions) { this.noTransactions = noTransactions; } - public Balance tiliaResponse(Boolean tiliaResponse) { - + public Balance tiliaResponse(@javax.annotation.Nullable Boolean tiliaResponse) { this.tiliaResponse = tiliaResponse; return this; } - /** + /** * Get tiliaResponse * @return tiliaResponse - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getTiliaResponse() { return tiliaResponse; } - - public void setTiliaResponse(Boolean tiliaResponse) { + public void setTiliaResponse(@javax.annotation.Nullable Boolean tiliaResponse) { this.tiliaResponse = tiliaResponse; } @@ -170,10 +160,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -182,43 +169,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("balance"); - openapiFields.add("noTransactions"); - openapiFields.add("tiliaResponse"); + openapiFields = new HashSet(Arrays.asList("balance", "noTransactions", "tiliaResponse")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("balance"); + openapiRequiredFields = new HashSet(Arrays.asList("balance")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Balance - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Balance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Balance is not found in the empty JSON string", Balance.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Balance + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Balance.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Balance is not found in the empty JSON string", Balance.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Balance.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Balance` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Balance` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Balance.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -241,31 +225,31 @@ public void write(JsonWriter out, Balance value) throws IOException { @Override public Balance read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Balance given an JSON string - * - * @param jsonString JSON string - * @return An instance of Balance - * @throws IOException if the JSON string is invalid with respect to Balance - */ + /** + * Create an instance of Balance given an JSON string + * + * @param jsonString JSON string + * @return An instance of Balance + * @throws IOException if the JSON string is invalid with respect to Balance + */ public static Balance fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Balance.class); } - /** - * Convert an instance of Balance to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Balance to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/BanGroupMemberRequest.java b/src/main/java/io/github/vrchatapi/model/BanGroupMemberRequest.java index 2048edea..1fbbe6bf 100644 --- a/src/main/java/io/github/vrchatapi/model/BanGroupMemberRequest.java +++ b/src/main/java/io/github/vrchatapi/model/BanGroupMemberRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * BanGroupMemberRequest */ -@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 BanGroupMemberRequest { public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nonnull private String userId; public BanGroupMemberRequest() { } - public BanGroupMemberRequest userId(String userId) { - + public BanGroupMemberRequest userId(@javax.annotation.Nonnull String userId) { this.userId = userId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return userId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getUserId() { return userId; } - - public void setUserId(String userId) { + public void setUserId(@javax.annotation.Nonnull String userId) { this.userId = userId; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,43 +117,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("userId"); + openapiFields = new HashSet(Arrays.asList("userId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("userId"); + openapiRequiredFields = new HashSet(Arrays.asList("userId")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BanGroupMemberRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BanGroupMemberRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BanGroupMemberRequest is not found in the empty JSON string", BanGroupMemberRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BanGroupMemberRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BanGroupMemberRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in BanGroupMemberRequest is not found in the empty JSON string", BanGroupMemberRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!BanGroupMemberRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BanGroupMemberRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `BanGroupMemberRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : BanGroupMemberRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("userId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); } } @@ -183,31 +176,31 @@ public void write(JsonWriter out, BanGroupMemberRequest value) throws IOExceptio @Override public BanGroupMemberRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of BanGroupMemberRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of BanGroupMemberRequest - * @throws IOException if the JSON string is invalid with respect to BanGroupMemberRequest - */ + /** + * Create an instance of BanGroupMemberRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of BanGroupMemberRequest + * @throws IOException if the JSON string is invalid with respect to BanGroupMemberRequest + */ public static BanGroupMemberRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, BanGroupMemberRequest.class); } - /** - * Convert an instance of BanGroupMemberRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of BanGroupMemberRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/BoopRequest.java b/src/main/java/io/github/vrchatapi/model/BoopRequest.java index 247f038e..6f6e19b9 100644 --- a/src/main/java/io/github/vrchatapi/model/BoopRequest.java +++ b/src/main/java/io/github/vrchatapi/model/BoopRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,89 +47,79 @@ /** * See NotificationDetailBoop; either inventoryItemId (accessed through .id) by itself, or emojiId (accessed through .metadata.fileId or built-in emoji name) with optional emojiVersion */ -@ApiModel(description = "See NotificationDetailBoop; either inventoryItemId (accessed through .id) by itself, or emojiId (accessed through .metadata.fileId or built-in emoji name) with optional emojiVersion") -@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 BoopRequest { public static final String SERIALIZED_NAME_EMOJI_ID = "emojiId"; @SerializedName(SERIALIZED_NAME_EMOJI_ID) + @javax.annotation.Nullable private String emojiId; public static final String SERIALIZED_NAME_EMOJI_VERSION = "emojiVersion"; @SerializedName(SERIALIZED_NAME_EMOJI_VERSION) + @javax.annotation.Nullable private Integer emojiVersion; public static final String SERIALIZED_NAME_INVENTORY_ITEM_ID = "inventoryItemId"; @SerializedName(SERIALIZED_NAME_INVENTORY_ITEM_ID) + @javax.annotation.Nullable private String inventoryItemId; public BoopRequest() { } - public BoopRequest emojiId(String emojiId) { - + public BoopRequest emojiId(@javax.annotation.Nullable String emojiId) { this.emojiId = emojiId; return this; } - /** + /** * Either a FileID or a string constant for default emojis * @return emojiId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Angry: value: default_angry Arrow Point: value: default_arrowpoint Bats: value: default_bats Beachball: value: default_beachball Beer: value: default_beer Blushing: value: default_blushing Boo: value: default_boo Broken Heart: value: default_broken_heart Candy: value: default_candy Candy Cane: value: default_candy_cane Candy Corn: value: default_candy_corn CantSee: value: default_cantsee Champagne: value: default_champagne Cloud: value: default_cloud Coal: value: default_coal Confetti: value: default_confetti Crying: value: default_crying Drink: value: default_drink Exclamation: value: default_exclamation Fire: value: default_fire Frown: value: default_frown Gift: value: default_gift Gifts: value: default_gifts Gingerbread: value: default_gingerbread Go: value: default_go Hand Wave: value: default_hand_wave Hang Ten: value: default_hang_ten Heart: value: default_heart Hourglass: value: default_hourglass Ice Cream: value: default_ice_cream In Love: value: default_in_love Jack O Lantern: value: default_jack_o_lantern Keyboard: value: default_keyboard Kiss: value: default_kiss Laugh: value: default_laugh Life Ring: value: default_life_ring Mistletoe: value: default_mistletoe Money: value: default_money Music Note: value: default_music_note Neon Shades: value: default_neon_shades NoHeadphones: value: default_noheadphones NoMic: value: default_nomic Pineapple: value: default_pineapple Pizza: value: default_pizza Portal: value: default_portal Question: value: default_question Shush: value: default_shush Skull: value: default_skull Smile: value: default_smile Snow Fall: value: default_snow_fall Snowball: value: default_snowball Splash: value: default_splash Spooky Ghost: value: default_spooky_ghost Stoic: value: default_stoic Stop: value: default_stop Sun Lotion: value: default_sun_lotion Sunglasses: value: default_sunglasses Thinking: value: default_thinking Thumbs Down: value: default_thumbs_down Thumbs Up: value: default_thumbs_up Tomato: value: default_tomato Tongue Out: value: default_tongue_out Web: value: default_web Wow: value: default_wow Zzz: value: default_zzz ", value = "Either a FileID or a string constant for default emojis") - public String getEmojiId() { return emojiId; } - - public void setEmojiId(String emojiId) { + public void setEmojiId(@javax.annotation.Nullable String emojiId) { this.emojiId = emojiId; } - public BoopRequest emojiVersion(Integer emojiVersion) { - + public BoopRequest emojiVersion(@javax.annotation.Nullable Integer emojiVersion) { this.emojiVersion = emojiVersion; return this; } - /** + /** * Get emojiVersion * @return emojiVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getEmojiVersion() { return emojiVersion; } - - public void setEmojiVersion(Integer emojiVersion) { + public void setEmojiVersion(@javax.annotation.Nullable Integer emojiVersion) { this.emojiVersion = emojiVersion; } - public BoopRequest inventoryItemId(String inventoryItemId) { - + public BoopRequest inventoryItemId(@javax.annotation.Nullable String inventoryItemId) { this.inventoryItemId = inventoryItemId; return this; } - /** + /** * Get inventoryItemId * @return inventoryItemId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "inv_10bce5b0-2d2b-44e0-900d-db6534615162", value = "") - public String getInventoryItemId() { return inventoryItemId; } - - public void setInventoryItemId(String inventoryItemId) { + public void setInventoryItemId(@javax.annotation.Nullable String inventoryItemId) { this.inventoryItemId = inventoryItemId; } @@ -170,10 +160,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -182,40 +169,38 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("emojiId"); - openapiFields.add("emojiVersion"); - openapiFields.add("inventoryItemId"); + openapiFields = new HashSet(Arrays.asList("emojiId", "emojiVersion", "inventoryItemId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BoopRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BoopRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BoopRequest is not found in the empty JSON string", BoopRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BoopRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BoopRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in BoopRequest is not found in the empty JSON string", BoopRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!BoopRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BoopRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `BoopRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("emojiId") != null && !jsonObj.get("emojiId").isJsonNull()) && !jsonObj.get("emojiId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `emojiId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("emojiId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `emojiId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("emojiId").toString())); } if ((jsonObj.get("inventoryItemId") != null && !jsonObj.get("inventoryItemId").isJsonNull()) && !jsonObj.get("inventoryItemId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `inventoryItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inventoryItemId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `inventoryItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inventoryItemId").toString())); } } @@ -239,31 +224,31 @@ public void write(JsonWriter out, BoopRequest value) throws IOException { @Override public BoopRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of BoopRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of BoopRequest - * @throws IOException if the JSON string is invalid with respect to BoopRequest - */ + /** + * Create an instance of BoopRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of BoopRequest + * @throws IOException if the JSON string is invalid with respect to BoopRequest + */ public static BoopRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, BoopRequest.class); } - /** - * Convert an instance of BoopRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of BoopRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarDayOfWeek.java b/src/main/java/io/github/vrchatapi/model/CalendarDayOfWeek.java index f829660b..7f565537 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarDayOfWeek.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarDayOfWeek.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -79,5 +78,10 @@ public CalendarDayOfWeek read(final JsonReader jsonReader) throws IOException { return CalendarDayOfWeek.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarDayOfWeek.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEvent.java b/src/main/java/io/github/vrchatapi/model/CalendarEvent.java index 63a04660..e8412fdc 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEvent.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEvent.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,11 +24,10 @@ import io.github.vrchatapi.model.CalendarEventPlatform; import io.github.vrchatapi.model.CalendarEventRecurrence; import io.github.vrchatapi.model.CalendarEventUserInterest; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -43,13 +41,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -57,502 +57,466 @@ /** * An event scheduled on a group's calendar */ -@ApiModel(description = "An event scheduled on a group's calendar") -@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 CalendarEvent { public static final String SERIALIZED_NAME_ACCESS_TYPE = "accessType"; @SerializedName(SERIALIZED_NAME_ACCESS_TYPE) + @javax.annotation.Nonnull private CalendarEventAccess accessType = CalendarEventAccess.PUBLIC; public static final String SERIALIZED_NAME_CATEGORY = "category"; @SerializedName(SERIALIZED_NAME_CATEGORY) + @javax.annotation.Nonnull private CalendarEventCategory category = CalendarEventCategory.OTHER; public static final String SERIALIZED_NAME_CLOSE_INSTANCE_AFTER_END_MINUTES = "closeInstanceAfterEndMinutes"; @SerializedName(SERIALIZED_NAME_CLOSE_INSTANCE_AFTER_END_MINUTES) + @javax.annotation.Nullable private Integer closeInstanceAfterEndMinutes; public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DELETED_AT = "deletedAt"; @SerializedName(SERIALIZED_NAME_DELETED_AT) + @javax.annotation.Nullable private OffsetDateTime deletedAt; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_DURATION_IN_MS = "durationInMs"; @SerializedName(SERIALIZED_NAME_DURATION_IN_MS) + @javax.annotation.Nullable private Long durationInMs; public static final String SERIALIZED_NAME_ENDS_AT = "endsAt"; @SerializedName(SERIALIZED_NAME_ENDS_AT) + @javax.annotation.Nonnull private OffsetDateTime endsAt; public static final String SERIALIZED_NAME_FEATURED = "featured"; @SerializedName(SERIALIZED_NAME_FEATURED) + @javax.annotation.Nullable private Boolean featured; public static final String SERIALIZED_NAME_GUEST_EARLY_JOIN_MINUTES = "guestEarlyJoinMinutes"; @SerializedName(SERIALIZED_NAME_GUEST_EARLY_JOIN_MINUTES) + @javax.annotation.Nullable private Integer guestEarlyJoinMinutes; public static final String SERIALIZED_NAME_HOST_EARLY_JOIN_MINUTES = "hostEarlyJoinMinutes"; @SerializedName(SERIALIZED_NAME_HOST_EARLY_JOIN_MINUTES) + @javax.annotation.Nullable private Integer hostEarlyJoinMinutes; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nullable private String imageId; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_INTERESTED_USER_COUNT = "interestedUserCount"; @SerializedName(SERIALIZED_NAME_INTERESTED_USER_COUNT) + @javax.annotation.Nullable private Integer interestedUserCount; public static final String SERIALIZED_NAME_IS_DRAFT = "isDraft"; @SerializedName(SERIALIZED_NAME_IS_DRAFT) + @javax.annotation.Nullable private Boolean isDraft; public static final String SERIALIZED_NAME_LANGUAGES = "languages"; @SerializedName(SERIALIZED_NAME_LANGUAGES) - private List languages = null; + @javax.annotation.Nullable + private List languages = new ArrayList<>(); public static final String SERIALIZED_NAME_OCCURRENCE_KIND = "occurrenceKind"; @SerializedName(SERIALIZED_NAME_OCCURRENCE_KIND) + @javax.annotation.Nullable private CalendarEventOccurrenceKind occurrenceKind = CalendarEventOccurrenceKind.SINGLE; public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable private String ownerId; public static final String SERIALIZED_NAME_PLATFORMS = "platforms"; @SerializedName(SERIALIZED_NAME_PLATFORMS) - private List platforms = null; + @javax.annotation.Nullable + private List platforms = new ArrayList<>(); public static final String SERIALIZED_NAME_RECURRENCE = "recurrence"; @SerializedName(SERIALIZED_NAME_RECURRENCE) + @javax.annotation.Nullable private CalendarEventRecurrence recurrence; public static final String SERIALIZED_NAME_ROLE_IDS = "roleIds"; @SerializedName(SERIALIZED_NAME_ROLE_IDS) - private List roleIds = null; + @javax.annotation.Nullable + private List roleIds; public static final String SERIALIZED_NAME_SERIES_ID = "seriesId"; @SerializedName(SERIALIZED_NAME_SERIES_ID) + @javax.annotation.Nullable private String seriesId; public static final String SERIALIZED_NAME_STARTS_AT = "startsAt"; @SerializedName(SERIALIZED_NAME_STARTS_AT) + @javax.annotation.Nonnull private OffsetDateTime startsAt; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nonnull private String title; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable private String type; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_USER_INTEREST = "userInterest"; @SerializedName(SERIALIZED_NAME_USER_INTEREST) + @javax.annotation.Nullable private CalendarEventUserInterest userInterest; public static final String SERIALIZED_NAME_USES_INSTANCE_OVERFLOW = "usesInstanceOverflow"; @SerializedName(SERIALIZED_NAME_USES_INSTANCE_OVERFLOW) + @javax.annotation.Nullable private Boolean usesInstanceOverflow; public CalendarEvent() { } - public CalendarEvent accessType(CalendarEventAccess accessType) { - + public CalendarEvent accessType(@javax.annotation.Nonnull CalendarEventAccess accessType) { this.accessType = accessType; return this; } - /** + /** * Get accessType * @return accessType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public CalendarEventAccess getAccessType() { return accessType; } - - public void setAccessType(CalendarEventAccess accessType) { + public void setAccessType(@javax.annotation.Nonnull CalendarEventAccess accessType) { this.accessType = accessType; } - public CalendarEvent category(CalendarEventCategory category) { - + public CalendarEvent category(@javax.annotation.Nonnull CalendarEventCategory category) { this.category = category; return this; } - /** + /** * Get category * @return category - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public CalendarEventCategory getCategory() { return category; } - - public void setCategory(CalendarEventCategory category) { + public void setCategory(@javax.annotation.Nonnull CalendarEventCategory category) { this.category = category; } - public CalendarEvent closeInstanceAfterEndMinutes(Integer closeInstanceAfterEndMinutes) { - + public CalendarEvent closeInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; return this; } - /** + /** * Get closeInstanceAfterEndMinutes * @return closeInstanceAfterEndMinutes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getCloseInstanceAfterEndMinutes() { return closeInstanceAfterEndMinutes; } - - public void setCloseInstanceAfterEndMinutes(Integer closeInstanceAfterEndMinutes) { + public void setCloseInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; } - public CalendarEvent createdAt(OffsetDateTime createdAt) { - + public CalendarEvent createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public CalendarEvent deletedAt(OffsetDateTime deletedAt) { - + public CalendarEvent deletedAt(@javax.annotation.Nullable OffsetDateTime deletedAt) { this.deletedAt = deletedAt; return this; } - /** + /** * Get deletedAt * @return deletedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getDeletedAt() { return deletedAt; } - - public void setDeletedAt(OffsetDateTime deletedAt) { + public void setDeletedAt(@javax.annotation.Nullable OffsetDateTime deletedAt) { this.deletedAt = deletedAt; } - public CalendarEvent description(String description) { - + public CalendarEvent description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public CalendarEvent durationInMs(Long durationInMs) { - + public CalendarEvent durationInMs(@javax.annotation.Nullable Long durationInMs) { this.durationInMs = durationInMs; return this; } - /** + /** * Get durationInMs * @return durationInMs - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Long getDurationInMs() { return durationInMs; } - - public void setDurationInMs(Long durationInMs) { + public void setDurationInMs(@javax.annotation.Nullable Long durationInMs) { this.durationInMs = durationInMs; } - public CalendarEvent endsAt(OffsetDateTime endsAt) { - + public CalendarEvent endsAt(@javax.annotation.Nonnull OffsetDateTime endsAt) { this.endsAt = endsAt; return this; } - /** + /** * Get endsAt * @return endsAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getEndsAt() { return endsAt; } - - public void setEndsAt(OffsetDateTime endsAt) { + public void setEndsAt(@javax.annotation.Nonnull OffsetDateTime endsAt) { this.endsAt = endsAt; } - public CalendarEvent featured(Boolean featured) { - + public CalendarEvent featured(@javax.annotation.Nullable Boolean featured) { this.featured = featured; return this; } - /** + /** * Get featured * @return featured - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getFeatured() { return featured; } - - public void setFeatured(Boolean featured) { + public void setFeatured(@javax.annotation.Nullable Boolean featured) { this.featured = featured; } - public CalendarEvent guestEarlyJoinMinutes(Integer guestEarlyJoinMinutes) { - + public CalendarEvent guestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; return this; } - /** + /** * Get guestEarlyJoinMinutes * @return guestEarlyJoinMinutes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getGuestEarlyJoinMinutes() { return guestEarlyJoinMinutes; } - - public void setGuestEarlyJoinMinutes(Integer guestEarlyJoinMinutes) { + public void setGuestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; } - public CalendarEvent hostEarlyJoinMinutes(Integer hostEarlyJoinMinutes) { - + public CalendarEvent hostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; return this; } - /** + /** * Get hostEarlyJoinMinutes * @return hostEarlyJoinMinutes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getHostEarlyJoinMinutes() { return hostEarlyJoinMinutes; } - - public void setHostEarlyJoinMinutes(Integer hostEarlyJoinMinutes) { + public void setHostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; } - public CalendarEvent id(String id) { - + public CalendarEvent id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "cal_6b182f0c-61ef-4bdf-97fe-94f63bcba27b", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public CalendarEvent imageId(String imageId) { - + public CalendarEvent imageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; } - public CalendarEvent imageUrl(String imageUrl) { - + public CalendarEvent imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public CalendarEvent interestedUserCount(Integer interestedUserCount) { - + public CalendarEvent interestedUserCount(@javax.annotation.Nullable Integer interestedUserCount) { this.interestedUserCount = interestedUserCount; return this; } - /** + /** * Get interestedUserCount * @return interestedUserCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getInterestedUserCount() { return interestedUserCount; } - - public void setInterestedUserCount(Integer interestedUserCount) { + public void setInterestedUserCount(@javax.annotation.Nullable Integer interestedUserCount) { this.interestedUserCount = interestedUserCount; } - public CalendarEvent isDraft(Boolean isDraft) { - + public CalendarEvent isDraft(@javax.annotation.Nullable Boolean isDraft) { this.isDraft = isDraft; return this; } - /** + /** * Get isDraft * @return isDraft - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsDraft() { return isDraft; } - - public void setIsDraft(Boolean isDraft) { + public void setIsDraft(@javax.annotation.Nullable Boolean isDraft) { this.isDraft = isDraft; } - public CalendarEvent languages(List languages) { - + public CalendarEvent languages(@javax.annotation.Nullable List languages) { this.languages = languages; return this; } @@ -565,71 +529,59 @@ public CalendarEvent addLanguagesItem(String languagesItem) { return this; } - /** + /** * Languages that might be spoken at this event * @return languages - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Languages that might be spoken at this event") - public List getLanguages() { return languages; } - - public void setLanguages(List languages) { + public void setLanguages(@javax.annotation.Nullable List languages) { this.languages = languages; } - public CalendarEvent occurrenceKind(CalendarEventOccurrenceKind occurrenceKind) { - + public CalendarEvent occurrenceKind(@javax.annotation.Nullable CalendarEventOccurrenceKind occurrenceKind) { this.occurrenceKind = occurrenceKind; return this; } - /** + /** * Get occurrenceKind * @return occurrenceKind - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public CalendarEventOccurrenceKind getOccurrenceKind() { return occurrenceKind; } - - public void setOccurrenceKind(CalendarEventOccurrenceKind occurrenceKind) { + public void setOccurrenceKind(@javax.annotation.Nullable CalendarEventOccurrenceKind occurrenceKind) { this.occurrenceKind = occurrenceKind; } - public CalendarEvent ownerId(String ownerId) { - + public CalendarEvent ownerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; return this; } - /** + /** * Get ownerId * @return ownerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getOwnerId() { return ownerId; } - - public void setOwnerId(String ownerId) { + public void setOwnerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; } - public CalendarEvent platforms(List platforms) { - + public CalendarEvent platforms(@javax.annotation.Nullable List platforms) { this.platforms = platforms; return this; } @@ -642,48 +594,40 @@ public CalendarEvent addPlatformsItem(CalendarEventPlatform platformsItem) { return this; } - /** + /** * Get platforms * @return platforms - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getPlatforms() { return platforms; } - - public void setPlatforms(List platforms) { + public void setPlatforms(@javax.annotation.Nullable List platforms) { this.platforms = platforms; } - public CalendarEvent recurrence(CalendarEventRecurrence recurrence) { - + public CalendarEvent recurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { this.recurrence = recurrence; return this; } - /** + /** * Get recurrence * @return recurrence - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public CalendarEventRecurrence getRecurrence() { return recurrence; } - - public void setRecurrence(CalendarEventRecurrence recurrence) { + public void setRecurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { this.recurrence = recurrence; } - public CalendarEvent roleIds(List roleIds) { - + public CalendarEvent roleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; return this; } @@ -696,71 +640,59 @@ public CalendarEvent addRoleIdsItem(String roleIdsItem) { return this; } - /** + /** * Group roles that may join this event * @return roleIds - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Group roles that may join this event") - public List getRoleIds() { return roleIds; } - - public void setRoleIds(List roleIds) { + public void setRoleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; } - public CalendarEvent seriesId(String seriesId) { - + public CalendarEvent seriesId(@javax.annotation.Nullable String seriesId) { this.seriesId = seriesId; return this; } - /** + /** * So far unused, always \"null\" * @return seriesId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "So far unused, always \"null\"") - public String getSeriesId() { return seriesId; } - - public void setSeriesId(String seriesId) { + public void setSeriesId(@javax.annotation.Nullable String seriesId) { this.seriesId = seriesId; } - public CalendarEvent startsAt(OffsetDateTime startsAt) { - + public CalendarEvent startsAt(@javax.annotation.Nonnull OffsetDateTime startsAt) { this.startsAt = startsAt; return this; } - /** + /** * Get startsAt * @return startsAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getStartsAt() { return startsAt; } - - public void setStartsAt(OffsetDateTime startsAt) { + public void setStartsAt(@javax.annotation.Nonnull OffsetDateTime startsAt) { this.startsAt = startsAt; } - public CalendarEvent tags(List tags) { - + public CalendarEvent tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -773,134 +705,111 @@ public CalendarEvent addTagsItem(String tagsItem) { return this; } - /** + /** * Custom tags for this event * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Custom tags for this event") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public CalendarEvent title(String title) { - + public CalendarEvent title(@javax.annotation.Nonnull String title) { this.title = title; return this; } - /** + /** * Get title * @return title - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getTitle() { return title; } - - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nonnull String title) { this.title = title; } - public CalendarEvent type(String type) { - + public CalendarEvent type(@javax.annotation.Nullable String type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "event", value = "") - public String getType() { return type; } - - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public CalendarEvent updatedAt(OffsetDateTime updatedAt) { - + public CalendarEvent updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public CalendarEvent userInterest(CalendarEventUserInterest userInterest) { - + public CalendarEvent userInterest(@javax.annotation.Nullable CalendarEventUserInterest userInterest) { this.userInterest = userInterest; return this; } - /** + /** * Get userInterest * @return userInterest - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public CalendarEventUserInterest getUserInterest() { return userInterest; } - - public void setUserInterest(CalendarEventUserInterest userInterest) { + public void setUserInterest(@javax.annotation.Nullable CalendarEventUserInterest userInterest) { this.userInterest = userInterest; } - public CalendarEvent usesInstanceOverflow(Boolean usesInstanceOverflow) { - + public CalendarEvent usesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { this.usesInstanceOverflow = usesInstanceOverflow; return this; } - /** + /** * Get usesInstanceOverflow * @return usesInstanceOverflow - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getUsesInstanceOverflow() { return usesInstanceOverflow; } - - public void setUsesInstanceOverflow(Boolean usesInstanceOverflow) { + public void setUsesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { this.usesInstanceOverflow = usesInstanceOverflow; } @@ -1006,10 +915,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -1018,123 +924,95 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accessType"); - openapiFields.add("category"); - openapiFields.add("closeInstanceAfterEndMinutes"); - openapiFields.add("createdAt"); - openapiFields.add("deletedAt"); - openapiFields.add("description"); - openapiFields.add("durationInMs"); - openapiFields.add("endsAt"); - openapiFields.add("featured"); - openapiFields.add("guestEarlyJoinMinutes"); - openapiFields.add("hostEarlyJoinMinutes"); - openapiFields.add("id"); - openapiFields.add("imageId"); - openapiFields.add("imageUrl"); - openapiFields.add("interestedUserCount"); - openapiFields.add("isDraft"); - openapiFields.add("languages"); - openapiFields.add("occurrenceKind"); - openapiFields.add("ownerId"); - openapiFields.add("platforms"); - openapiFields.add("recurrence"); - openapiFields.add("roleIds"); - openapiFields.add("seriesId"); - openapiFields.add("startsAt"); - openapiFields.add("tags"); - openapiFields.add("title"); - openapiFields.add("type"); - openapiFields.add("updatedAt"); - openapiFields.add("userInterest"); - openapiFields.add("usesInstanceOverflow"); + openapiFields = new HashSet(Arrays.asList("accessType", "category", "closeInstanceAfterEndMinutes", "createdAt", "deletedAt", "description", "durationInMs", "endsAt", "featured", "guestEarlyJoinMinutes", "hostEarlyJoinMinutes", "id", "imageId", "imageUrl", "interestedUserCount", "isDraft", "languages", "occurrenceKind", "ownerId", "platforms", "recurrence", "roleIds", "seriesId", "startsAt", "tags", "title", "type", "updatedAt", "userInterest", "usesInstanceOverflow")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("accessType"); - openapiRequiredFields.add("category"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("endsAt"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("startsAt"); - openapiRequiredFields.add("title"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CalendarEvent - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CalendarEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CalendarEvent is not found in the empty JSON string", CalendarEvent.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("accessType", "category", "description", "endsAt", "id", "startsAt", "title")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CalendarEvent + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CalendarEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CalendarEvent is not found in the empty JSON string", CalendarEvent.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CalendarEvent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CalendarEvent` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CalendarEvent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CalendarEvent.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `accessType` + CalendarEventAccess.validateJsonElement(jsonObj.get("accessType")); + // validate the required field `category` + CalendarEventCategory.validateJsonElement(jsonObj.get("category")); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("languages") != null && !jsonObj.get("languages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `languages` to be an array in the JSON string but got `%s`", jsonObj.get("languages").toString())); + if (jsonObj.get("languages") != null && !jsonObj.get("languages").isJsonNull() && !jsonObj.get("languages").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `languages` to be an array in the JSON string but got `%s`", jsonObj.get("languages").toString())); + } + // validate the optional field `occurrenceKind` + if (jsonObj.get("occurrenceKind") != null && !jsonObj.get("occurrenceKind").isJsonNull()) { + CalendarEventOccurrenceKind.validateJsonElement(jsonObj.get("occurrenceKind")); } if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("platforms") != null && !jsonObj.get("platforms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `platforms` to be an array in the JSON string but got `%s`", jsonObj.get("platforms").toString())); + if (jsonObj.get("platforms") != null && !jsonObj.get("platforms").isJsonNull() && !jsonObj.get("platforms").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platforms` to be an array in the JSON string but got `%s`", jsonObj.get("platforms").toString())); } // validate the optional field `recurrence` if (jsonObj.get("recurrence") != null && !jsonObj.get("recurrence").isJsonNull()) { - CalendarEventRecurrence.validateJsonObject(jsonObj.getAsJsonObject("recurrence")); + CalendarEventRecurrence.validateJsonElement(jsonObj.get("recurrence")); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); + if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonNull() && !jsonObj.get("roleIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); } if ((jsonObj.get("seriesId") != null && !jsonObj.get("seriesId").isJsonNull()) && !jsonObj.get("seriesId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `seriesId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("seriesId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `seriesId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("seriesId").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } // validate the optional field `userInterest` if (jsonObj.get("userInterest") != null && !jsonObj.get("userInterest").isJsonNull()) { - CalendarEventUserInterest.validateJsonObject(jsonObj.getAsJsonObject("userInterest")); + CalendarEventUserInterest.validateJsonElement(jsonObj.get("userInterest")); } } @@ -1158,31 +1036,31 @@ public void write(JsonWriter out, CalendarEvent value) throws IOException { @Override public CalendarEvent read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CalendarEvent given an JSON string - * - * @param jsonString JSON string - * @return An instance of CalendarEvent - * @throws IOException if the JSON string is invalid with respect to CalendarEvent - */ + /** + * Create an instance of CalendarEvent given an JSON string + * + * @param jsonString JSON string + * @return An instance of CalendarEvent + * @throws IOException if the JSON string is invalid with respect to CalendarEvent + */ public static CalendarEvent fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CalendarEvent.class); } - /** - * Convert an instance of CalendarEvent to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CalendarEvent to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventAccess.java b/src/main/java/io/github/vrchatapi/model/CalendarEventAccess.java index ccae7fb7..edbb19f6 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventAccess.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventAccess.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -69,5 +68,10 @@ public CalendarEventAccess read(final JsonReader jsonReader) throws IOException return CalendarEventAccess.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarEventAccess.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventCategory.java b/src/main/java/io/github/vrchatapi/model/CalendarEventCategory.java index a0340236..6909a4be 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventCategory.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventCategory.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -91,5 +90,10 @@ public CalendarEventCategory read(final JsonReader jsonReader) throws IOExceptio return CalendarEventCategory.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarEventCategory.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventDiscovery.java b/src/main/java/io/github/vrchatapi/model/CalendarEventDiscovery.java index b1e41d16..45eef10b 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventDiscovery.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventDiscovery.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.CalendarEvent; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,66 +50,63 @@ /** * CalendarEventDiscovery */ -@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 CalendarEventDiscovery { public static final String SERIALIZED_NAME_NEXT_CURSOR = "nextCursor"; @SerializedName(SERIALIZED_NAME_NEXT_CURSOR) + @javax.annotation.Nonnull private String nextCursor; public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) + @javax.annotation.Nonnull private List results = new ArrayList<>(); public CalendarEventDiscovery() { } - public CalendarEventDiscovery nextCursor(String nextCursor) { - + public CalendarEventDiscovery nextCursor(@javax.annotation.Nonnull String nextCursor) { this.nextCursor = nextCursor; return this; } - /** + /** * Base64-encoded JSON: type: object properties: dataSource: type: string enum: - featured - personalized dataIndex: type: integer format: int32 phase: type: string enum: - all - live - upcoming description: see CalendarEventDiscoveryScope asOf: type: integer format: int64 description: milliseconds since Unix epoch paramHash: type: string format: string description: Base64-encoded 256-bit hash of the original query parameters * @return nextCursor - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Base64-encoded JSON: type: object properties: dataSource: type: string enum: - featured - personalized dataIndex: type: integer format: int32 phase: type: string enum: - all - live - upcoming description: see CalendarEventDiscoveryScope asOf: type: integer format: int64 description: milliseconds since Unix epoch paramHash: type: string format: string description: Base64-encoded 256-bit hash of the original query parameters") - public String getNextCursor() { return nextCursor; } - - public void setNextCursor(String nextCursor) { + public void setNextCursor(@javax.annotation.Nonnull String nextCursor) { this.nextCursor = nextCursor; } - public CalendarEventDiscovery results(List results) { - + public CalendarEventDiscovery results(@javax.annotation.Nonnull List results) { this.results = results; return this; } public CalendarEventDiscovery addResultsItem(CalendarEvent resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } this.results.add(resultsItem); return this; } - /** + /** * Get results * @return results - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getResults() { return results; } - - public void setResults(List results) { + public void setResults(@javax.annotation.Nonnull List results) { this.results = results; } @@ -148,10 +145,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -160,56 +154,53 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("nextCursor"); - openapiFields.add("results"); + openapiFields = new HashSet(Arrays.asList("nextCursor", "results")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("nextCursor"); - openapiRequiredFields.add("results"); + openapiRequiredFields = new HashSet(Arrays.asList("nextCursor", "results")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CalendarEventDiscovery - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CalendarEventDiscovery.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CalendarEventDiscovery is not found in the empty JSON string", CalendarEventDiscovery.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CalendarEventDiscovery + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CalendarEventDiscovery.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CalendarEventDiscovery is not found in the empty JSON string", CalendarEventDiscovery.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CalendarEventDiscovery.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CalendarEventDiscovery` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CalendarEventDiscovery` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CalendarEventDiscovery.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("nextCursor").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nextCursor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextCursor").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `nextCursor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextCursor").toString())); } - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); + if (jsonObj.get("results") != null) { + if (!jsonObj.get("results").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); + } + JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); + // validate the required field `results` (array) + for (int i = 0; i < jsonArrayresults.size(); i++) { + CalendarEvent.validateJsonElement(jsonArrayresults.get(i)); + } } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - CalendarEvent.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -232,31 +223,31 @@ public void write(JsonWriter out, CalendarEventDiscovery value) throws IOExcepti @Override public CalendarEventDiscovery read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CalendarEventDiscovery given an JSON string - * - * @param jsonString JSON string - * @return An instance of CalendarEventDiscovery - * @throws IOException if the JSON string is invalid with respect to CalendarEventDiscovery - */ + /** + * Create an instance of CalendarEventDiscovery given an JSON string + * + * @param jsonString JSON string + * @return An instance of CalendarEventDiscovery + * @throws IOException if the JSON string is invalid with respect to CalendarEventDiscovery + */ public static CalendarEventDiscovery fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CalendarEventDiscovery.class); } - /** - * Convert an instance of CalendarEventDiscovery to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CalendarEventDiscovery to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryInclusion.java b/src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryInclusion.java index d6cb1c69..481bfaee 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryInclusion.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryInclusion.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -70,5 +70,10 @@ public CalendarEventDiscoveryInclusion read(final JsonReader jsonReader) throws return CalendarEventDiscoveryInclusion.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarEventDiscoveryInclusion.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryScope.java b/src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryScope.java index 73b1bd56..912e60ae 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryScope.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryScope.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -70,5 +70,10 @@ public CalendarEventDiscoveryScope read(final JsonReader jsonReader) throws IOEx return CalendarEventDiscoveryScope.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarEventDiscoveryScope.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventFrequency.java b/src/main/java/io/github/vrchatapi/model/CalendarEventFrequency.java index e50c61e8..4ae91a1b 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventFrequency.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventFrequency.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -73,5 +72,10 @@ public CalendarEventFrequency read(final JsonReader jsonReader) throws IOExcepti return CalendarEventFrequency.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarEventFrequency.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventOccurrenceKind.java b/src/main/java/io/github/vrchatapi/model/CalendarEventOccurrenceKind.java index 06bde0de..bccd32d9 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventOccurrenceKind.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventOccurrenceKind.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -71,5 +70,10 @@ public CalendarEventOccurrenceKind read(final JsonReader jsonReader) throws IOEx return CalendarEventOccurrenceKind.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarEventOccurrenceKind.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventPlatform.java b/src/main/java/io/github/vrchatapi/model/CalendarEventPlatform.java index eecfb661..4ce306b8 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventPlatform.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventPlatform.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -70,5 +70,10 @@ public CalendarEventPlatform read(final JsonReader jsonReader) throws IOExceptio return CalendarEventPlatform.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarEventPlatform.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrence.java b/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrence.java index 1cef8dc6..f489593d 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrence.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrence.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,10 +21,9 @@ import io.github.vrchatapi.model.CalendarDayOfWeek; import io.github.vrchatapi.model.CalendarEventFrequency; import io.github.vrchatapi.model.CalendarEventRecurrenceEnd; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -38,13 +36,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -52,34 +52,37 @@ /** * Details about how a recurring event will be scheduled. If the event is to be scheduled indefinitely, this will lack an \"end\" property. */ -@ApiModel(description = "Details about how a recurring event will be scheduled. If the event is to be scheduled indefinitely, this will lack an \"end\" property.") -@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 CalendarEventRecurrence { public static final String SERIALIZED_NAME_DAYS_OF_WEEK = "daysOfWeek"; @SerializedName(SERIALIZED_NAME_DAYS_OF_WEEK) - private List daysOfWeek = null; + @javax.annotation.Nullable + private List daysOfWeek = new ArrayList<>(); public static final String SERIALIZED_NAME_END = "end"; @SerializedName(SERIALIZED_NAME_END) + @javax.annotation.Nullable private CalendarEventRecurrenceEnd end; public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; @SerializedName(SERIALIZED_NAME_FREQUENCY) + @javax.annotation.Nonnull private CalendarEventFrequency frequency = CalendarEventFrequency.WEEKLY; public static final String SERIALIZED_NAME_INTERVAL = "interval"; @SerializedName(SERIALIZED_NAME_INTERVAL) + @javax.annotation.Nonnull private Integer interval; public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; @SerializedName(SERIALIZED_NAME_TIMEZONE) + @javax.annotation.Nonnull private String timezone; public CalendarEventRecurrence() { } - public CalendarEventRecurrence daysOfWeek(List daysOfWeek) { - + public CalendarEventRecurrence daysOfWeek(@javax.annotation.Nullable List daysOfWeek) { this.daysOfWeek = daysOfWeek; return this; } @@ -92,112 +95,93 @@ public CalendarEventRecurrence addDaysOfWeekItem(CalendarDayOfWeek daysOfWeekIte return this; } - /** + /** * Which days of the week the event will be scheduled, only valid/present for \"weekly\" recurring events * @return daysOfWeek - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Which days of the week the event will be scheduled, only valid/present for \"weekly\" recurring events") - public List getDaysOfWeek() { return daysOfWeek; } - - public void setDaysOfWeek(List daysOfWeek) { + public void setDaysOfWeek(@javax.annotation.Nullable List daysOfWeek) { this.daysOfWeek = daysOfWeek; } - public CalendarEventRecurrence end(CalendarEventRecurrenceEnd end) { - + public CalendarEventRecurrence end(@javax.annotation.Nullable CalendarEventRecurrenceEnd end) { this.end = end; return this; } - /** + /** * Get end * @return end - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public CalendarEventRecurrenceEnd getEnd() { return end; } - - public void setEnd(CalendarEventRecurrenceEnd end) { + public void setEnd(@javax.annotation.Nullable CalendarEventRecurrenceEnd end) { this.end = end; } - public CalendarEventRecurrence frequency(CalendarEventFrequency frequency) { - + public CalendarEventRecurrence frequency(@javax.annotation.Nonnull CalendarEventFrequency frequency) { this.frequency = frequency; return this; } - /** + /** * Get frequency * @return frequency - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public CalendarEventFrequency getFrequency() { return frequency; } - - public void setFrequency(CalendarEventFrequency frequency) { + public void setFrequency(@javax.annotation.Nonnull CalendarEventFrequency frequency) { this.frequency = frequency; } - public CalendarEventRecurrence interval(Integer interval) { - + public CalendarEventRecurrence interval(@javax.annotation.Nonnull Integer interval) { this.interval = interval; return this; } - /** + /** * How often the event will be scheduled, in units of \"frequency\" * minimum: 1 * @return interval - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "How often the event will be scheduled, in units of \"frequency\"") - public Integer getInterval() { return interval; } - - public void setInterval(Integer interval) { + public void setInterval(@javax.annotation.Nonnull Integer interval) { this.interval = interval; } - public CalendarEventRecurrence timezone(String timezone) { - + public CalendarEventRecurrence timezone(@javax.annotation.Nonnull String timezone) { this.timezone = timezone; return this; } - /** + /** * The timezone the event will be scheduled in, in Area/Location format * @return timezone - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "America/Chicago", required = true, value = "The timezone the event will be scheduled in, in Area/Location format") - public String getTimezone() { return timezone; } - - public void setTimezone(String timezone) { + public void setTimezone(@javax.annotation.Nonnull String timezone) { this.timezone = timezone; } @@ -242,10 +226,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -254,57 +235,52 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("daysOfWeek"); - openapiFields.add("end"); - openapiFields.add("frequency"); - openapiFields.add("interval"); - openapiFields.add("timezone"); + openapiFields = new HashSet(Arrays.asList("daysOfWeek", "end", "frequency", "interval", "timezone")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("frequency"); - openapiRequiredFields.add("interval"); - openapiRequiredFields.add("timezone"); + openapiRequiredFields = new HashSet(Arrays.asList("frequency", "interval", "timezone")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CalendarEventRecurrence - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CalendarEventRecurrence.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CalendarEventRecurrence is not found in the empty JSON string", CalendarEventRecurrence.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CalendarEventRecurrence + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CalendarEventRecurrence.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CalendarEventRecurrence is not found in the empty JSON string", CalendarEventRecurrence.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CalendarEventRecurrence.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CalendarEventRecurrence` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CalendarEventRecurrence` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CalendarEventRecurrence.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("daysOfWeek") != null && !jsonObj.get("daysOfWeek").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `daysOfWeek` to be an array in the JSON string but got `%s`", jsonObj.get("daysOfWeek").toString())); + if (jsonObj.get("daysOfWeek") != null && !jsonObj.get("daysOfWeek").isJsonNull() && !jsonObj.get("daysOfWeek").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `daysOfWeek` to be an array in the JSON string but got `%s`", jsonObj.get("daysOfWeek").toString())); } // validate the optional field `end` if (jsonObj.get("end") != null && !jsonObj.get("end").isJsonNull()) { - CalendarEventRecurrenceEnd.validateJsonObject(jsonObj.getAsJsonObject("end")); + CalendarEventRecurrenceEnd.validateJsonElement(jsonObj.get("end")); } + // validate the required field `frequency` + CalendarEventFrequency.validateJsonElement(jsonObj.get("frequency")); if (!jsonObj.get("timezone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `timezone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timezone").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `timezone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timezone").toString())); } } @@ -328,31 +304,31 @@ public void write(JsonWriter out, CalendarEventRecurrence value) throws IOExcept @Override public CalendarEventRecurrence read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CalendarEventRecurrence given an JSON string - * - * @param jsonString JSON string - * @return An instance of CalendarEventRecurrence - * @throws IOException if the JSON string is invalid with respect to CalendarEventRecurrence - */ + /** + * Create an instance of CalendarEventRecurrence given an JSON string + * + * @param jsonString JSON string + * @return An instance of CalendarEventRecurrence + * @throws IOException if the JSON string is invalid with respect to CalendarEventRecurrence + */ public static CalendarEventRecurrence fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CalendarEventRecurrence.class); } - /** - * Convert an instance of CalendarEventRecurrence to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CalendarEventRecurrence to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEnd.java b/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEnd.java index ba35f7f6..9a9d267b 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEnd.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEnd.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.CalendarEventRecurrenceEndType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,90 +48,80 @@ /** * Details about how a recurring event stops being scheduled */ -@ApiModel(description = "Details about how a recurring event stops being scheduled") -@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 CalendarEventRecurrenceEnd { public static final String SERIALIZED_NAME_COUNT = "count"; @SerializedName(SERIALIZED_NAME_COUNT) + @javax.annotation.Nullable private Integer count; public static final String SERIALIZED_NAME_DATE = "date"; @SerializedName(SERIALIZED_NAME_DATE) + @javax.annotation.Nullable private String date; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private CalendarEventRecurrenceEndType type = CalendarEventRecurrenceEndType.AFTERDATE; + @javax.annotation.Nonnull + private CalendarEventRecurrenceEndType type = CalendarEventRecurrenceEndType.AFTER_DATE; public CalendarEventRecurrenceEnd() { } - public CalendarEventRecurrenceEnd count(Integer count) { - + public CalendarEventRecurrenceEnd count(@javax.annotation.Nullable Integer count) { this.count = count; return this; } - /** + /** * Required for \"afterOccurrences\" - The number of times the event will be scheduled before it stops being scheduled * minimum: 1 * @return count - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Required for \"afterOccurrences\" - The number of times the event will be scheduled before it stops being scheduled") - public Integer getCount() { return count; } - - public void setCount(Integer count) { + public void setCount(@javax.annotation.Nullable Integer count) { this.count = count; } - public CalendarEventRecurrenceEnd date(String date) { - + public CalendarEventRecurrenceEnd date(@javax.annotation.Nullable String date) { this.date = date; return this; } - /** + /** * Required for \"afterDate\" - The date and time after which the event will stop being scheduled, **without timezone or offset** * @return date - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "2026-12-31T23:59:00", value = "Required for \"afterDate\" - The date and time after which the event will stop being scheduled, **without timezone or offset**") - public String getDate() { return date; } - - public void setDate(String date) { + public void setDate(@javax.annotation.Nullable String date) { this.date = date; } - public CalendarEventRecurrenceEnd type(CalendarEventRecurrenceEndType type) { - + public CalendarEventRecurrenceEnd type(@javax.annotation.Nonnull CalendarEventRecurrenceEndType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public CalendarEventRecurrenceEndType getType() { return type; } - - public void setType(CalendarEventRecurrenceEndType type) { + public void setType(@javax.annotation.Nonnull CalendarEventRecurrenceEndType type) { this.type = type; } @@ -172,10 +162,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -184,46 +171,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("count"); - openapiFields.add("date"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("count", "date", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); + openapiRequiredFields = new HashSet(Arrays.asList("type")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CalendarEventRecurrenceEnd - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CalendarEventRecurrenceEnd.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CalendarEventRecurrenceEnd is not found in the empty JSON string", CalendarEventRecurrenceEnd.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CalendarEventRecurrenceEnd + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CalendarEventRecurrenceEnd.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CalendarEventRecurrenceEnd is not found in the empty JSON string", CalendarEventRecurrenceEnd.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CalendarEventRecurrenceEnd.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CalendarEventRecurrenceEnd` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CalendarEventRecurrenceEnd` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CalendarEventRecurrenceEnd.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("date") != null && !jsonObj.get("date").isJsonNull()) && !jsonObj.get("date").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("date").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("date").toString())); } + // validate the required field `type` + CalendarEventRecurrenceEndType.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -246,31 +232,31 @@ public void write(JsonWriter out, CalendarEventRecurrenceEnd value) throws IOExc @Override public CalendarEventRecurrenceEnd read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CalendarEventRecurrenceEnd given an JSON string - * - * @param jsonString JSON string - * @return An instance of CalendarEventRecurrenceEnd - * @throws IOException if the JSON string is invalid with respect to CalendarEventRecurrenceEnd - */ + /** + * Create an instance of CalendarEventRecurrenceEnd given an JSON string + * + * @param jsonString JSON string + * @return An instance of CalendarEventRecurrenceEnd + * @throws IOException if the JSON string is invalid with respect to CalendarEventRecurrenceEnd + */ public static CalendarEventRecurrenceEnd fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CalendarEventRecurrenceEnd.class); } - /** - * Convert an instance of CalendarEventRecurrenceEnd to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CalendarEventRecurrenceEnd to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEndType.java b/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEndType.java index bf01a2b2..128e6c0b 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEndType.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEndType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -29,9 +28,9 @@ @JsonAdapter(CalendarEventRecurrenceEndType.Adapter.class) public enum CalendarEventRecurrenceEndType { - AFTERDATE("afterDate"), + AFTER_DATE("afterDate"), - AFTEROCCURRENCES("afterOccurrences"); + AFTER_OCCURRENCES("afterOccurrences"); private String value; @@ -69,5 +68,10 @@ public CalendarEventRecurrenceEndType read(final JsonReader jsonReader) throws I return CalendarEventRecurrenceEndType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CalendarEventRecurrenceEndType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/CalendarEventUserInterest.java b/src/main/java/io/github/vrchatapi/model/CalendarEventUserInterest.java index 5fdd36d2..5855730f 100644 --- a/src/main/java/io/github/vrchatapi/model/CalendarEventUserInterest.java +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventUserInterest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,88 +48,79 @@ /** * CalendarEventUserInterest */ -@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 CalendarEventUserInterest { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_IS_FOLLOWING = "isFollowing"; @SerializedName(SERIALIZED_NAME_IS_FOLLOWING) + @javax.annotation.Nullable private Boolean isFollowing; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public CalendarEventUserInterest() { } - public CalendarEventUserInterest createdAt(OffsetDateTime createdAt) { - + public CalendarEventUserInterest createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public CalendarEventUserInterest isFollowing(Boolean isFollowing) { - + public CalendarEventUserInterest isFollowing(@javax.annotation.Nullable Boolean isFollowing) { this.isFollowing = isFollowing; return this; } - /** + /** * Get isFollowing * @return isFollowing - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsFollowing() { return isFollowing; } - - public void setIsFollowing(Boolean isFollowing) { + public void setIsFollowing(@javax.annotation.Nullable Boolean isFollowing) { this.isFollowing = isFollowing; } - public CalendarEventUserInterest updatedAt(OffsetDateTime updatedAt) { - + public CalendarEventUserInterest updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -170,10 +161,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -182,35 +170,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("isFollowing"); - openapiFields.add("updatedAt"); + openapiFields = new HashSet(Arrays.asList("createdAt", "isFollowing", "updatedAt")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CalendarEventUserInterest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CalendarEventUserInterest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CalendarEventUserInterest is not found in the empty JSON string", CalendarEventUserInterest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CalendarEventUserInterest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CalendarEventUserInterest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CalendarEventUserInterest is not found in the empty JSON string", CalendarEventUserInterest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CalendarEventUserInterest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CalendarEventUserInterest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CalendarEventUserInterest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -233,31 +219,31 @@ public void write(JsonWriter out, CalendarEventUserInterest value) throws IOExce @Override public CalendarEventUserInterest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CalendarEventUserInterest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CalendarEventUserInterest - * @throws IOException if the JSON string is invalid with respect to CalendarEventUserInterest - */ + /** + * Create an instance of CalendarEventUserInterest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CalendarEventUserInterest + * @throws IOException if the JSON string is invalid with respect to CalendarEventUserInterest + */ public static CalendarEventUserInterest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CalendarEventUserInterest.class); } - /** - * Convert an instance of CalendarEventUserInterest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CalendarEventUserInterest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ChangeUserTagsRequest.java b/src/main/java/io/github/vrchatapi/model/ChangeUserTagsRequest.java index e04ef9c9..092f730c 100644 --- a/src/main/java/io/github/vrchatapi/model/ChangeUserTagsRequest.java +++ b/src/main/java/io/github/vrchatapi/model/ChangeUserTagsRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,39 +49,39 @@ /** * ChangeUserTagsRequest */ -@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 ChangeUserTagsRequest { public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public ChangeUserTagsRequest() { } - public ChangeUserTagsRequest tags(List tags) { - + public ChangeUserTagsRequest tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public ChangeUserTagsRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * The tags being added or removed. * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The tags being added or removed.") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } @@ -118,10 +118,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -130,46 +127,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); + openapiFields = new HashSet(Arrays.asList("tags")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("tags"); + openapiRequiredFields = new HashSet(Arrays.asList("tags")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ChangeUserTagsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ChangeUserTagsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChangeUserTagsRequest is not found in the empty JSON string", ChangeUserTagsRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChangeUserTagsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChangeUserTagsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ChangeUserTagsRequest is not found in the empty JSON string", ChangeUserTagsRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ChangeUserTagsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChangeUserTagsRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ChangeUserTagsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ChangeUserTagsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -193,31 +189,31 @@ public void write(JsonWriter out, ChangeUserTagsRequest value) throws IOExceptio @Override public ChangeUserTagsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ChangeUserTagsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChangeUserTagsRequest - * @throws IOException if the JSON string is invalid with respect to ChangeUserTagsRequest - */ + /** + * Create an instance of ChangeUserTagsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChangeUserTagsRequest + * @throws IOException if the JSON string is invalid with respect to ChangeUserTagsRequest + */ public static ChangeUserTagsRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ChangeUserTagsRequest.class); } - /** - * Convert an instance of ChangeUserTagsRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ChangeUserTagsRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ChangeWorldTagsRequest.java b/src/main/java/io/github/vrchatapi/model/ChangeWorldTagsRequest.java index b6c4cb58..3a4a8c52 100644 --- a/src/main/java/io/github/vrchatapi/model/ChangeWorldTagsRequest.java +++ b/src/main/java/io/github/vrchatapi/model/ChangeWorldTagsRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,39 +49,39 @@ /** * ChangeWorldTagsRequest */ -@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 ChangeWorldTagsRequest { public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public ChangeWorldTagsRequest() { } - public ChangeWorldTagsRequest tags(List tags) { - + public ChangeWorldTagsRequest tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public ChangeWorldTagsRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * The tags being added or removed. * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The tags being added or removed.") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } @@ -118,10 +118,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -130,46 +127,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tags"); + openapiFields = new HashSet(Arrays.asList("tags")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("tags"); + openapiRequiredFields = new HashSet(Arrays.asList("tags")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ChangeWorldTagsRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ChangeWorldTagsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChangeWorldTagsRequest is not found in the empty JSON string", ChangeWorldTagsRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChangeWorldTagsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChangeWorldTagsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ChangeWorldTagsRequest is not found in the empty JSON string", ChangeWorldTagsRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ChangeWorldTagsRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChangeWorldTagsRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ChangeWorldTagsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ChangeWorldTagsRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -193,31 +189,31 @@ public void write(JsonWriter out, ChangeWorldTagsRequest value) throws IOExcepti @Override public ChangeWorldTagsRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ChangeWorldTagsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ChangeWorldTagsRequest - * @throws IOException if the JSON string is invalid with respect to ChangeWorldTagsRequest - */ + /** + * Create an instance of ChangeWorldTagsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChangeWorldTagsRequest + * @throws IOException if the JSON string is invalid with respect to ChangeWorldTagsRequest + */ public static ChangeWorldTagsRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ChangeWorldTagsRequest.class); } - /** - * Convert an instance of ChangeWorldTagsRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ChangeWorldTagsRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ContentFilter.java b/src/main/java/io/github/vrchatapi/model/ContentFilter.java index 9bd75815..512f77f2 100644 --- a/src/main/java/io/github/vrchatapi/model/ContentFilter.java +++ b/src/main/java/io/github/vrchatapi/model/ContentFilter.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -29,15 +28,15 @@ @JsonAdapter(ContentFilter.Adapter.class) public enum ContentFilter { - ADULT("content_adult"), + CONTENT_ADULT("content_adult"), - GORE("content_gore"), + CONTENT_GORE("content_gore"), - HORROR("content_horror"), + CONTENT_HORROR("content_horror"), - SEX("content_sex"), + CONTENT_SEX("content_sex"), - VIOLENCE("content_violence"); + CONTENT_VIOLENCE("content_violence"); private String value; @@ -75,5 +74,10 @@ public ContentFilter read(final JsonReader jsonReader) throws IOException { return ContentFilter.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ContentFilter.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/CreateAvatarModerationRequest.java b/src/main/java/io/github/vrchatapi/model/CreateAvatarModerationRequest.java index 2b696138..c7416a6d 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateAvatarModerationRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateAvatarModerationRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.AvatarModerationType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,61 +48,55 @@ /** * CreateAvatarModerationRequest */ -@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 CreateAvatarModerationRequest { public static final String SERIALIZED_NAME_AVATAR_MODERATION_TYPE = "avatarModerationType"; @SerializedName(SERIALIZED_NAME_AVATAR_MODERATION_TYPE) + @javax.annotation.Nonnull private AvatarModerationType avatarModerationType; public static final String SERIALIZED_NAME_TARGET_AVATAR_ID = "targetAvatarId"; @SerializedName(SERIALIZED_NAME_TARGET_AVATAR_ID) + @javax.annotation.Nonnull private String targetAvatarId; public CreateAvatarModerationRequest() { } - public CreateAvatarModerationRequest avatarModerationType(AvatarModerationType avatarModerationType) { - + public CreateAvatarModerationRequest avatarModerationType(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { this.avatarModerationType = avatarModerationType; return this; } - /** + /** * Get avatarModerationType * @return avatarModerationType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AvatarModerationType getAvatarModerationType() { return avatarModerationType; } - - public void setAvatarModerationType(AvatarModerationType avatarModerationType) { + public void setAvatarModerationType(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { this.avatarModerationType = avatarModerationType; } - public CreateAvatarModerationRequest targetAvatarId(String targetAvatarId) { - + public CreateAvatarModerationRequest targetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { this.targetAvatarId = targetAvatarId; return this; } - /** + /** * Get targetAvatarId * @return targetAvatarId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_912d66a4-4714-43b8-8407-7de2cafbf55b", required = true, value = "") - public String getTargetAvatarId() { return targetAvatarId; } - - public void setTargetAvatarId(String targetAvatarId) { + public void setTargetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { this.targetAvatarId = targetAvatarId; } @@ -141,10 +135,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,45 +144,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatarModerationType"); - openapiFields.add("targetAvatarId"); + openapiFields = new HashSet(Arrays.asList("avatarModerationType", "targetAvatarId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("avatarModerationType"); - openapiRequiredFields.add("targetAvatarId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateAvatarModerationRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateAvatarModerationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAvatarModerationRequest is not found in the empty JSON string", CreateAvatarModerationRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("avatarModerationType", "targetAvatarId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateAvatarModerationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateAvatarModerationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateAvatarModerationRequest is not found in the empty JSON string", CreateAvatarModerationRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateAvatarModerationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAvatarModerationRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateAvatarModerationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateAvatarModerationRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `avatarModerationType` + AvatarModerationType.validateJsonElement(jsonObj.get("avatarModerationType")); if (!jsonObj.get("targetAvatarId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `targetAvatarId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetAvatarId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `targetAvatarId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetAvatarId").toString())); } } @@ -215,31 +205,31 @@ public void write(JsonWriter out, CreateAvatarModerationRequest value) throws IO @Override public CreateAvatarModerationRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateAvatarModerationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAvatarModerationRequest - * @throws IOException if the JSON string is invalid with respect to CreateAvatarModerationRequest - */ + /** + * Create an instance of CreateAvatarModerationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAvatarModerationRequest + * @throws IOException if the JSON string is invalid with respect to CreateAvatarModerationRequest + */ public static CreateAvatarModerationRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateAvatarModerationRequest.class); } - /** - * Convert an instance of CreateAvatarModerationRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateAvatarModerationRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateAvatarRequest.java b/src/main/java/io/github/vrchatapi/model/CreateAvatarRequest.java index c2de6246..7e814f64 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateAvatarRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateAvatarRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ReleaseStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,280 +50,258 @@ /** * CreateAvatarRequest */ -@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 CreateAvatarRequest { public static final String SERIALIZED_NAME_ASSET_URL = "assetUrl"; @SerializedName(SERIALIZED_NAME_ASSET_URL) + @javax.annotation.Nullable private String assetUrl; public static final String SERIALIZED_NAME_ASSET_VERSION = "assetVersion"; @SerializedName(SERIALIZED_NAME_ASSET_VERSION) + @javax.annotation.Nullable private String assetVersion; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private String createdAt; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nullable private String platform; public static final String SERIALIZED_NAME_RELEASE_STATUS = "releaseStatus"; @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) + @javax.annotation.Nullable private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_THUMBNAIL_IMAGE_URL = "thumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nullable private String thumbnailImageUrl; public static final String SERIALIZED_NAME_UNITY_PACKAGE_URL = "unityPackageUrl"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGE_URL) + @javax.annotation.Nullable private String unityPackageUrl; public static final String SERIALIZED_NAME_UNITY_VERSION = "unityVersion"; @SerializedName(SERIALIZED_NAME_UNITY_VERSION) + @javax.annotation.Nullable private String unityVersion = "5.3.4p1"; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private String updatedAt; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nullable private Integer version = 1; public CreateAvatarRequest() { } - public CreateAvatarRequest assetUrl(String assetUrl) { - + public CreateAvatarRequest assetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; return this; } - /** + /** * Get assetUrl * @return assetUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAssetUrl() { return assetUrl; } - - public void setAssetUrl(String assetUrl) { + public void setAssetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; } - public CreateAvatarRequest assetVersion(String assetVersion) { - + public CreateAvatarRequest assetVersion(@javax.annotation.Nullable String assetVersion) { this.assetVersion = assetVersion; return this; } - /** + /** * Get assetVersion * @return assetVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAssetVersion() { return assetVersion; } - - public void setAssetVersion(String assetVersion) { + public void setAssetVersion(@javax.annotation.Nullable String assetVersion) { this.assetVersion = assetVersion; } - public CreateAvatarRequest createdAt(String createdAt) { - + public CreateAvatarRequest createdAt(@javax.annotation.Nullable String createdAt) { this.createdAt = createdAt; return this; } - /** + /** * A date and time of the pattern `M/d/yyyy h:mm:ss tt` (see C Sharp `System.DateTime`) * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "12/12/2021 1:23:43 AM", value = "A date and time of the pattern `M/d/yyyy h:mm:ss tt` (see C Sharp `System.DateTime`)") - public String getCreatedAt() { return createdAt; } - - public void setCreatedAt(String createdAt) { + public void setCreatedAt(@javax.annotation.Nullable String createdAt) { this.createdAt = createdAt; } - public CreateAvatarRequest description(String description) { - + public CreateAvatarRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public CreateAvatarRequest id(String id) { - + public CreateAvatarRequest id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "avtr_912d66a4-4714-43b8-8407-7de2cafbf55b", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public CreateAvatarRequest imageUrl(String imageUrl) { - + public CreateAvatarRequest imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public CreateAvatarRequest name(String name) { - + public CreateAvatarRequest name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public CreateAvatarRequest platform(String platform) { - + public CreateAvatarRequest platform(@javax.annotation.Nullable String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "standalonewindows", value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nullable String platform) { this.platform = platform; } - public CreateAvatarRequest releaseStatus(ReleaseStatus releaseStatus) { - + public CreateAvatarRequest releaseStatus(@javax.annotation.Nullable ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; return this; } - /** + /** * Get releaseStatus * @return releaseStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ReleaseStatus getReleaseStatus() { return releaseStatus; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { + public void setReleaseStatus(@javax.annotation.Nullable ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; } - public CreateAvatarRequest tags(List tags) { - + public CreateAvatarRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -336,135 +314,112 @@ public CreateAvatarRequest addTagsItem(String tagsItem) { return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public CreateAvatarRequest thumbnailImageUrl(String thumbnailImageUrl) { - + public CreateAvatarRequest thumbnailImageUrl(@javax.annotation.Nullable String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; return this; } - /** + /** * Get thumbnailImageUrl * @return thumbnailImageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getThumbnailImageUrl() { return thumbnailImageUrl; } - - public void setThumbnailImageUrl(String thumbnailImageUrl) { + public void setThumbnailImageUrl(@javax.annotation.Nullable String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; } - public CreateAvatarRequest unityPackageUrl(String unityPackageUrl) { - + public CreateAvatarRequest unityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; return this; } - /** + /** * Get unityPackageUrl * @return unityPackageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUnityPackageUrl() { return unityPackageUrl; } - - public void setUnityPackageUrl(String unityPackageUrl) { + public void setUnityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; } - public CreateAvatarRequest unityVersion(String unityVersion) { - + public CreateAvatarRequest unityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; return this; } - /** + /** * Get unityVersion * @return unityVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "2022.3.6f1", value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; } - public CreateAvatarRequest updatedAt(String updatedAt) { - + public CreateAvatarRequest updatedAt(@javax.annotation.Nullable String updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * A date and time of the pattern `M/d/yyyy h:mm:ss tt` (see C Sharp `System.DateTime`) * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "12/12/2021 1:23:43 AM", value = "A date and time of the pattern `M/d/yyyy h:mm:ss tt` (see C Sharp `System.DateTime`)") - public String getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(String updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable String updatedAt) { this.updatedAt = updatedAt; } - public CreateAvatarRequest version(Integer version) { - + public CreateAvatarRequest version(@javax.annotation.Nullable Integer version) { this.version = version; return this; } - /** + /** * Get version * minimum: 0 * @return version - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nullable Integer version) { this.version = version; } @@ -529,10 +484,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -541,95 +493,83 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assetUrl"); - openapiFields.add("assetVersion"); - openapiFields.add("created_at"); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("name"); - openapiFields.add("platform"); - openapiFields.add("releaseStatus"); - openapiFields.add("tags"); - openapiFields.add("thumbnailImageUrl"); - openapiFields.add("unityPackageUrl"); - openapiFields.add("unityVersion"); - openapiFields.add("updated_at"); - openapiFields.add("version"); + openapiFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "created_at", "description", "id", "imageUrl", "name", "platform", "releaseStatus", "tags", "thumbnailImageUrl", "unityPackageUrl", "unityVersion", "updated_at", "version")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateAvatarRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateAvatarRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAvatarRequest is not found in the empty JSON string", CreateAvatarRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("imageUrl", "name")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateAvatarRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateAvatarRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateAvatarRequest is not found in the empty JSON string", CreateAvatarRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateAvatarRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateAvatarRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateAvatarRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateAvatarRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("assetUrl") != null && !jsonObj.get("assetUrl").isJsonNull()) && !jsonObj.get("assetUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); } if ((jsonObj.get("assetVersion") != null && !jsonObj.get("assetVersion").isJsonNull()) && !jsonObj.get("assetVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetVersion").toString())); } if ((jsonObj.get("created_at") != null && !jsonObj.get("created_at").isJsonNull()) && !jsonObj.get("created_at").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `created_at` to be a primitive type in the JSON string but got `%s`", jsonObj.get("created_at").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `created_at` to be a primitive type in the JSON string but got `%s`", jsonObj.get("created_at").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) && !jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + } + // validate the optional field `releaseStatus` + if (jsonObj.get("releaseStatus") != null && !jsonObj.get("releaseStatus").isJsonNull()) { + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("thumbnailImageUrl") != null && !jsonObj.get("thumbnailImageUrl").isJsonNull()) && !jsonObj.get("thumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); } if ((jsonObj.get("unityPackageUrl") != null && !jsonObj.get("unityPackageUrl").isJsonNull()) && !jsonObj.get("unityPackageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); } if ((jsonObj.get("unityVersion") != null && !jsonObj.get("unityVersion").isJsonNull()) && !jsonObj.get("unityVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); } if ((jsonObj.get("updated_at") != null && !jsonObj.get("updated_at").isJsonNull()) && !jsonObj.get("updated_at").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `updated_at` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updated_at").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `updated_at` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updated_at").toString())); } } @@ -653,31 +593,31 @@ public void write(JsonWriter out, CreateAvatarRequest value) throws IOException @Override public CreateAvatarRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateAvatarRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateAvatarRequest - * @throws IOException if the JSON string is invalid with respect to CreateAvatarRequest - */ + /** + * Create an instance of CreateAvatarRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAvatarRequest + * @throws IOException if the JSON string is invalid with respect to CreateAvatarRequest + */ public static CreateAvatarRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateAvatarRequest.class); } - /** - * Convert an instance of CreateAvatarRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateAvatarRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateCalendarEventRequest.java b/src/main/java/io/github/vrchatapi/model/CreateCalendarEventRequest.java index bdcc89fc..e01f09e3 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateCalendarEventRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateCalendarEventRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,11 +23,10 @@ import io.github.vrchatapi.model.CalendarEventOccurrenceKind; import io.github.vrchatapi.model.CalendarEventPlatform; import io.github.vrchatapi.model.CalendarEventRecurrence; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -42,13 +40,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -56,327 +56,307 @@ /** * CreateCalendarEventRequest */ -@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 CreateCalendarEventRequest { public static final String SERIALIZED_NAME_ACCESS_TYPE = "accessType"; @SerializedName(SERIALIZED_NAME_ACCESS_TYPE) + @javax.annotation.Nonnull private CalendarEventAccess accessType = CalendarEventAccess.PUBLIC; public static final String SERIALIZED_NAME_CATEGORY = "category"; @SerializedName(SERIALIZED_NAME_CATEGORY) + @javax.annotation.Nonnull private CalendarEventCategory category = CalendarEventCategory.OTHER; public static final String SERIALIZED_NAME_CLOSE_INSTANCE_AFTER_END_MINUTES = "closeInstanceAfterEndMinutes"; @SerializedName(SERIALIZED_NAME_CLOSE_INSTANCE_AFTER_END_MINUTES) + @javax.annotation.Nullable private Integer closeInstanceAfterEndMinutes; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_ENDS_AT = "endsAt"; @SerializedName(SERIALIZED_NAME_ENDS_AT) + @javax.annotation.Nonnull private OffsetDateTime endsAt; public static final String SERIALIZED_NAME_FEATURED = "featured"; @SerializedName(SERIALIZED_NAME_FEATURED) + @javax.annotation.Nullable private Boolean featured; public static final String SERIALIZED_NAME_GUEST_EARLY_JOIN_MINUTES = "guestEarlyJoinMinutes"; @SerializedName(SERIALIZED_NAME_GUEST_EARLY_JOIN_MINUTES) + @javax.annotation.Nullable private Integer guestEarlyJoinMinutes; public static final String SERIALIZED_NAME_HOST_EARLY_JOIN_MINUTES = "hostEarlyJoinMinutes"; @SerializedName(SERIALIZED_NAME_HOST_EARLY_JOIN_MINUTES) + @javax.annotation.Nullable private Integer hostEarlyJoinMinutes; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nullable private String imageId; public static final String SERIALIZED_NAME_IS_DRAFT = "isDraft"; @SerializedName(SERIALIZED_NAME_IS_DRAFT) + @javax.annotation.Nullable private Boolean isDraft; public static final String SERIALIZED_NAME_LANGUAGES = "languages"; @SerializedName(SERIALIZED_NAME_LANGUAGES) - private List languages = null; + @javax.annotation.Nullable + private List languages = new ArrayList<>(); public static final String SERIALIZED_NAME_OCCURRENCE_KIND = "occurrenceKind"; @SerializedName(SERIALIZED_NAME_OCCURRENCE_KIND) + @javax.annotation.Nullable private CalendarEventOccurrenceKind occurrenceKind = CalendarEventOccurrenceKind.SINGLE; public static final String SERIALIZED_NAME_PARENT_ID = "parentId"; @SerializedName(SERIALIZED_NAME_PARENT_ID) + @javax.annotation.Nullable private String parentId; public static final String SERIALIZED_NAME_PLATFORMS = "platforms"; @SerializedName(SERIALIZED_NAME_PLATFORMS) - private List platforms = null; + @javax.annotation.Nullable + private List platforms = new ArrayList<>(); public static final String SERIALIZED_NAME_RECURRENCE = "recurrence"; @SerializedName(SERIALIZED_NAME_RECURRENCE) + @javax.annotation.Nullable private CalendarEventRecurrence recurrence; public static final String SERIALIZED_NAME_ROLE_IDS = "roleIds"; @SerializedName(SERIALIZED_NAME_ROLE_IDS) - private List roleIds = null; + @javax.annotation.Nullable + private List roleIds = new ArrayList<>(); public static final String SERIALIZED_NAME_SEND_CREATION_NOTIFICATION = "sendCreationNotification"; @SerializedName(SERIALIZED_NAME_SEND_CREATION_NOTIFICATION) + @javax.annotation.Nonnull private Boolean sendCreationNotification; public static final String SERIALIZED_NAME_STARTS_AT = "startsAt"; @SerializedName(SERIALIZED_NAME_STARTS_AT) + @javax.annotation.Nonnull private OffsetDateTime startsAt; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nonnull private String title; public static final String SERIALIZED_NAME_USES_INSTANCE_OVERFLOW = "usesInstanceOverflow"; @SerializedName(SERIALIZED_NAME_USES_INSTANCE_OVERFLOW) + @javax.annotation.Nullable private Boolean usesInstanceOverflow; public CreateCalendarEventRequest() { } - public CreateCalendarEventRequest accessType(CalendarEventAccess accessType) { - + public CreateCalendarEventRequest accessType(@javax.annotation.Nonnull CalendarEventAccess accessType) { this.accessType = accessType; return this; } - /** + /** * Get accessType * @return accessType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public CalendarEventAccess getAccessType() { return accessType; } - - public void setAccessType(CalendarEventAccess accessType) { + public void setAccessType(@javax.annotation.Nonnull CalendarEventAccess accessType) { this.accessType = accessType; } - public CreateCalendarEventRequest category(CalendarEventCategory category) { - + public CreateCalendarEventRequest category(@javax.annotation.Nonnull CalendarEventCategory category) { this.category = category; return this; } - /** + /** * Get category * @return category - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public CalendarEventCategory getCategory() { return category; } - - public void setCategory(CalendarEventCategory category) { + public void setCategory(@javax.annotation.Nonnull CalendarEventCategory category) { this.category = category; } - public CreateCalendarEventRequest closeInstanceAfterEndMinutes(Integer closeInstanceAfterEndMinutes) { - + public CreateCalendarEventRequest closeInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; return this; } - /** + /** * Get closeInstanceAfterEndMinutes * @return closeInstanceAfterEndMinutes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "5", value = "") - public Integer getCloseInstanceAfterEndMinutes() { return closeInstanceAfterEndMinutes; } - - public void setCloseInstanceAfterEndMinutes(Integer closeInstanceAfterEndMinutes) { + public void setCloseInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; } - public CreateCalendarEventRequest description(String description) { - + public CreateCalendarEventRequest description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public CreateCalendarEventRequest endsAt(OffsetDateTime endsAt) { - + public CreateCalendarEventRequest endsAt(@javax.annotation.Nonnull OffsetDateTime endsAt) { this.endsAt = endsAt; return this; } - /** + /** * Time the event ends at * @return endsAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Time the event ends at") - public OffsetDateTime getEndsAt() { return endsAt; } - - public void setEndsAt(OffsetDateTime endsAt) { + public void setEndsAt(@javax.annotation.Nonnull OffsetDateTime endsAt) { this.endsAt = endsAt; } - public CreateCalendarEventRequest featured(Boolean featured) { - + public CreateCalendarEventRequest featured(@javax.annotation.Nullable Boolean featured) { this.featured = featured; return this; } - /** + /** * Get featured * @return featured - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getFeatured() { return featured; } - - public void setFeatured(Boolean featured) { + public void setFeatured(@javax.annotation.Nullable Boolean featured) { this.featured = featured; } - public CreateCalendarEventRequest guestEarlyJoinMinutes(Integer guestEarlyJoinMinutes) { - + public CreateCalendarEventRequest guestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; return this; } - /** + /** * Get guestEarlyJoinMinutes * @return guestEarlyJoinMinutes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "5", value = "") - public Integer getGuestEarlyJoinMinutes() { return guestEarlyJoinMinutes; } - - public void setGuestEarlyJoinMinutes(Integer guestEarlyJoinMinutes) { + public void setGuestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; } - public CreateCalendarEventRequest hostEarlyJoinMinutes(Integer hostEarlyJoinMinutes) { - + public CreateCalendarEventRequest hostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; return this; } - /** + /** * Get hostEarlyJoinMinutes * @return hostEarlyJoinMinutes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "60", value = "") - public Integer getHostEarlyJoinMinutes() { return hostEarlyJoinMinutes; } - - public void setHostEarlyJoinMinutes(Integer hostEarlyJoinMinutes) { + public void setHostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; } - public CreateCalendarEventRequest imageId(String imageId) { - + public CreateCalendarEventRequest imageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; } - public CreateCalendarEventRequest isDraft(Boolean isDraft) { - + public CreateCalendarEventRequest isDraft(@javax.annotation.Nullable Boolean isDraft) { this.isDraft = isDraft; return this; } - /** + /** * Get isDraft * @return isDraft - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsDraft() { return isDraft; } - - public void setIsDraft(Boolean isDraft) { + public void setIsDraft(@javax.annotation.Nullable Boolean isDraft) { this.isDraft = isDraft; } - public CreateCalendarEventRequest languages(List languages) { - + public CreateCalendarEventRequest languages(@javax.annotation.Nullable List languages) { this.languages = languages; return this; } @@ -389,71 +369,59 @@ public CreateCalendarEventRequest addLanguagesItem(String languagesItem) { return this; } - /** + /** * Get languages * @return languages - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getLanguages() { return languages; } - - public void setLanguages(List languages) { + public void setLanguages(@javax.annotation.Nullable List languages) { this.languages = languages; } - public CreateCalendarEventRequest occurrenceKind(CalendarEventOccurrenceKind occurrenceKind) { - + public CreateCalendarEventRequest occurrenceKind(@javax.annotation.Nullable CalendarEventOccurrenceKind occurrenceKind) { this.occurrenceKind = occurrenceKind; return this; } - /** + /** * Get occurrenceKind * @return occurrenceKind - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public CalendarEventOccurrenceKind getOccurrenceKind() { return occurrenceKind; } - - public void setOccurrenceKind(CalendarEventOccurrenceKind occurrenceKind) { + public void setOccurrenceKind(@javax.annotation.Nullable CalendarEventOccurrenceKind occurrenceKind) { this.occurrenceKind = occurrenceKind; } - public CreateCalendarEventRequest parentId(String parentId) { - + public CreateCalendarEventRequest parentId(@javax.annotation.Nullable String parentId) { this.parentId = parentId; return this; } - /** + /** * Get parentId * @return parentId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "cal_6b182f0c-61ef-4bdf-97fe-94f63bcba27b", value = "") - public String getParentId() { return parentId; } - - public void setParentId(String parentId) { + public void setParentId(@javax.annotation.Nullable String parentId) { this.parentId = parentId; } - public CreateCalendarEventRequest platforms(List platforms) { - + public CreateCalendarEventRequest platforms(@javax.annotation.Nullable List platforms) { this.platforms = platforms; return this; } @@ -466,48 +434,40 @@ public CreateCalendarEventRequest addPlatformsItem(CalendarEventPlatform platfor return this; } - /** + /** * Get platforms * @return platforms - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getPlatforms() { return platforms; } - - public void setPlatforms(List platforms) { + public void setPlatforms(@javax.annotation.Nullable List platforms) { this.platforms = platforms; } - public CreateCalendarEventRequest recurrence(CalendarEventRecurrence recurrence) { - + public CreateCalendarEventRequest recurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { this.recurrence = recurrence; return this; } - /** + /** * Get recurrence * @return recurrence - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public CalendarEventRecurrence getRecurrence() { return recurrence; } - - public void setRecurrence(CalendarEventRecurrence recurrence) { + public void setRecurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { this.recurrence = recurrence; } - public CreateCalendarEventRequest roleIds(List roleIds) { - + public CreateCalendarEventRequest roleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; return this; } @@ -520,71 +480,59 @@ public CreateCalendarEventRequest addRoleIdsItem(String roleIdsItem) { return this; } - /** + /** * Get roleIds * @return roleIds - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getRoleIds() { return roleIds; } - - public void setRoleIds(List roleIds) { + public void setRoleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; } - public CreateCalendarEventRequest sendCreationNotification(Boolean sendCreationNotification) { - + public CreateCalendarEventRequest sendCreationNotification(@javax.annotation.Nonnull Boolean sendCreationNotification) { this.sendCreationNotification = sendCreationNotification; return this; } - /** + /** * Send notification to group members. * @return sendCreationNotification - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "false", required = true, value = "Send notification to group members.") - public Boolean getSendCreationNotification() { return sendCreationNotification; } - - public void setSendCreationNotification(Boolean sendCreationNotification) { + public void setSendCreationNotification(@javax.annotation.Nonnull Boolean sendCreationNotification) { this.sendCreationNotification = sendCreationNotification; } - public CreateCalendarEventRequest startsAt(OffsetDateTime startsAt) { - + public CreateCalendarEventRequest startsAt(@javax.annotation.Nonnull OffsetDateTime startsAt) { this.startsAt = startsAt; return this; } - /** + /** * Time the event starts at * @return startsAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Time the event starts at") - public OffsetDateTime getStartsAt() { return startsAt; } - - public void setStartsAt(OffsetDateTime startsAt) { + public void setStartsAt(@javax.annotation.Nonnull OffsetDateTime startsAt) { this.startsAt = startsAt; } - public CreateCalendarEventRequest tags(List tags) { - + public CreateCalendarEventRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -597,65 +545,54 @@ public CreateCalendarEventRequest addTagsItem(String tagsItem) { return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public CreateCalendarEventRequest title(String title) { - + public CreateCalendarEventRequest title(@javax.annotation.Nonnull String title) { this.title = title; return this; } - /** + /** * Event title * @return title - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Performance Event!", required = true, value = "Event title") - public String getTitle() { return title; } - - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nonnull String title) { this.title = title; } - public CreateCalendarEventRequest usesInstanceOverflow(Boolean usesInstanceOverflow) { - + public CreateCalendarEventRequest usesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { this.usesInstanceOverflow = usesInstanceOverflow; return this; } - /** + /** * Get usesInstanceOverflow * @return usesInstanceOverflow - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - public Boolean getUsesInstanceOverflow() { return usesInstanceOverflow; } - - public void setUsesInstanceOverflow(Boolean usesInstanceOverflow) { + public void setUsesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { this.usesInstanceOverflow = usesInstanceOverflow; } @@ -743,10 +680,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -755,98 +689,79 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accessType"); - openapiFields.add("category"); - openapiFields.add("closeInstanceAfterEndMinutes"); - openapiFields.add("description"); - openapiFields.add("endsAt"); - openapiFields.add("featured"); - openapiFields.add("guestEarlyJoinMinutes"); - openapiFields.add("hostEarlyJoinMinutes"); - openapiFields.add("imageId"); - openapiFields.add("isDraft"); - openapiFields.add("languages"); - openapiFields.add("occurrenceKind"); - openapiFields.add("parentId"); - openapiFields.add("platforms"); - openapiFields.add("recurrence"); - openapiFields.add("roleIds"); - openapiFields.add("sendCreationNotification"); - openapiFields.add("startsAt"); - openapiFields.add("tags"); - openapiFields.add("title"); - openapiFields.add("usesInstanceOverflow"); + openapiFields = new HashSet(Arrays.asList("accessType", "category", "closeInstanceAfterEndMinutes", "description", "endsAt", "featured", "guestEarlyJoinMinutes", "hostEarlyJoinMinutes", "imageId", "isDraft", "languages", "occurrenceKind", "parentId", "platforms", "recurrence", "roleIds", "sendCreationNotification", "startsAt", "tags", "title", "usesInstanceOverflow")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("accessType"); - openapiRequiredFields.add("category"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("endsAt"); - openapiRequiredFields.add("sendCreationNotification"); - openapiRequiredFields.add("startsAt"); - openapiRequiredFields.add("title"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateCalendarEventRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateCalendarEventRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCalendarEventRequest is not found in the empty JSON string", CreateCalendarEventRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("accessType", "category", "description", "endsAt", "sendCreationNotification", "startsAt", "title")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCalendarEventRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateCalendarEventRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateCalendarEventRequest is not found in the empty JSON string", CreateCalendarEventRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateCalendarEventRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateCalendarEventRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateCalendarEventRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateCalendarEventRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `accessType` + CalendarEventAccess.validateJsonElement(jsonObj.get("accessType")); + // validate the required field `category` + CalendarEventCategory.validateJsonElement(jsonObj.get("category")); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("languages") != null && !jsonObj.get("languages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `languages` to be an array in the JSON string but got `%s`", jsonObj.get("languages").toString())); + if (jsonObj.get("languages") != null && !jsonObj.get("languages").isJsonNull() && !jsonObj.get("languages").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `languages` to be an array in the JSON string but got `%s`", jsonObj.get("languages").toString())); + } + // validate the optional field `occurrenceKind` + if (jsonObj.get("occurrenceKind") != null && !jsonObj.get("occurrenceKind").isJsonNull()) { + CalendarEventOccurrenceKind.validateJsonElement(jsonObj.get("occurrenceKind")); } if ((jsonObj.get("parentId") != null && !jsonObj.get("parentId").isJsonNull()) && !jsonObj.get("parentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentId").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("platforms") != null && !jsonObj.get("platforms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `platforms` to be an array in the JSON string but got `%s`", jsonObj.get("platforms").toString())); + if (jsonObj.get("platforms") != null && !jsonObj.get("platforms").isJsonNull() && !jsonObj.get("platforms").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platforms` to be an array in the JSON string but got `%s`", jsonObj.get("platforms").toString())); } // validate the optional field `recurrence` if (jsonObj.get("recurrence") != null && !jsonObj.get("recurrence").isJsonNull()) { - CalendarEventRecurrence.validateJsonObject(jsonObj.getAsJsonObject("recurrence")); + CalendarEventRecurrence.validateJsonElement(jsonObj.get("recurrence")); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); + if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonNull() && !jsonObj.get("roleIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } } @@ -870,31 +785,31 @@ public void write(JsonWriter out, CreateCalendarEventRequest value) throws IOExc @Override public CreateCalendarEventRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateCalendarEventRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateCalendarEventRequest - * @throws IOException if the JSON string is invalid with respect to CreateCalendarEventRequest - */ + /** + * Create an instance of CreateCalendarEventRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCalendarEventRequest + * @throws IOException if the JSON string is invalid with respect to CreateCalendarEventRequest + */ public static CreateCalendarEventRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateCalendarEventRequest.class); } - /** - * Convert an instance of CreateCalendarEventRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateCalendarEventRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateFileRequest.java b/src/main/java/io/github/vrchatapi/model/CreateFileRequest.java index f68720c7..9bff9103 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateFileRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateFileRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.MIMEType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,98 +50,89 @@ /** * CreateFileRequest */ -@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 CreateFileRequest { public static final String SERIALIZED_NAME_EXTENSION = "extension"; @SerializedName(SERIALIZED_NAME_EXTENSION) + @javax.annotation.Nonnull private String extension; public static final String SERIALIZED_NAME_MIME_TYPE = "mimeType"; @SerializedName(SERIALIZED_NAME_MIME_TYPE) + @javax.annotation.Nonnull private MIMEType mimeType = MIMEType.IMAGE_JPEG; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public CreateFileRequest() { } - public CreateFileRequest extension(String extension) { - + public CreateFileRequest extension(@javax.annotation.Nonnull String extension) { this.extension = extension; return this; } - /** + /** * Get extension * @return extension - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getExtension() { return extension; } - - public void setExtension(String extension) { + public void setExtension(@javax.annotation.Nonnull String extension) { this.extension = extension; } - public CreateFileRequest mimeType(MIMEType mimeType) { - + public CreateFileRequest mimeType(@javax.annotation.Nonnull MIMEType mimeType) { this.mimeType = mimeType; return this; } - /** + /** * Get mimeType * @return mimeType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public MIMEType getMimeType() { return mimeType; } - - public void setMimeType(MIMEType mimeType) { + public void setMimeType(@javax.annotation.Nonnull MIMEType mimeType) { this.mimeType = mimeType; } - public CreateFileRequest name(String name) { - + public CreateFileRequest name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public CreateFileRequest tags(List tags) { - + public CreateFileRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -154,19 +145,16 @@ public CreateFileRequest addTagsItem(String tagsItem) { return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } @@ -209,10 +197,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -221,55 +206,51 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("extension"); - openapiFields.add("mimeType"); - openapiFields.add("name"); - openapiFields.add("tags"); + openapiFields = new HashSet(Arrays.asList("extension", "mimeType", "name", "tags")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("extension"); - openapiRequiredFields.add("mimeType"); - openapiRequiredFields.add("name"); + openapiRequiredFields = new HashSet(Arrays.asList("extension", "mimeType", "name")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateFileRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateFileRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateFileRequest is not found in the empty JSON string", CreateFileRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateFileRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateFileRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateFileRequest is not found in the empty JSON string", CreateFileRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateFileRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateFileRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateFileRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateFileRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("extension").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `extension` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extension").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `extension` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extension").toString())); } + // validate the required field `mimeType` + MIMEType.validateJsonElement(jsonObj.get("mimeType")); if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -293,31 +274,31 @@ public void write(JsonWriter out, CreateFileRequest value) throws IOException { @Override public CreateFileRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateFileRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateFileRequest - * @throws IOException if the JSON string is invalid with respect to CreateFileRequest - */ + /** + * Create an instance of CreateFileRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateFileRequest + * @throws IOException if the JSON string is invalid with respect to CreateFileRequest + */ public static CreateFileRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateFileRequest.class); } - /** - * Convert an instance of CreateFileRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateFileRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateFileVersionRequest.java b/src/main/java/io/github/vrchatapi/model/CreateFileVersionRequest.java index 57c73f61..ca1767c9 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateFileVersionRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateFileVersionRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,115 +47,103 @@ /** * CreateFileVersionRequest */ -@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 CreateFileVersionRequest { public static final String SERIALIZED_NAME_FILE_MD5 = "fileMd5"; @SerializedName(SERIALIZED_NAME_FILE_MD5) + @javax.annotation.Nullable private String fileMd5; public static final String SERIALIZED_NAME_FILE_SIZE_IN_BYTES = "fileSizeInBytes"; @SerializedName(SERIALIZED_NAME_FILE_SIZE_IN_BYTES) + @javax.annotation.Nullable private Integer fileSizeInBytes; public static final String SERIALIZED_NAME_SIGNATURE_MD5 = "signatureMd5"; @SerializedName(SERIALIZED_NAME_SIGNATURE_MD5) + @javax.annotation.Nonnull private String signatureMd5; public static final String SERIALIZED_NAME_SIGNATURE_SIZE_IN_BYTES = "signatureSizeInBytes"; @SerializedName(SERIALIZED_NAME_SIGNATURE_SIZE_IN_BYTES) + @javax.annotation.Nonnull private Integer signatureSizeInBytes; public CreateFileVersionRequest() { } - public CreateFileVersionRequest fileMd5(String fileMd5) { - + public CreateFileVersionRequest fileMd5(@javax.annotation.Nullable String fileMd5) { this.fileMd5 = fileMd5; return this; } - /** + /** * Get fileMd5 * @return fileMd5 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getFileMd5() { return fileMd5; } - - public void setFileMd5(String fileMd5) { + public void setFileMd5(@javax.annotation.Nullable String fileMd5) { this.fileMd5 = fileMd5; } - public CreateFileVersionRequest fileSizeInBytes(Integer fileSizeInBytes) { - + public CreateFileVersionRequest fileSizeInBytes(@javax.annotation.Nullable Integer fileSizeInBytes) { this.fileSizeInBytes = fileSizeInBytes; return this; } - /** + /** * Get fileSizeInBytes * @return fileSizeInBytes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getFileSizeInBytes() { return fileSizeInBytes; } - - public void setFileSizeInBytes(Integer fileSizeInBytes) { + public void setFileSizeInBytes(@javax.annotation.Nullable Integer fileSizeInBytes) { this.fileSizeInBytes = fileSizeInBytes; } - public CreateFileVersionRequest signatureMd5(String signatureMd5) { - + public CreateFileVersionRequest signatureMd5(@javax.annotation.Nonnull String signatureMd5) { this.signatureMd5 = signatureMd5; return this; } - /** + /** * Get signatureMd5 * @return signatureMd5 - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSignatureMd5() { return signatureMd5; } - - public void setSignatureMd5(String signatureMd5) { + public void setSignatureMd5(@javax.annotation.Nonnull String signatureMd5) { this.signatureMd5 = signatureMd5; } - public CreateFileVersionRequest signatureSizeInBytes(Integer signatureSizeInBytes) { - + public CreateFileVersionRequest signatureSizeInBytes(@javax.annotation.Nonnull Integer signatureSizeInBytes) { this.signatureSizeInBytes = signatureSizeInBytes; return this; } - /** + /** * Get signatureSizeInBytes * @return signatureSizeInBytes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getSignatureSizeInBytes() { return signatureSizeInBytes; } - - public void setSignatureSizeInBytes(Integer signatureSizeInBytes) { + public void setSignatureSizeInBytes(@javax.annotation.Nonnull Integer signatureSizeInBytes) { this.signatureSizeInBytes = signatureSizeInBytes; } @@ -198,10 +186,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -210,50 +195,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fileMd5"); - openapiFields.add("fileSizeInBytes"); - openapiFields.add("signatureMd5"); - openapiFields.add("signatureSizeInBytes"); + openapiFields = new HashSet(Arrays.asList("fileMd5", "fileSizeInBytes", "signatureMd5", "signatureSizeInBytes")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("signatureMd5"); - openapiRequiredFields.add("signatureSizeInBytes"); + openapiRequiredFields = new HashSet(Arrays.asList("signatureMd5", "signatureSizeInBytes")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateFileVersionRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateFileVersionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateFileVersionRequest is not found in the empty JSON string", CreateFileVersionRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateFileVersionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateFileVersionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateFileVersionRequest is not found in the empty JSON string", CreateFileVersionRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateFileVersionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateFileVersionRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateFileVersionRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateFileVersionRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fileMd5") != null && !jsonObj.get("fileMd5").isJsonNull()) && !jsonObj.get("fileMd5").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileMd5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileMd5").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileMd5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileMd5").toString())); } if (!jsonObj.get("signatureMd5").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signatureMd5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signatureMd5").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `signatureMd5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signatureMd5").toString())); } } @@ -277,31 +257,31 @@ public void write(JsonWriter out, CreateFileVersionRequest value) throws IOExcep @Override public CreateFileVersionRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateFileVersionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateFileVersionRequest - * @throws IOException if the JSON string is invalid with respect to CreateFileVersionRequest - */ + /** + * Create an instance of CreateFileVersionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateFileVersionRequest + * @throws IOException if the JSON string is invalid with respect to CreateFileVersionRequest + */ public static CreateFileVersionRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateFileVersionRequest.class); } - /** - * Convert an instance of CreateFileVersionRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateFileVersionRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateGroupAnnouncementRequest.java b/src/main/java/io/github/vrchatapi/model/CreateGroupAnnouncementRequest.java index f20d2ec3..53ec20a7 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateGroupAnnouncementRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupAnnouncementRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,115 +47,103 @@ /** * CreateGroupAnnouncementRequest */ -@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 CreateGroupAnnouncementRequest { public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nullable private String imageId; public static final String SERIALIZED_NAME_SEND_NOTIFICATION = "sendNotification"; @SerializedName(SERIALIZED_NAME_SEND_NOTIFICATION) + @javax.annotation.Nullable private Boolean sendNotification = false; public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) + @javax.annotation.Nullable private String text; public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nonnull private String title; public CreateGroupAnnouncementRequest() { } - public CreateGroupAnnouncementRequest imageId(String imageId) { - + public CreateGroupAnnouncementRequest imageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; } - public CreateGroupAnnouncementRequest sendNotification(Boolean sendNotification) { - + public CreateGroupAnnouncementRequest sendNotification(@javax.annotation.Nullable Boolean sendNotification) { this.sendNotification = sendNotification; return this; } - /** + /** * Send notification to group members. * @return sendNotification - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "Send notification to group members.") - public Boolean getSendNotification() { return sendNotification; } - - public void setSendNotification(Boolean sendNotification) { + public void setSendNotification(@javax.annotation.Nullable Boolean sendNotification) { this.sendNotification = sendNotification; } - public CreateGroupAnnouncementRequest text(String text) { - + public CreateGroupAnnouncementRequest text(@javax.annotation.Nullable String text) { this.text = text; return this; } - /** + /** * Announcement text * @return text - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Come join us for the event!", value = "Announcement text") - public String getText() { return text; } - - public void setText(String text) { + public void setText(@javax.annotation.Nullable String text) { this.text = text; } - public CreateGroupAnnouncementRequest title(String title) { - + public CreateGroupAnnouncementRequest title(@javax.annotation.Nonnull String title) { this.title = title; return this; } - /** + /** * Announcement title * @return title - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Event is starting soon!", required = true, value = "Announcement title") - public String getTitle() { return title; } - - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nonnull String title) { this.title = title; } @@ -198,10 +186,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -210,52 +195,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("imageId"); - openapiFields.add("sendNotification"); - openapiFields.add("text"); - openapiFields.add("title"); + openapiFields = new HashSet(Arrays.asList("imageId", "sendNotification", "text", "title")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("title"); + openapiRequiredFields = new HashSet(Arrays.asList("title")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateGroupAnnouncementRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateGroupAnnouncementRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateGroupAnnouncementRequest is not found in the empty JSON string", CreateGroupAnnouncementRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateGroupAnnouncementRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateGroupAnnouncementRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateGroupAnnouncementRequest is not found in the empty JSON string", CreateGroupAnnouncementRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateGroupAnnouncementRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateGroupAnnouncementRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateGroupAnnouncementRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateGroupAnnouncementRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } } @@ -279,31 +260,31 @@ public void write(JsonWriter out, CreateGroupAnnouncementRequest value) throws I @Override public CreateGroupAnnouncementRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateGroupAnnouncementRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateGroupAnnouncementRequest - * @throws IOException if the JSON string is invalid with respect to CreateGroupAnnouncementRequest - */ + /** + * Create an instance of CreateGroupAnnouncementRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateGroupAnnouncementRequest + * @throws IOException if the JSON string is invalid with respect to CreateGroupAnnouncementRequest + */ public static CreateGroupAnnouncementRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateGroupAnnouncementRequest.class); } - /** - * Convert an instance of CreateGroupAnnouncementRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateGroupAnnouncementRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateGroupGalleryRequest.java b/src/main/java/io/github/vrchatapi/model/CreateGroupGalleryRequest.java index ed94269c..00b98deb 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateGroupGalleryRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupGalleryRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,110 +50,104 @@ /** * CreateGroupGalleryRequest */ -@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 CreateGroupGalleryRequest { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_MEMBERS_ONLY = "membersOnly"; @SerializedName(SERIALIZED_NAME_MEMBERS_ONLY) + @javax.annotation.Nullable private Boolean membersOnly = false; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_ROLE_IDS_TO_AUTO_APPROVE = "roleIdsToAutoApprove"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_AUTO_APPROVE) - private List roleIdsToAutoApprove = null; + @javax.annotation.Nullable + private List roleIdsToAutoApprove; public static final String SERIALIZED_NAME_ROLE_IDS_TO_MANAGE = "roleIdsToManage"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_MANAGE) - private List roleIdsToManage = null; + @javax.annotation.Nullable + private List roleIdsToManage; public static final String SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT = "roleIdsToSubmit"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT) - private List roleIdsToSubmit = null; + @javax.annotation.Nullable + private List roleIdsToSubmit; public static final String SERIALIZED_NAME_ROLE_IDS_TO_VIEW = "roleIdsToView"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_VIEW) - private List roleIdsToView = null; + @javax.annotation.Nullable + private List roleIdsToView; public CreateGroupGalleryRequest() { } - public CreateGroupGalleryRequest description(String description) { - + public CreateGroupGalleryRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Description of the gallery. * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Example Description", value = "Description of the gallery.") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public CreateGroupGalleryRequest membersOnly(Boolean membersOnly) { - + public CreateGroupGalleryRequest membersOnly(@javax.annotation.Nullable Boolean membersOnly) { this.membersOnly = membersOnly; return this; } - /** + /** * Whether the gallery is members only. * @return membersOnly - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "Whether the gallery is members only.") - public Boolean getMembersOnly() { return membersOnly; } - - public void setMembersOnly(Boolean membersOnly) { + public void setMembersOnly(@javax.annotation.Nullable Boolean membersOnly) { this.membersOnly = membersOnly; } - public CreateGroupGalleryRequest name(String name) { - + public CreateGroupGalleryRequest name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Name of the gallery. * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Example Gallery", required = true, value = "Name of the gallery.") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public CreateGroupGalleryRequest roleIdsToAutoApprove(List roleIdsToAutoApprove) { - + public CreateGroupGalleryRequest roleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { this.roleIdsToAutoApprove = roleIdsToAutoApprove; return this; } @@ -166,25 +160,21 @@ public CreateGroupGalleryRequest addRoleIdsToAutoApproveItem(String roleIdsToAut return this; } - /** + /** * * @return roleIdsToAutoApprove - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToAutoApprove() { return roleIdsToAutoApprove; } - - public void setRoleIdsToAutoApprove(List roleIdsToAutoApprove) { + public void setRoleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { this.roleIdsToAutoApprove = roleIdsToAutoApprove; } - public CreateGroupGalleryRequest roleIdsToManage(List roleIdsToManage) { - + public CreateGroupGalleryRequest roleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { this.roleIdsToManage = roleIdsToManage; return this; } @@ -197,25 +187,21 @@ public CreateGroupGalleryRequest addRoleIdsToManageItem(String roleIdsToManageIt return this; } - /** + /** * * @return roleIdsToManage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToManage() { return roleIdsToManage; } - - public void setRoleIdsToManage(List roleIdsToManage) { + public void setRoleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { this.roleIdsToManage = roleIdsToManage; } - public CreateGroupGalleryRequest roleIdsToSubmit(List roleIdsToSubmit) { - + public CreateGroupGalleryRequest roleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { this.roleIdsToSubmit = roleIdsToSubmit; return this; } @@ -228,25 +214,21 @@ public CreateGroupGalleryRequest addRoleIdsToSubmitItem(String roleIdsToSubmitIt return this; } - /** + /** * * @return roleIdsToSubmit - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToSubmit() { return roleIdsToSubmit; } - - public void setRoleIdsToSubmit(List roleIdsToSubmit) { + public void setRoleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { this.roleIdsToSubmit = roleIdsToSubmit; } - public CreateGroupGalleryRequest roleIdsToView(List roleIdsToView) { - + public CreateGroupGalleryRequest roleIdsToView(@javax.annotation.Nullable List roleIdsToView) { this.roleIdsToView = roleIdsToView; return this; } @@ -259,19 +241,16 @@ public CreateGroupGalleryRequest addRoleIdsToViewItem(String roleIdsToViewItem) return this; } - /** + /** * * @return roleIdsToView - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToView() { return roleIdsToView; } - - public void setRoleIdsToView(List roleIdsToView) { + public void setRoleIdsToView(@javax.annotation.Nullable List roleIdsToView) { this.roleIdsToView = roleIdsToView; } @@ -331,10 +310,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -343,68 +319,61 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("membersOnly"); - openapiFields.add("name"); - openapiFields.add("roleIdsToAutoApprove"); - openapiFields.add("roleIdsToManage"); - openapiFields.add("roleIdsToSubmit"); - openapiFields.add("roleIdsToView"); + openapiFields = new HashSet(Arrays.asList("description", "membersOnly", "name", "roleIdsToAutoApprove", "roleIdsToManage", "roleIdsToSubmit", "roleIdsToView")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateGroupGalleryRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateGroupGalleryRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateGroupGalleryRequest is not found in the empty JSON string", CreateGroupGalleryRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("name")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateGroupGalleryRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateGroupGalleryRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateGroupGalleryRequest is not found in the empty JSON string", CreateGroupGalleryRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateGroupGalleryRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateGroupGalleryRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateGroupGalleryRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateGroupGalleryRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToAutoApprove") != null && !jsonObj.get("roleIdsToAutoApprove").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToAutoApprove` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToAutoApprove").toString())); + if (jsonObj.get("roleIdsToAutoApprove") != null && !jsonObj.get("roleIdsToAutoApprove").isJsonNull() && !jsonObj.get("roleIdsToAutoApprove").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToAutoApprove` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToAutoApprove").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToManage") != null && !jsonObj.get("roleIdsToManage").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToManage` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToManage").toString())); + if (jsonObj.get("roleIdsToManage") != null && !jsonObj.get("roleIdsToManage").isJsonNull() && !jsonObj.get("roleIdsToManage").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToManage` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToManage").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToSubmit") != null && !jsonObj.get("roleIdsToSubmit").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToSubmit` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToSubmit").toString())); + if (jsonObj.get("roleIdsToSubmit") != null && !jsonObj.get("roleIdsToSubmit").isJsonNull() && !jsonObj.get("roleIdsToSubmit").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToSubmit` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToSubmit").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToView") != null && !jsonObj.get("roleIdsToView").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToView` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToView").toString())); + if (jsonObj.get("roleIdsToView") != null && !jsonObj.get("roleIdsToView").isJsonNull() && !jsonObj.get("roleIdsToView").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToView` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToView").toString())); } } @@ -428,31 +397,31 @@ public void write(JsonWriter out, CreateGroupGalleryRequest value) throws IOExce @Override public CreateGroupGalleryRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateGroupGalleryRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateGroupGalleryRequest - * @throws IOException if the JSON string is invalid with respect to CreateGroupGalleryRequest - */ + /** + * Create an instance of CreateGroupGalleryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateGroupGalleryRequest + * @throws IOException if the JSON string is invalid with respect to CreateGroupGalleryRequest + */ public static CreateGroupGalleryRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateGroupGalleryRequest.class); } - /** - * Convert an instance of CreateGroupGalleryRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateGroupGalleryRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateGroupInviteRequest.java b/src/main/java/io/github/vrchatapi/model/CreateGroupInviteRequest.java index 6c73bf05..7a472c97 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateGroupInviteRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupInviteRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * CreateGroupInviteRequest */ -@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 CreateGroupInviteRequest { public static final String SERIALIZED_NAME_CONFIRM_OVERRIDE_BLOCK = "confirmOverrideBlock"; @SerializedName(SERIALIZED_NAME_CONFIRM_OVERRIDE_BLOCK) + @javax.annotation.Nullable private Boolean confirmOverrideBlock = true; public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nonnull private String userId; public CreateGroupInviteRequest() { } - public CreateGroupInviteRequest confirmOverrideBlock(Boolean confirmOverrideBlock) { - + public CreateGroupInviteRequest confirmOverrideBlock(@javax.annotation.Nullable Boolean confirmOverrideBlock) { this.confirmOverrideBlock = confirmOverrideBlock; return this; } - /** + /** * Get confirmOverrideBlock * @return confirmOverrideBlock - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getConfirmOverrideBlock() { return confirmOverrideBlock; } - - public void setConfirmOverrideBlock(Boolean confirmOverrideBlock) { + public void setConfirmOverrideBlock(@javax.annotation.Nullable Boolean confirmOverrideBlock) { this.confirmOverrideBlock = confirmOverrideBlock; } - public CreateGroupInviteRequest userId(String userId) { - + public CreateGroupInviteRequest userId(@javax.annotation.Nonnull String userId) { this.userId = userId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return userId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getUserId() { return userId; } - - public void setUserId(String userId) { + public void setUserId(@javax.annotation.Nonnull String userId) { this.userId = userId; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,44 +143,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("confirmOverrideBlock"); - openapiFields.add("userId"); + openapiFields = new HashSet(Arrays.asList("confirmOverrideBlock", "userId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("userId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateGroupInviteRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateGroupInviteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateGroupInviteRequest is not found in the empty JSON string", CreateGroupInviteRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("userId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateGroupInviteRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateGroupInviteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateGroupInviteRequest is not found in the empty JSON string", CreateGroupInviteRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateGroupInviteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateGroupInviteRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateGroupInviteRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateGroupInviteRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("userId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); } } @@ -213,31 +202,31 @@ public void write(JsonWriter out, CreateGroupInviteRequest value) throws IOExcep @Override public CreateGroupInviteRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateGroupInviteRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateGroupInviteRequest - * @throws IOException if the JSON string is invalid with respect to CreateGroupInviteRequest - */ + /** + * Create an instance of CreateGroupInviteRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateGroupInviteRequest + * @throws IOException if the JSON string is invalid with respect to CreateGroupInviteRequest + */ public static CreateGroupInviteRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateGroupInviteRequest.class); } - /** - * Convert an instance of CreateGroupInviteRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateGroupInviteRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateGroupPostRequest.java b/src/main/java/io/github/vrchatapi/model/CreateGroupPostRequest.java index 539f86f9..fe1d28a8 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateGroupPostRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupPostRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupPostVisibility; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,60 +50,61 @@ /** * CreateGroupPostRequest */ -@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 CreateGroupPostRequest { public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nullable private String imageId; public static final String SERIALIZED_NAME_ROLE_IDS = "roleIds"; @SerializedName(SERIALIZED_NAME_ROLE_IDS) - private List roleIds = null; + @javax.annotation.Nullable + private List roleIds = new ArrayList<>(); public static final String SERIALIZED_NAME_SEND_NOTIFICATION = "sendNotification"; @SerializedName(SERIALIZED_NAME_SEND_NOTIFICATION) + @javax.annotation.Nonnull private Boolean sendNotification = false; public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) + @javax.annotation.Nonnull private String text; public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nonnull private String title; public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nonnull private GroupPostVisibility visibility; public CreateGroupPostRequest() { } - public CreateGroupPostRequest imageId(String imageId) { - + public CreateGroupPostRequest imageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; } - public CreateGroupPostRequest roleIds(List roleIds) { - + public CreateGroupPostRequest roleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; return this; } @@ -116,111 +117,92 @@ public CreateGroupPostRequest addRoleIdsItem(String roleIdsItem) { return this; } - /** + /** * * @return roleIds - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIds() { return roleIds; } - - public void setRoleIds(List roleIds) { + public void setRoleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; } - public CreateGroupPostRequest sendNotification(Boolean sendNotification) { - + public CreateGroupPostRequest sendNotification(@javax.annotation.Nonnull Boolean sendNotification) { this.sendNotification = sendNotification; return this; } - /** + /** * Send notification to group members. * @return sendNotification - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "false", required = true, value = "Send notification to group members.") - public Boolean getSendNotification() { return sendNotification; } - - public void setSendNotification(Boolean sendNotification) { + public void setSendNotification(@javax.annotation.Nonnull Boolean sendNotification) { this.sendNotification = sendNotification; } - public CreateGroupPostRequest text(String text) { - + public CreateGroupPostRequest text(@javax.annotation.Nonnull String text) { this.text = text; return this; } - /** + /** * Post text * @return text - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Come join us for the event!", required = true, value = "Post text") - public String getText() { return text; } - - public void setText(String text) { + public void setText(@javax.annotation.Nonnull String text) { this.text = text; } - public CreateGroupPostRequest title(String title) { - + public CreateGroupPostRequest title(@javax.annotation.Nonnull String title) { this.title = title; return this; } - /** + /** * Post title * @return title - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Event is starting soon!", required = true, value = "Post title") - public String getTitle() { return title; } - - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nonnull String title) { this.title = title; } - public CreateGroupPostRequest visibility(GroupPostVisibility visibility) { - + public CreateGroupPostRequest visibility(@javax.annotation.Nonnull GroupPostVisibility visibility) { this.visibility = visibility; return this; } - /** + /** * Get visibility * @return visibility - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public GroupPostVisibility getVisibility() { return visibility; } - - public void setVisibility(GroupPostVisibility visibility) { + public void setVisibility(@javax.annotation.Nonnull GroupPostVisibility visibility) { this.visibility = visibility; } @@ -267,10 +249,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -279,62 +258,55 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("imageId"); - openapiFields.add("roleIds"); - openapiFields.add("sendNotification"); - openapiFields.add("text"); - openapiFields.add("title"); - openapiFields.add("visibility"); + openapiFields = new HashSet(Arrays.asList("imageId", "roleIds", "sendNotification", "text", "title", "visibility")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("sendNotification"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("title"); - openapiRequiredFields.add("visibility"); + openapiRequiredFields = new HashSet(Arrays.asList("sendNotification", "text", "title", "visibility")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateGroupPostRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateGroupPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateGroupPostRequest is not found in the empty JSON string", CreateGroupPostRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateGroupPostRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateGroupPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateGroupPostRequest is not found in the empty JSON string", CreateGroupPostRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateGroupPostRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateGroupPostRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateGroupPostRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateGroupPostRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); + if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonNull() && !jsonObj.get("roleIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); } if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } + // validate the required field `visibility` + GroupPostVisibility.validateJsonElement(jsonObj.get("visibility")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -357,31 +329,31 @@ public void write(JsonWriter out, CreateGroupPostRequest value) throws IOExcepti @Override public CreateGroupPostRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateGroupPostRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateGroupPostRequest - * @throws IOException if the JSON string is invalid with respect to CreateGroupPostRequest - */ + /** + * Create an instance of CreateGroupPostRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateGroupPostRequest + * @throws IOException if the JSON string is invalid with respect to CreateGroupPostRequest + */ public static CreateGroupPostRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateGroupPostRequest.class); } - /** - * Convert an instance of CreateGroupPostRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateGroupPostRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateGroupRequest.java b/src/main/java/io/github/vrchatapi/model/CreateGroupRequest.java index 4bc19c9b..7a8bc131 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateGroupRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,9 +21,8 @@ import io.github.vrchatapi.model.GroupJoinState; import io.github.vrchatapi.model.GroupPrivacy; import io.github.vrchatapi.model.GroupRoleTemplate; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,223 +51,199 @@ /** * CreateGroupRequest */ -@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 CreateGroupRequest { public static final String SERIALIZED_NAME_BANNER_ID = "bannerId"; @SerializedName(SERIALIZED_NAME_BANNER_ID) + @javax.annotation.Nullable private String bannerId; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_ICON_ID = "iconId"; @SerializedName(SERIALIZED_NAME_ICON_ID) + @javax.annotation.Nullable private String iconId; public static final String SERIALIZED_NAME_JOIN_STATE = "joinState"; @SerializedName(SERIALIZED_NAME_JOIN_STATE) + @javax.annotation.Nullable private GroupJoinState joinState = GroupJoinState.OPEN; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_PRIVACY = "privacy"; @SerializedName(SERIALIZED_NAME_PRIVACY) + @javax.annotation.Nullable private GroupPrivacy privacy = GroupPrivacy.DEFAULT; public static final String SERIALIZED_NAME_ROLE_TEMPLATE = "roleTemplate"; @SerializedName(SERIALIZED_NAME_ROLE_TEMPLATE) + @javax.annotation.Nonnull private GroupRoleTemplate roleTemplate = GroupRoleTemplate.DEFAULT; public static final String SERIALIZED_NAME_SHORT_CODE = "shortCode"; @SerializedName(SERIALIZED_NAME_SHORT_CODE) + @javax.annotation.Nonnull private String shortCode; public CreateGroupRequest() { } - public CreateGroupRequest bannerId(String bannerId) { - + public CreateGroupRequest bannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; return this; } - /** + /** * Get bannerId * @return bannerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBannerId() { return bannerId; } - - public void setBannerId(String bannerId) { + public void setBannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; } - public CreateGroupRequest description(String description) { - + public CreateGroupRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public CreateGroupRequest iconId(String iconId) { - + public CreateGroupRequest iconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; return this; } - /** + /** * Get iconId * @return iconId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIconId() { return iconId; } - - public void setIconId(String iconId) { + public void setIconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; } - public CreateGroupRequest joinState(GroupJoinState joinState) { - + public CreateGroupRequest joinState(@javax.annotation.Nullable GroupJoinState joinState) { this.joinState = joinState; return this; } - /** + /** * Get joinState * @return joinState - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupJoinState getJoinState() { return joinState; } - - public void setJoinState(GroupJoinState joinState) { + public void setJoinState(@javax.annotation.Nullable GroupJoinState joinState) { this.joinState = joinState; } - public CreateGroupRequest name(String name) { - + public CreateGroupRequest name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public CreateGroupRequest privacy(GroupPrivacy privacy) { - + public CreateGroupRequest privacy(@javax.annotation.Nullable GroupPrivacy privacy) { this.privacy = privacy; return this; } - /** + /** * Get privacy * @return privacy - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupPrivacy getPrivacy() { return privacy; } - - public void setPrivacy(GroupPrivacy privacy) { + public void setPrivacy(@javax.annotation.Nullable GroupPrivacy privacy) { this.privacy = privacy; } - public CreateGroupRequest roleTemplate(GroupRoleTemplate roleTemplate) { - + public CreateGroupRequest roleTemplate(@javax.annotation.Nonnull GroupRoleTemplate roleTemplate) { this.roleTemplate = roleTemplate; return this; } - /** + /** * Get roleTemplate * @return roleTemplate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public GroupRoleTemplate getRoleTemplate() { return roleTemplate; } - - public void setRoleTemplate(GroupRoleTemplate roleTemplate) { + public void setRoleTemplate(@javax.annotation.Nonnull GroupRoleTemplate roleTemplate) { this.roleTemplate = roleTemplate; } - public CreateGroupRequest shortCode(String shortCode) { - + public CreateGroupRequest shortCode(@javax.annotation.Nonnull String shortCode) { this.shortCode = shortCode; return this; } - /** + /** * Get shortCode * @return shortCode - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getShortCode() { return shortCode; } - - public void setShortCode(String shortCode) { + public void setShortCode(@javax.annotation.Nonnull String shortCode) { this.shortCode = shortCode; } @@ -329,10 +305,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -341,64 +314,64 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bannerId"); - openapiFields.add("description"); - openapiFields.add("iconId"); - openapiFields.add("joinState"); - openapiFields.add("name"); - openapiFields.add("privacy"); - openapiFields.add("roleTemplate"); - openapiFields.add("shortCode"); + openapiFields = new HashSet(Arrays.asList("bannerId", "description", "iconId", "joinState", "name", "privacy", "roleTemplate", "shortCode")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("roleTemplate"); - openapiRequiredFields.add("shortCode"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateGroupRequest is not found in the empty JSON string", CreateGroupRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("name", "roleTemplate", "shortCode")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateGroupRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateGroupRequest is not found in the empty JSON string", CreateGroupRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateGroupRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateGroupRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateGroupRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("bannerId") != null && !jsonObj.get("bannerId").isJsonNull()) && !jsonObj.get("bannerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("iconId") != null && !jsonObj.get("iconId").isJsonNull()) && !jsonObj.get("iconId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); + } + // validate the optional field `joinState` + if (jsonObj.get("joinState") != null && !jsonObj.get("joinState").isJsonNull()) { + GroupJoinState.validateJsonElement(jsonObj.get("joinState")); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } + // validate the optional field `privacy` + if (jsonObj.get("privacy") != null && !jsonObj.get("privacy").isJsonNull()) { + GroupPrivacy.validateJsonElement(jsonObj.get("privacy")); + } + // validate the required field `roleTemplate` + GroupRoleTemplate.validateJsonElement(jsonObj.get("roleTemplate")); if (!jsonObj.get("shortCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); } } @@ -422,31 +395,31 @@ public void write(JsonWriter out, CreateGroupRequest value) throws IOException { @Override public CreateGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateGroupRequest - * @throws IOException if the JSON string is invalid with respect to CreateGroupRequest - */ + /** + * Create an instance of CreateGroupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateGroupRequest + * @throws IOException if the JSON string is invalid with respect to CreateGroupRequest + */ public static CreateGroupRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateGroupRequest.class); } - /** - * Convert an instance of CreateGroupRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateGroupRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateGroupRoleRequest.java b/src/main/java/io/github/vrchatapi/model/CreateGroupRoleRequest.java index 189f9634..f417183d 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateGroupRoleRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupRoleRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupPermissions; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,125 +50,113 @@ /** * CreateGroupRoleRequest */ -@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 CreateGroupRoleRequest { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IS_SELF_ASSIGNABLE = "isSelfAssignable"; @SerializedName(SERIALIZED_NAME_IS_SELF_ASSIGNABLE) + @javax.annotation.Nullable private Boolean isSelfAssignable = false; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; @SerializedName(SERIALIZED_NAME_PERMISSIONS) - private List permissions = null; + @javax.annotation.Nullable + private List permissions = new ArrayList<>(); public CreateGroupRoleRequest() { } - public CreateGroupRoleRequest description(String description) { - + public CreateGroupRoleRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public CreateGroupRoleRequest id(String id) { - + public CreateGroupRoleRequest id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public CreateGroupRoleRequest isSelfAssignable(Boolean isSelfAssignable) { - + public CreateGroupRoleRequest isSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { this.isSelfAssignable = isSelfAssignable; return this; } - /** + /** * Get isSelfAssignable * @return isSelfAssignable - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsSelfAssignable() { return isSelfAssignable; } - - public void setIsSelfAssignable(Boolean isSelfAssignable) { + public void setIsSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { this.isSelfAssignable = isSelfAssignable; } - public CreateGroupRoleRequest name(String name) { - + public CreateGroupRoleRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public CreateGroupRoleRequest permissions(List permissions) { - + public CreateGroupRoleRequest permissions(@javax.annotation.Nullable List permissions) { this.permissions = permissions; return this; } @@ -181,19 +169,16 @@ public CreateGroupRoleRequest addPermissionsItem(GroupPermissions permissionsIte return this; } - /** + /** * Get permissions * @return permissions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getPermissions() { return permissions; } - - public void setPermissions(List permissions) { + public void setPermissions(@javax.annotation.Nullable List permissions) { this.permissions = permissions; } @@ -238,10 +223,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -250,49 +232,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("isSelfAssignable"); - openapiFields.add("name"); - openapiFields.add("permissions"); + openapiFields = new HashSet(Arrays.asList("description", "id", "isSelfAssignable", "name", "permissions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateGroupRoleRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateGroupRoleRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateGroupRoleRequest is not found in the empty JSON string", CreateGroupRoleRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateGroupRoleRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateGroupRoleRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateGroupRoleRequest is not found in the empty JSON string", CreateGroupRoleRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateGroupRoleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateGroupRoleRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateGroupRoleRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); + if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull() && !jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); } } @@ -316,31 +294,31 @@ public void write(JsonWriter out, CreateGroupRoleRequest value) throws IOExcepti @Override public CreateGroupRoleRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateGroupRoleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateGroupRoleRequest - * @throws IOException if the JSON string is invalid with respect to CreateGroupRoleRequest - */ + /** + * Create an instance of CreateGroupRoleRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateGroupRoleRequest + * @throws IOException if the JSON string is invalid with respect to CreateGroupRoleRequest + */ public static CreateGroupRoleRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateGroupRoleRequest.class); } - /** - * Convert an instance of CreateGroupRoleRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateGroupRoleRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateInstanceRequest.java b/src/main/java/io/github/vrchatapi/model/CreateInstanceRequest.java index ddb90dff..ff7809db 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateInstanceRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateInstanceRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,11 +22,10 @@ import io.github.vrchatapi.model.InstanceContentSettings; import io.github.vrchatapi.model.InstanceRegion; import io.github.vrchatapi.model.InstanceType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -41,13 +39,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -55,403 +55,363 @@ /** * CreateInstanceRequest */ -@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 CreateInstanceRequest { public static final String SERIALIZED_NAME_AGE_GATE = "ageGate"; @SerializedName(SERIALIZED_NAME_AGE_GATE) + @javax.annotation.Nullable private Boolean ageGate = false; public static final String SERIALIZED_NAME_CALENDAR_ENTRY_ID = "calendarEntryId"; @SerializedName(SERIALIZED_NAME_CALENDAR_ENTRY_ID) + @javax.annotation.Nullable private String calendarEntryId; public static final String SERIALIZED_NAME_CAN_REQUEST_INVITE = "canRequestInvite"; @SerializedName(SERIALIZED_NAME_CAN_REQUEST_INVITE) + @javax.annotation.Nullable private Boolean canRequestInvite = false; public static final String SERIALIZED_NAME_CLOSED_AT = "closedAt"; @SerializedName(SERIALIZED_NAME_CLOSED_AT) + @javax.annotation.Nullable private OffsetDateTime closedAt; public static final String SERIALIZED_NAME_CONTENT_SETTINGS = "contentSettings"; @SerializedName(SERIALIZED_NAME_CONTENT_SETTINGS) + @javax.annotation.Nullable private InstanceContentSettings contentSettings; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable private String displayName; public static final String SERIALIZED_NAME_GROUP_ACCESS_TYPE = "groupAccessType"; @SerializedName(SERIALIZED_NAME_GROUP_ACCESS_TYPE) + @javax.annotation.Nullable private GroupAccessType groupAccessType = GroupAccessType.MEMBERS; public static final String SERIALIZED_NAME_HARD_CLOSE = "hardClose"; @SerializedName(SERIALIZED_NAME_HARD_CLOSE) + @javax.annotation.Nullable private Boolean hardClose = false; public static final String SERIALIZED_NAME_INSTANCE_PERSISTENCE_ENABLED = "instancePersistenceEnabled"; @SerializedName(SERIALIZED_NAME_INSTANCE_PERSISTENCE_ENABLED) + @javax.annotation.Nullable private Boolean instancePersistenceEnabled; public static final String SERIALIZED_NAME_INVITE_ONLY = "inviteOnly"; @SerializedName(SERIALIZED_NAME_INVITE_ONLY) + @javax.annotation.Nullable private Boolean inviteOnly = false; public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable private String ownerId; public static final String SERIALIZED_NAME_PLAYER_PERSISTENCE_ENABLED = "playerPersistenceEnabled"; @SerializedName(SERIALIZED_NAME_PLAYER_PERSISTENCE_ENABLED) + @javax.annotation.Nullable private Boolean playerPersistenceEnabled; public static final String SERIALIZED_NAME_QUEUE_ENABLED = "queueEnabled"; @SerializedName(SERIALIZED_NAME_QUEUE_ENABLED) + @javax.annotation.Nullable private Boolean queueEnabled = false; public static final String SERIALIZED_NAME_REGION = "region"; @SerializedName(SERIALIZED_NAME_REGION) + @javax.annotation.Nonnull private InstanceRegion region = InstanceRegion.US; public static final String SERIALIZED_NAME_ROLE_IDS = "roleIds"; @SerializedName(SERIALIZED_NAME_ROLE_IDS) - private List roleIds = null; + @javax.annotation.Nullable + private List roleIds = new ArrayList<>(); public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private InstanceType type; public static final String SERIALIZED_NAME_WORLD_ID = "worldId"; @SerializedName(SERIALIZED_NAME_WORLD_ID) + @javax.annotation.Nonnull private String worldId; public CreateInstanceRequest() { } - public CreateInstanceRequest ageGate(Boolean ageGate) { - + public CreateInstanceRequest ageGate(@javax.annotation.Nullable Boolean ageGate) { this.ageGate = ageGate; return this; } - /** + /** * Get ageGate * @return ageGate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getAgeGate() { return ageGate; } - - public void setAgeGate(Boolean ageGate) { + public void setAgeGate(@javax.annotation.Nullable Boolean ageGate) { this.ageGate = ageGate; } - public CreateInstanceRequest calendarEntryId(String calendarEntryId) { - + public CreateInstanceRequest calendarEntryId(@javax.annotation.Nullable String calendarEntryId) { this.calendarEntryId = calendarEntryId; return this; } - /** + /** * Get calendarEntryId * @return calendarEntryId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getCalendarEntryId() { return calendarEntryId; } - - public void setCalendarEntryId(String calendarEntryId) { + public void setCalendarEntryId(@javax.annotation.Nullable String calendarEntryId) { this.calendarEntryId = calendarEntryId; } - public CreateInstanceRequest canRequestInvite(Boolean canRequestInvite) { - + public CreateInstanceRequest canRequestInvite(@javax.annotation.Nullable Boolean canRequestInvite) { this.canRequestInvite = canRequestInvite; return this; } - /** + /** * Only applies to invite type instances to make them invite+ * @return canRequestInvite - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only applies to invite type instances to make them invite+") - public Boolean getCanRequestInvite() { return canRequestInvite; } - - public void setCanRequestInvite(Boolean canRequestInvite) { + public void setCanRequestInvite(@javax.annotation.Nullable Boolean canRequestInvite) { this.canRequestInvite = canRequestInvite; } - public CreateInstanceRequest closedAt(OffsetDateTime closedAt) { - + public CreateInstanceRequest closedAt(@javax.annotation.Nullable OffsetDateTime closedAt) { this.closedAt = closedAt; return this; } - /** + /** * The time after which users won't be allowed to join the instance. This doesn't work for public instances. * @return closedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The time after which users won't be allowed to join the instance. This doesn't work for public instances.") - public OffsetDateTime getClosedAt() { return closedAt; } - - public void setClosedAt(OffsetDateTime closedAt) { + public void setClosedAt(@javax.annotation.Nullable OffsetDateTime closedAt) { this.closedAt = closedAt; } - public CreateInstanceRequest contentSettings(InstanceContentSettings contentSettings) { - + public CreateInstanceRequest contentSettings(@javax.annotation.Nullable InstanceContentSettings contentSettings) { this.contentSettings = contentSettings; return this; } - /** + /** * Get contentSettings * @return contentSettings - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InstanceContentSettings getContentSettings() { return contentSettings; } - - public void setContentSettings(InstanceContentSettings contentSettings) { + public void setContentSettings(@javax.annotation.Nullable InstanceContentSettings contentSettings) { this.contentSettings = contentSettings; } - public CreateInstanceRequest displayName(String displayName) { - + public CreateInstanceRequest displayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; } - public CreateInstanceRequest groupAccessType(GroupAccessType groupAccessType) { - + public CreateInstanceRequest groupAccessType(@javax.annotation.Nullable GroupAccessType groupAccessType) { this.groupAccessType = groupAccessType; return this; } - /** + /** * Get groupAccessType * @return groupAccessType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupAccessType getGroupAccessType() { return groupAccessType; } - - public void setGroupAccessType(GroupAccessType groupAccessType) { + public void setGroupAccessType(@javax.annotation.Nullable GroupAccessType groupAccessType) { this.groupAccessType = groupAccessType; } - public CreateInstanceRequest hardClose(Boolean hardClose) { - + public CreateInstanceRequest hardClose(@javax.annotation.Nullable Boolean hardClose) { this.hardClose = hardClose; return this; } - /** + /** * Currently unused, but will eventually be a flag to set if the closing of the instance should kick people. * @return hardClose - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Currently unused, but will eventually be a flag to set if the closing of the instance should kick people.") - public Boolean getHardClose() { return hardClose; } - - public void setHardClose(Boolean hardClose) { + public void setHardClose(@javax.annotation.Nullable Boolean hardClose) { this.hardClose = hardClose; } - public CreateInstanceRequest instancePersistenceEnabled(Boolean instancePersistenceEnabled) { - + public CreateInstanceRequest instancePersistenceEnabled(@javax.annotation.Nullable Boolean instancePersistenceEnabled) { this.instancePersistenceEnabled = instancePersistenceEnabled; return this; } - /** + /** * Get instancePersistenceEnabled * @return instancePersistenceEnabled - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getInstancePersistenceEnabled() { return instancePersistenceEnabled; } - - public void setInstancePersistenceEnabled(Boolean instancePersistenceEnabled) { + public void setInstancePersistenceEnabled(@javax.annotation.Nullable Boolean instancePersistenceEnabled) { this.instancePersistenceEnabled = instancePersistenceEnabled; } - public CreateInstanceRequest inviteOnly(Boolean inviteOnly) { - + public CreateInstanceRequest inviteOnly(@javax.annotation.Nullable Boolean inviteOnly) { this.inviteOnly = inviteOnly; return this; } - /** + /** * Get inviteOnly * @return inviteOnly - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getInviteOnly() { return inviteOnly; } - - public void setInviteOnly(Boolean inviteOnly) { + public void setInviteOnly(@javax.annotation.Nullable Boolean inviteOnly) { this.inviteOnly = inviteOnly; } - public CreateInstanceRequest ownerId(String ownerId) { - + public CreateInstanceRequest ownerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; return this; } - /** + /** * A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise * @return ownerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise") - public String getOwnerId() { return ownerId; } - - public void setOwnerId(String ownerId) { + public void setOwnerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; } - public CreateInstanceRequest playerPersistenceEnabled(Boolean playerPersistenceEnabled) { - + public CreateInstanceRequest playerPersistenceEnabled(@javax.annotation.Nullable Boolean playerPersistenceEnabled) { this.playerPersistenceEnabled = playerPersistenceEnabled; return this; } - /** + /** * Get playerPersistenceEnabled * @return playerPersistenceEnabled - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getPlayerPersistenceEnabled() { return playerPersistenceEnabled; } - - public void setPlayerPersistenceEnabled(Boolean playerPersistenceEnabled) { + public void setPlayerPersistenceEnabled(@javax.annotation.Nullable Boolean playerPersistenceEnabled) { this.playerPersistenceEnabled = playerPersistenceEnabled; } - public CreateInstanceRequest queueEnabled(Boolean queueEnabled) { - + public CreateInstanceRequest queueEnabled(@javax.annotation.Nullable Boolean queueEnabled) { this.queueEnabled = queueEnabled; return this; } - /** + /** * Get queueEnabled * @return queueEnabled - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getQueueEnabled() { return queueEnabled; } - - public void setQueueEnabled(Boolean queueEnabled) { + public void setQueueEnabled(@javax.annotation.Nullable Boolean queueEnabled) { this.queueEnabled = queueEnabled; } - public CreateInstanceRequest region(InstanceRegion region) { - + public CreateInstanceRequest region(@javax.annotation.Nonnull InstanceRegion region) { this.region = region; return this; } - /** + /** * Get region * @return region - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InstanceRegion getRegion() { return region; } - - public void setRegion(InstanceRegion region) { + public void setRegion(@javax.annotation.Nonnull InstanceRegion region) { this.region = region; } - public CreateInstanceRequest roleIds(List roleIds) { - + public CreateInstanceRequest roleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; return this; } @@ -464,65 +424,54 @@ public CreateInstanceRequest addRoleIdsItem(String roleIdsItem) { return this; } - /** + /** * Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\" * @return roleIds - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\"") - public List getRoleIds() { return roleIds; } - - public void setRoleIds(List roleIds) { + public void setRoleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; } - public CreateInstanceRequest type(InstanceType type) { - + public CreateInstanceRequest type(@javax.annotation.Nonnull InstanceType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InstanceType getType() { return type; } - - public void setType(InstanceType type) { + public void setType(@javax.annotation.Nonnull InstanceType type) { this.type = type; } - public CreateInstanceRequest worldId(String worldId) { - + public CreateInstanceRequest worldId(@javax.annotation.Nonnull String worldId) { this.worldId = worldId; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return worldId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getWorldId() { return worldId; } - - public void setWorldId(String worldId) { + public void setWorldId(@javax.annotation.Nonnull String worldId) { this.worldId = worldId; } @@ -602,10 +551,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -614,78 +560,67 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ageGate"); - openapiFields.add("calendarEntryId"); - openapiFields.add("canRequestInvite"); - openapiFields.add("closedAt"); - openapiFields.add("contentSettings"); - openapiFields.add("displayName"); - openapiFields.add("groupAccessType"); - openapiFields.add("hardClose"); - openapiFields.add("instancePersistenceEnabled"); - openapiFields.add("inviteOnly"); - openapiFields.add("ownerId"); - openapiFields.add("playerPersistenceEnabled"); - openapiFields.add("queueEnabled"); - openapiFields.add("region"); - openapiFields.add("roleIds"); - openapiFields.add("type"); - openapiFields.add("worldId"); + openapiFields = new HashSet(Arrays.asList("ageGate", "calendarEntryId", "canRequestInvite", "closedAt", "contentSettings", "displayName", "groupAccessType", "hardClose", "instancePersistenceEnabled", "inviteOnly", "ownerId", "playerPersistenceEnabled", "queueEnabled", "region", "roleIds", "type", "worldId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("region"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("worldId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateInstanceRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateInstanceRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateInstanceRequest is not found in the empty JSON string", CreateInstanceRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("region", "type", "worldId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateInstanceRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateInstanceRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateInstanceRequest is not found in the empty JSON string", CreateInstanceRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateInstanceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateInstanceRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateInstanceRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateInstanceRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("calendarEntryId") != null && !jsonObj.get("calendarEntryId").isJsonNull()) && !jsonObj.get("calendarEntryId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `calendarEntryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calendarEntryId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `calendarEntryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calendarEntryId").toString())); } // validate the optional field `contentSettings` if (jsonObj.get("contentSettings") != null && !jsonObj.get("contentSettings").isJsonNull()) { - InstanceContentSettings.validateJsonObject(jsonObj.getAsJsonObject("contentSettings")); + InstanceContentSettings.validateJsonElement(jsonObj.get("contentSettings")); } if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + } + // validate the optional field `groupAccessType` + if (jsonObj.get("groupAccessType") != null && !jsonObj.get("groupAccessType").isJsonNull()) { + GroupAccessType.validateJsonElement(jsonObj.get("groupAccessType")); } if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); } + // validate the required field `region` + InstanceRegion.validateJsonElement(jsonObj.get("region")); // ensure the optional json data is an array if present - if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); + if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonNull() && !jsonObj.get("roleIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); } + // validate the required field `type` + InstanceType.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("worldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); } } @@ -709,31 +644,31 @@ public void write(JsonWriter out, CreateInstanceRequest value) throws IOExceptio @Override public CreateInstanceRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateInstanceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateInstanceRequest - * @throws IOException if the JSON string is invalid with respect to CreateInstanceRequest - */ + /** + * Create an instance of CreateInstanceRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateInstanceRequest + * @throws IOException if the JSON string is invalid with respect to CreateInstanceRequest + */ public static CreateInstanceRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateInstanceRequest.class); } - /** - * Convert an instance of CreateInstanceRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateInstanceRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateJamSubmissionRequest.java b/src/main/java/io/github/vrchatapi/model/CreateJamSubmissionRequest.java index 0ef25ffa..4230d338 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateJamSubmissionRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateJamSubmissionRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,55 @@ /** * Submit content for a Jam. Both content upload by submitter and jam submission itself must be made within the jam's designated times. */ -@ApiModel(description = "Submit content for a Jam. Both content upload by submitter and jam submission itself must be made within the jam's designated times.") -@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 CreateJamSubmissionRequest { public static final String SERIALIZED_NAME_CONTENT_ID = "contentId"; @SerializedName(SERIALIZED_NAME_CONTENT_ID) + @javax.annotation.Nonnull private String contentId; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public CreateJamSubmissionRequest() { } - public CreateJamSubmissionRequest contentId(String contentId) { - + public CreateJamSubmissionRequest contentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; return this; } - /** + /** * The id of the uploaded content (e.g., avatar, world) being submitted. * @return contentId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_c38a1615-5bf5-42b4-84eb-a8b6c37cbd11", required = true, value = "The id of the uploaded content (e.g., avatar, world) being submitted.") - public String getContentId() { return contentId; } - - public void setContentId(String contentId) { + public void setContentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; } - public CreateJamSubmissionRequest description(String description) { - + public CreateJamSubmissionRequest description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * A description of the content being submitted. * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "My awesomely unique avatar for the jam!", required = true, value = "A description of the content being submitted.") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } @@ -141,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,48 +143,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("contentId"); - openapiFields.add("description"); + openapiFields = new HashSet(Arrays.asList("contentId", "description")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("contentId"); - openapiRequiredFields.add("description"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateJamSubmissionRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateJamSubmissionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateJamSubmissionRequest is not found in the empty JSON string", CreateJamSubmissionRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("contentId", "description")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateJamSubmissionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateJamSubmissionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateJamSubmissionRequest is not found in the empty JSON string", CreateJamSubmissionRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateJamSubmissionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateJamSubmissionRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateJamSubmissionRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateJamSubmissionRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("contentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -218,31 +205,31 @@ public void write(JsonWriter out, CreateJamSubmissionRequest value) throws IOExc @Override public CreateJamSubmissionRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateJamSubmissionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateJamSubmissionRequest - * @throws IOException if the JSON string is invalid with respect to CreateJamSubmissionRequest - */ + /** + * Create an instance of CreateJamSubmissionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateJamSubmissionRequest + * @throws IOException if the JSON string is invalid with respect to CreateJamSubmissionRequest + */ public static CreateJamSubmissionRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateJamSubmissionRequest.class); } - /** - * Convert an instance of CreateJamSubmissionRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateJamSubmissionRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateListingRequest.java b/src/main/java/io/github/vrchatapi/model/CreateListingRequest.java index 0a7e0b7e..b38fb688 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateListingRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateListingRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ProductListingType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,234 +50,215 @@ /** * Observed create-listing payload fields. Additional fields may exist. */ -@ApiModel(description = "Observed create-listing payload fields. Additional fields may exist.") -@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 CreateListingRequest { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) + @javax.annotation.Nullable private Boolean active; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nonnull private String imageId; public static final String SERIALIZED_NAME_LISTING_TYPE = "listingType"; @SerializedName(SERIALIZED_NAME_LISTING_TYPE) + @javax.annotation.Nonnull private ProductListingType listingType = ProductListingType.SUBSCRIPTION; public static final String SERIALIZED_NAME_PRICE_TOKENS = "priceTokens"; @SerializedName(SERIALIZED_NAME_PRICE_TOKENS) + @javax.annotation.Nonnull private Integer priceTokens; public static final String SERIALIZED_NAME_PRODUCT_IDS = "productIds"; @SerializedName(SERIALIZED_NAME_PRODUCT_IDS) + @javax.annotation.Nonnull private List productIds = new ArrayList<>(); public static final String SERIALIZED_NAME_STORE_IDS = "storeIds"; @SerializedName(SERIALIZED_NAME_STORE_IDS) + @javax.annotation.Nonnull private List storeIds = new ArrayList<>(); public CreateListingRequest() { } - public CreateListingRequest active(Boolean active) { - + public CreateListingRequest active(@javax.annotation.Nullable Boolean active) { this.active = active; return this; } - /** + /** * Get active * @return active - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getActive() { return active; } - - public void setActive(Boolean active) { + public void setActive(@javax.annotation.Nullable Boolean active) { this.active = active; } - public CreateListingRequest description(String description) { - + public CreateListingRequest description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public CreateListingRequest displayName(String displayName) { - + public CreateListingRequest displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public CreateListingRequest imageId(String imageId) { - + public CreateListingRequest imageId(@javax.annotation.Nonnull String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", required = true, value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nonnull String imageId) { this.imageId = imageId; } - public CreateListingRequest listingType(ProductListingType listingType) { - + public CreateListingRequest listingType(@javax.annotation.Nonnull ProductListingType listingType) { this.listingType = listingType; return this; } - /** + /** * Get listingType * @return listingType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ProductListingType getListingType() { return listingType; } - - public void setListingType(ProductListingType listingType) { + public void setListingType(@javax.annotation.Nonnull ProductListingType listingType) { this.listingType = listingType; } - public CreateListingRequest priceTokens(Integer priceTokens) { - + public CreateListingRequest priceTokens(@javax.annotation.Nonnull Integer priceTokens) { this.priceTokens = priceTokens; return this; } - /** + /** * Get priceTokens * @return priceTokens - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPriceTokens() { return priceTokens; } - - public void setPriceTokens(Integer priceTokens) { + public void setPriceTokens(@javax.annotation.Nonnull Integer priceTokens) { this.priceTokens = priceTokens; } - public CreateListingRequest productIds(List productIds) { - + public CreateListingRequest productIds(@javax.annotation.Nonnull List productIds) { this.productIds = productIds; return this; } public CreateListingRequest addProductIdsItem(String productIdsItem) { + if (this.productIds == null) { + this.productIds = new ArrayList<>(); + } this.productIds.add(productIdsItem); return this; } - /** + /** * Get productIds * @return productIds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getProductIds() { return productIds; } - - public void setProductIds(List productIds) { + public void setProductIds(@javax.annotation.Nonnull List productIds) { this.productIds = productIds; } - public CreateListingRequest storeIds(List storeIds) { - + public CreateListingRequest storeIds(@javax.annotation.Nonnull List storeIds) { this.storeIds = storeIds; return this; } public CreateListingRequest addStoreIdsItem(String storeIdsItem) { + if (this.storeIds == null) { + this.storeIds = new ArrayList<>(); + } this.storeIds.add(storeIdsItem); return this; } - /** + /** * Get storeIds * @return storeIds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getStoreIds() { return storeIds; } - - public void setStoreIds(List storeIds) { + public void setStoreIds(@javax.annotation.Nonnull List storeIds) { this.storeIds = storeIds; } @@ -328,10 +309,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -340,74 +318,62 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("active"); - openapiFields.add("description"); - openapiFields.add("displayName"); - openapiFields.add("imageId"); - openapiFields.add("listingType"); - openapiFields.add("priceTokens"); - openapiFields.add("productIds"); - openapiFields.add("storeIds"); + openapiFields = new HashSet(Arrays.asList("active", "description", "displayName", "imageId", "listingType", "priceTokens", "productIds", "storeIds")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("imageId"); - openapiRequiredFields.add("listingType"); - openapiRequiredFields.add("priceTokens"); - openapiRequiredFields.add("productIds"); - openapiRequiredFields.add("storeIds"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateListingRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateListingRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateListingRequest is not found in the empty JSON string", CreateListingRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("description", "displayName", "imageId", "listingType", "priceTokens", "productIds", "storeIds")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateListingRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateListingRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateListingRequest is not found in the empty JSON string", CreateListingRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateListingRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateListingRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateListingRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateListingRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if (!jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } + // validate the required field `listingType` + ProductListingType.validateJsonElement(jsonObj.get("listingType")); // ensure the required json array is present if (jsonObj.get("productIds") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("productIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `productIds` to be an array in the JSON string but got `%s`", jsonObj.get("productIds").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `productIds` to be an array in the JSON string but got `%s`", jsonObj.get("productIds").toString())); } // ensure the required json array is present if (jsonObj.get("storeIds") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("storeIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `storeIds` to be an array in the JSON string but got `%s`", jsonObj.get("storeIds").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `storeIds` to be an array in the JSON string but got `%s`", jsonObj.get("storeIds").toString())); } } @@ -431,31 +397,31 @@ public void write(JsonWriter out, CreateListingRequest value) throws IOException @Override public CreateListingRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateListingRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateListingRequest - * @throws IOException if the JSON string is invalid with respect to CreateListingRequest - */ + /** + * Create an instance of CreateListingRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateListingRequest + * @throws IOException if the JSON string is invalid with respect to CreateListingRequest + */ public static CreateListingRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateListingRequest.class); } - /** - * Convert an instance of CreateListingRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateListingRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateProductRequest.java b/src/main/java/io/github/vrchatapi/model/CreateProductRequest.java index bd8cd111..a309af13 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateProductRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateProductRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ProductType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,174 +50,159 @@ /** * CreateProductRequest */ -@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 CreateProductRequest { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nonnull private String imageId; public static final String SERIALIZED_NAME_PRODUCT_TYPE = "productType"; @SerializedName(SERIALIZED_NAME_PRODUCT_TYPE) + @javax.annotation.Nonnull private ProductType productType = ProductType.UDON; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_USE_FOR_SUBSCRIBER_LIST = "useForSubscriberList"; @SerializedName(SERIALIZED_NAME_USE_FOR_SUBSCRIBER_LIST) + @javax.annotation.Nonnull private Boolean useForSubscriberList; public CreateProductRequest() { } - public CreateProductRequest description(String description) { - + public CreateProductRequest description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public CreateProductRequest displayName(String displayName) { - + public CreateProductRequest displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public CreateProductRequest imageId(String imageId) { - + public CreateProductRequest imageId(@javax.annotation.Nonnull String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", required = true, value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nonnull String imageId) { this.imageId = imageId; } - public CreateProductRequest productType(ProductType productType) { - + public CreateProductRequest productType(@javax.annotation.Nonnull ProductType productType) { this.productType = productType; return this; } - /** + /** * Get productType * @return productType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ProductType getProductType() { return productType; } - - public void setProductType(ProductType productType) { + public void setProductType(@javax.annotation.Nonnull ProductType productType) { this.productType = productType; } - public CreateProductRequest tags(List tags) { - + public CreateProductRequest tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public CreateProductRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public CreateProductRequest useForSubscriberList(Boolean useForSubscriberList) { - + public CreateProductRequest useForSubscriberList(@javax.annotation.Nonnull Boolean useForSubscriberList) { this.useForSubscriberList = useForSubscriberList; return this; } - /** + /** * Get useForSubscriberList * @return useForSubscriberList - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getUseForSubscriberList() { return useForSubscriberList; } - - public void setUseForSubscriberList(Boolean useForSubscriberList) { + public void setUseForSubscriberList(@javax.annotation.Nonnull Boolean useForSubscriberList) { this.useForSubscriberList = useForSubscriberList; } @@ -264,10 +249,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -276,65 +258,56 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("displayName"); - openapiFields.add("imageId"); - openapiFields.add("productType"); - openapiFields.add("tags"); - openapiFields.add("useForSubscriberList"); + openapiFields = new HashSet(Arrays.asList("description", "displayName", "imageId", "productType", "tags", "useForSubscriberList")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("imageId"); - openapiRequiredFields.add("productType"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("useForSubscriberList"); + openapiRequiredFields = new HashSet(Arrays.asList("description", "displayName", "imageId", "productType", "tags", "useForSubscriberList")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateProductRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateProductRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateProductRequest is not found in the empty JSON string", CreateProductRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateProductRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateProductRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateProductRequest is not found in the empty JSON string", CreateProductRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateProductRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateProductRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateProductRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateProductRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if (!jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } + // validate the required field `productType` + ProductType.validateJsonElement(jsonObj.get("productType")); // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -358,31 +331,31 @@ public void write(JsonWriter out, CreateProductRequest value) throws IOException @Override public CreateProductRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateProductRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateProductRequest - * @throws IOException if the JSON string is invalid with respect to CreateProductRequest - */ + /** + * Create an instance of CreateProductRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateProductRequest + * @throws IOException if the JSON string is invalid with respect to CreateProductRequest + */ public static CreateProductRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateProductRequest.class); } - /** - * Convert an instance of CreateProductRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateProductRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreatePropRequest.java b/src/main/java/io/github/vrchatapi/model/CreatePropRequest.java index 58338f0d..e60f4fba 100644 --- a/src/main/java/io/github/vrchatapi/model/CreatePropRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreatePropRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,338 +49,305 @@ /** * CreatePropRequest */ -@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 CreatePropRequest { public static final String SERIALIZED_NAME_ASSET_URL = "assetUrl"; @SerializedName(SERIALIZED_NAME_ASSET_URL) + @javax.annotation.Nonnull private String assetUrl; public static final String SERIALIZED_NAME_ASSET_VERSION = "assetVersion"; @SerializedName(SERIALIZED_NAME_ASSET_VERSION) + @javax.annotation.Nonnull private Integer assetVersion; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nonnull private String platform; public static final String SERIALIZED_NAME_PROP_SIGNATURE = "propSignature"; @SerializedName(SERIALIZED_NAME_PROP_SIGNATURE) + @javax.annotation.Nullable private String propSignature; public static final String SERIALIZED_NAME_SPAWN_TYPE = "spawnType"; @SerializedName(SERIALIZED_NAME_SPAWN_TYPE) + @javax.annotation.Nonnull private Integer spawnType = 1; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_UNITY_VERSION = "unityVersion"; @SerializedName(SERIALIZED_NAME_UNITY_VERSION) + @javax.annotation.Nonnull private String unityVersion; public static final String SERIALIZED_NAME_WORLD_PLACEMENT_MASK = "worldPlacementMask"; @SerializedName(SERIALIZED_NAME_WORLD_PLACEMENT_MASK) + @javax.annotation.Nonnull private Integer worldPlacementMask = 1; public CreatePropRequest() { } - public CreatePropRequest assetUrl(String assetUrl) { - + public CreatePropRequest assetUrl(@javax.annotation.Nonnull String assetUrl) { this.assetUrl = assetUrl; return this; } - /** + /** * Get assetUrl * @return assetUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAssetUrl() { return assetUrl; } - - public void setAssetUrl(String assetUrl) { + public void setAssetUrl(@javax.annotation.Nonnull String assetUrl) { this.assetUrl = assetUrl; } - public CreatePropRequest assetVersion(Integer assetVersion) { - + public CreatePropRequest assetVersion(@javax.annotation.Nonnull Integer assetVersion) { this.assetVersion = assetVersion; return this; } - /** + /** * Get assetVersion * @return assetVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getAssetVersion() { return assetVersion; } - - public void setAssetVersion(Integer assetVersion) { + public void setAssetVersion(@javax.annotation.Nonnull Integer assetVersion) { this.assetVersion = assetVersion; } - public CreatePropRequest description(String description) { - + public CreatePropRequest description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public CreatePropRequest id(String id) { - + public CreatePropRequest id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "prop_829ba6f6-b837-49d9-b9a9-056b82103b58", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public CreatePropRequest imageUrl(String imageUrl) { - + public CreatePropRequest imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public CreatePropRequest name(String name) { - + public CreatePropRequest name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public CreatePropRequest platform(String platform) { - + public CreatePropRequest platform(@javax.annotation.Nonnull String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows", required = true, value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nonnull String platform) { this.platform = platform; } - public CreatePropRequest propSignature(String propSignature) { - + public CreatePropRequest propSignature(@javax.annotation.Nullable String propSignature) { this.propSignature = propSignature; return this; } - /** + /** * Get propSignature * @return propSignature - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPropSignature() { return propSignature; } - - public void setPropSignature(String propSignature) { + public void setPropSignature(@javax.annotation.Nullable String propSignature) { this.propSignature = propSignature; } - public CreatePropRequest spawnType(Integer spawnType) { - + public CreatePropRequest spawnType(@javax.annotation.Nonnull Integer spawnType) { this.spawnType = spawnType; return this; } - /** + /** * How a prop is summoned and interacted with. 0: the prop fixed to some surface in the world 1: the prop is a pickup and may be held by users 2: ??? * minimum: 0 * @return spawnType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "How a prop is summoned and interacted with. 0: the prop fixed to some surface in the world 1: the prop is a pickup and may be held by users 2: ???") - public Integer getSpawnType() { return spawnType; } - - public void setSpawnType(Integer spawnType) { + public void setSpawnType(@javax.annotation.Nonnull Integer spawnType) { this.spawnType = spawnType; } - public CreatePropRequest tags(List tags) { - + public CreatePropRequest tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public CreatePropRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public CreatePropRequest unityVersion(String unityVersion) { - + public CreatePropRequest unityVersion(@javax.annotation.Nonnull String unityVersion) { this.unityVersion = unityVersion; return this; } - /** + /** * Get unityVersion * @return unityVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nonnull String unityVersion) { this.unityVersion = unityVersion; } - public CreatePropRequest worldPlacementMask(Integer worldPlacementMask) { - + public CreatePropRequest worldPlacementMask(@javax.annotation.Nonnull Integer worldPlacementMask) { this.worldPlacementMask = worldPlacementMask; return this; } - /** + /** * Bitmask for restrictions on what world surfaces a prop may be summoned. 0: no restrictions 1: floors 2: walls 4: ceilings * minimum: 0 * @return worldPlacementMask - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Bitmask for restrictions on what world surfaces a prop may be summoned. 0: no restrictions 1: floors 2: walls 4: ceilings") - public Integer getWorldPlacementMask() { return worldPlacementMask; } - - public void setWorldPlacementMask(Integer worldPlacementMask) { + public void setWorldPlacementMask(@javax.annotation.Nonnull Integer worldPlacementMask) { this.worldPlacementMask = worldPlacementMask; } @@ -439,10 +406,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -451,91 +415,69 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assetUrl"); - openapiFields.add("assetVersion"); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("name"); - openapiFields.add("platform"); - openapiFields.add("propSignature"); - openapiFields.add("spawnType"); - openapiFields.add("tags"); - openapiFields.add("unityVersion"); - openapiFields.add("worldPlacementMask"); + openapiFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "description", "id", "imageUrl", "name", "platform", "propSignature", "spawnType", "tags", "unityVersion", "worldPlacementMask")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("assetUrl"); - openapiRequiredFields.add("assetVersion"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("platform"); - openapiRequiredFields.add("spawnType"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("unityVersion"); - openapiRequiredFields.add("worldPlacementMask"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreatePropRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreatePropRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePropRequest is not found in the empty JSON string", CreatePropRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "description", "id", "imageUrl", "name", "platform", "spawnType", "tags", "unityVersion", "worldPlacementMask")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreatePropRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreatePropRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreatePropRequest is not found in the empty JSON string", CreatePropRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreatePropRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreatePropRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreatePropRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreatePropRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("assetUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if ((jsonObj.get("propSignature") != null && !jsonObj.get("propSignature").isJsonNull()) && !jsonObj.get("propSignature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `propSignature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propSignature").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `propSignature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propSignature").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("unityVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); } } @@ -559,31 +501,31 @@ public void write(JsonWriter out, CreatePropRequest value) throws IOException { @Override public CreatePropRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreatePropRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreatePropRequest - * @throws IOException if the JSON string is invalid with respect to CreatePropRequest - */ + /** + * Create an instance of CreatePropRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreatePropRequest + * @throws IOException if the JSON string is invalid with respect to CreatePropRequest + */ public static CreatePropRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreatePropRequest.class); } - /** - * Convert an instance of CreatePropRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreatePropRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CreateWorldRequest.java b/src/main/java/io/github/vrchatapi/model/CreateWorldRequest.java index 43d3e1a0..50727903 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateWorldRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateWorldRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ReleaseStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,325 +50,294 @@ /** * CreateWorldRequest */ -@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 CreateWorldRequest { public static final String SERIALIZED_NAME_ASSET_URL = "assetUrl"; @SerializedName(SERIALIZED_NAME_ASSET_URL) + @javax.annotation.Nonnull private String assetUrl; public static final String SERIALIZED_NAME_ASSET_VERSION = "assetVersion"; @SerializedName(SERIALIZED_NAME_ASSET_VERSION) + @javax.annotation.Nullable private Integer assetVersion; public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable private String authorId; public static final String SERIALIZED_NAME_AUTHOR_NAME = "authorName"; @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nullable private String authorName; public static final String SERIALIZED_NAME_CAPACITY = "capacity"; @SerializedName(SERIALIZED_NAME_CAPACITY) + @javax.annotation.Nullable private Integer capacity; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nullable private String platform; public static final String SERIALIZED_NAME_RELEASE_STATUS = "releaseStatus"; @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) + @javax.annotation.Nullable private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_UNITY_PACKAGE_URL = "unityPackageUrl"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGE_URL) + @javax.annotation.Nullable private String unityPackageUrl; public static final String SERIALIZED_NAME_UNITY_VERSION = "unityVersion"; @SerializedName(SERIALIZED_NAME_UNITY_VERSION) + @javax.annotation.Nullable private String unityVersion = "5.3.4p1"; public CreateWorldRequest() { } - public CreateWorldRequest assetUrl(String assetUrl) { - + public CreateWorldRequest assetUrl(@javax.annotation.Nonnull String assetUrl) { this.assetUrl = assetUrl; return this; } - /** + /** * Get assetUrl * @return assetUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAssetUrl() { return assetUrl; } - - public void setAssetUrl(String assetUrl) { + public void setAssetUrl(@javax.annotation.Nonnull String assetUrl) { this.assetUrl = assetUrl; } - public CreateWorldRequest assetVersion(Integer assetVersion) { - + public CreateWorldRequest assetVersion(@javax.annotation.Nullable Integer assetVersion) { this.assetVersion = assetVersion; return this; } - /** + /** * Get assetVersion * minimum: 0 * @return assetVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getAssetVersion() { return assetVersion; } - - public void setAssetVersion(Integer assetVersion) { + public void setAssetVersion(@javax.annotation.Nullable Integer assetVersion) { this.assetVersion = assetVersion; } - public CreateWorldRequest authorId(String authorId) { - + public CreateWorldRequest authorId(@javax.annotation.Nullable String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nullable String authorId) { this.authorId = authorId; } - public CreateWorldRequest authorName(String authorName) { - + public CreateWorldRequest authorName(@javax.annotation.Nullable String authorName) { this.authorName = authorName; return this; } - /** + /** * Get authorName * @return authorName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAuthorName() { return authorName; } - - public void setAuthorName(String authorName) { + public void setAuthorName(@javax.annotation.Nullable String authorName) { this.authorName = authorName; } - public CreateWorldRequest capacity(Integer capacity) { - + public CreateWorldRequest capacity(@javax.annotation.Nullable Integer capacity) { this.capacity = capacity; return this; } - /** + /** * Get capacity * minimum: 0 * maximum: 40 * @return capacity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "8", value = "") - public Integer getCapacity() { return capacity; } - - public void setCapacity(Integer capacity) { + public void setCapacity(@javax.annotation.Nullable Integer capacity) { this.capacity = capacity; } - public CreateWorldRequest description(String description) { - + public CreateWorldRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public CreateWorldRequest id(String id) { - + public CreateWorldRequest id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public CreateWorldRequest imageUrl(String imageUrl) { - + public CreateWorldRequest imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public CreateWorldRequest name(String name) { - + public CreateWorldRequest name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public CreateWorldRequest platform(String platform) { - + public CreateWorldRequest platform(@javax.annotation.Nullable String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "standalonewindows", value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nullable String platform) { this.platform = platform; } - public CreateWorldRequest releaseStatus(ReleaseStatus releaseStatus) { - + public CreateWorldRequest releaseStatus(@javax.annotation.Nullable ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; return this; } - /** + /** * Get releaseStatus * @return releaseStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ReleaseStatus getReleaseStatus() { return releaseStatus; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { + public void setReleaseStatus(@javax.annotation.Nullable ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; } - public CreateWorldRequest tags(List tags) { - + public CreateWorldRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -381,65 +350,54 @@ public CreateWorldRequest addTagsItem(String tagsItem) { return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public CreateWorldRequest unityPackageUrl(String unityPackageUrl) { - + public CreateWorldRequest unityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; return this; } - /** + /** * Get unityPackageUrl * @return unityPackageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUnityPackageUrl() { return unityPackageUrl; } - - public void setUnityPackageUrl(String unityPackageUrl) { + public void setUnityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; } - public CreateWorldRequest unityVersion(String unityVersion) { - + public CreateWorldRequest unityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; return this; } - /** + /** * Get unityVersion * @return unityVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "2022.3.6f1", value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; } @@ -502,10 +460,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -514,89 +469,77 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assetUrl"); - openapiFields.add("assetVersion"); - openapiFields.add("authorId"); - openapiFields.add("authorName"); - openapiFields.add("capacity"); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("name"); - openapiFields.add("platform"); - openapiFields.add("releaseStatus"); - openapiFields.add("tags"); - openapiFields.add("unityPackageUrl"); - openapiFields.add("unityVersion"); + openapiFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "authorId", "authorName", "capacity", "description", "id", "imageUrl", "name", "platform", "releaseStatus", "tags", "unityPackageUrl", "unityVersion")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("assetUrl"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CreateWorldRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CreateWorldRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateWorldRequest is not found in the empty JSON string", CreateWorldRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("assetUrl", "imageUrl", "name")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateWorldRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateWorldRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CreateWorldRequest is not found in the empty JSON string", CreateWorldRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CreateWorldRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateWorldRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateWorldRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateWorldRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("assetUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); } if ((jsonObj.get("authorId") != null && !jsonObj.get("authorId").isJsonNull()) && !jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if ((jsonObj.get("authorName") != null && !jsonObj.get("authorName").isJsonNull()) && !jsonObj.get("authorName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) && !jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + } + // validate the optional field `releaseStatus` + if (jsonObj.get("releaseStatus") != null && !jsonObj.get("releaseStatus").isJsonNull()) { + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("unityPackageUrl") != null && !jsonObj.get("unityPackageUrl").isJsonNull()) && !jsonObj.get("unityPackageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); } if ((jsonObj.get("unityVersion") != null && !jsonObj.get("unityVersion").isJsonNull()) && !jsonObj.get("unityVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); } } @@ -620,31 +563,31 @@ public void write(JsonWriter out, CreateWorldRequest value) throws IOException { @Override public CreateWorldRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CreateWorldRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateWorldRequest - * @throws IOException if the JSON string is invalid with respect to CreateWorldRequest - */ + /** + * Create an instance of CreateWorldRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateWorldRequest + * @throws IOException if the JSON string is invalid with respect to CreateWorldRequest + */ public static CreateWorldRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateWorldRequest.class); } - /** - * Convert an instance of CreateWorldRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CreateWorldRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CurrentUser.java b/src/main/java/io/github/vrchatapi/model/CurrentUser.java index 88f5480c..23d90e0f 100644 --- a/src/main/java/io/github/vrchatapi/model/CurrentUser.java +++ b/src/main/java/io/github/vrchatapi/model/CurrentUser.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -29,12 +28,11 @@ import io.github.vrchatapi.model.PastDisplayName; import io.github.vrchatapi.model.UserState; import io.github.vrchatapi.model.UserStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -48,13 +46,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -62,388 +62,483 @@ /** * CurrentUser */ -@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 CurrentUser { public static final String SERIALIZED_NAME_ACCEPTED_PRIVACY_VERSION = "acceptedPrivacyVersion"; @SerializedName(SERIALIZED_NAME_ACCEPTED_PRIVACY_VERSION) + @javax.annotation.Nullable private Integer acceptedPrivacyVersion; public static final String SERIALIZED_NAME_ACCEPTED_T_O_S_VERSION = "acceptedTOSVersion"; @SerializedName(SERIALIZED_NAME_ACCEPTED_T_O_S_VERSION) + @javax.annotation.Nonnull private Integer acceptedTOSVersion; public static final String SERIALIZED_NAME_ACCOUNT_DELETION_DATE = "accountDeletionDate"; @SerializedName(SERIALIZED_NAME_ACCOUNT_DELETION_DATE) + @javax.annotation.Nullable private LocalDate accountDeletionDate; public static final String SERIALIZED_NAME_ACCOUNT_DELETION_LOG = "accountDeletionLog"; @SerializedName(SERIALIZED_NAME_ACCOUNT_DELETION_LOG) - private List accountDeletionLog = null; + @javax.annotation.Nullable + private List accountDeletionLog; public static final String SERIALIZED_NAME_ACTIVE_FRIENDS = "activeFriends"; @SerializedName(SERIALIZED_NAME_ACTIVE_FRIENDS) - private List activeFriends = null; + @javax.annotation.Nullable + private List activeFriends = new ArrayList<>(); public static final String SERIALIZED_NAME_AGE_VERIFICATION_STATUS = "ageVerificationStatus"; @SerializedName(SERIALIZED_NAME_AGE_VERIFICATION_STATUS) + @javax.annotation.Nonnull private AgeVerificationStatus ageVerificationStatus; public static final String SERIALIZED_NAME_AGE_VERIFIED = "ageVerified"; @SerializedName(SERIALIZED_NAME_AGE_VERIFIED) + @javax.annotation.Nonnull private Boolean ageVerified; public static final String SERIALIZED_NAME_ALLOW_AVATAR_COPYING = "allowAvatarCopying"; @SerializedName(SERIALIZED_NAME_ALLOW_AVATAR_COPYING) + @javax.annotation.Nonnull private Boolean allowAvatarCopying; + public static final String SERIALIZED_NAME_APPLE_DETAILS = "appleDetails"; + @SerializedName(SERIALIZED_NAME_APPLE_DETAILS) + @javax.annotation.Nullable + private Object appleDetails; + + public static final String SERIALIZED_NAME_APPLE_ID = "appleId"; + @SerializedName(SERIALIZED_NAME_APPLE_ID) + @javax.annotation.Nullable + private String appleId; + public static final String SERIALIZED_NAME_AUTH_TOKEN = "authToken"; @SerializedName(SERIALIZED_NAME_AUTH_TOKEN) + @javax.annotation.Nullable private String authToken; public static final String SERIALIZED_NAME_BADGES = "badges"; @SerializedName(SERIALIZED_NAME_BADGES) - private List badges = null; + @javax.annotation.Nullable + private List badges = new ArrayList<>(); public static final String SERIALIZED_NAME_BIO = "bio"; @SerializedName(SERIALIZED_NAME_BIO) + @javax.annotation.Nonnull private String bio; public static final String SERIALIZED_NAME_BIO_LINKS = "bioLinks"; @SerializedName(SERIALIZED_NAME_BIO_LINKS) + @javax.annotation.Nonnull private List bioLinks = new ArrayList<>(); public static final String SERIALIZED_NAME_CONTENT_FILTERS = "contentFilters"; @SerializedName(SERIALIZED_NAME_CONTENT_FILTERS) - private List contentFilters = null; + @javax.annotation.Nullable + private List contentFilters = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR = "currentAvatar"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR) + @javax.annotation.Nonnull private String currentAvatar; public static final String SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL = "currentAvatarImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL) + @javax.annotation.Nonnull private String currentAvatarImageUrl; public static final String SERIALIZED_NAME_CURRENT_AVATAR_TAGS = "currentAvatarTags"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_TAGS) + @javax.annotation.Nonnull private List currentAvatarTags = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL = "currentAvatarThumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nonnull private String currentAvatarThumbnailImageUrl; public static final String SERIALIZED_NAME_DATE_JOINED = "date_joined"; @SerializedName(SERIALIZED_NAME_DATE_JOINED) + @javax.annotation.Nonnull private LocalDate dateJoined; public static final String SERIALIZED_NAME_DEVELOPER_TYPE = "developerType"; @SerializedName(SERIALIZED_NAME_DEVELOPER_TYPE) + @javax.annotation.Nonnull private DeveloperType developerType = DeveloperType.NONE; public static final String SERIALIZED_NAME_DISCORD_DETAILS = "discordDetails"; @SerializedName(SERIALIZED_NAME_DISCORD_DETAILS) + @javax.annotation.Nullable private DiscordDetails discordDetails; public static final String SERIALIZED_NAME_DISCORD_ID = "discordId"; @SerializedName(SERIALIZED_NAME_DISCORD_ID) + @javax.annotation.Nullable private String discordId; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_EMAIL_VERIFIED = "emailVerified"; @SerializedName(SERIALIZED_NAME_EMAIL_VERIFIED) + @javax.annotation.Nonnull private Boolean emailVerified; public static final String SERIALIZED_NAME_FALLBACK_AVATAR = "fallbackAvatar"; @SerializedName(SERIALIZED_NAME_FALLBACK_AVATAR) + @javax.annotation.Nullable private String fallbackAvatar; public static final String SERIALIZED_NAME_FRIEND_GROUP_NAMES = "friendGroupNames"; + @Deprecated @SerializedName(SERIALIZED_NAME_FRIEND_GROUP_NAMES) + @javax.annotation.Nonnull private List friendGroupNames = new ArrayList<>(); public static final String SERIALIZED_NAME_FRIEND_KEY = "friendKey"; @SerializedName(SERIALIZED_NAME_FRIEND_KEY) + @javax.annotation.Nonnull private String friendKey; public static final String SERIALIZED_NAME_FRIENDS = "friends"; @SerializedName(SERIALIZED_NAME_FRIENDS) + @javax.annotation.Nonnull private List friends = new ArrayList<>(); public static final String SERIALIZED_NAME_GOOGLE_DETAILS = "googleDetails"; @SerializedName(SERIALIZED_NAME_GOOGLE_DETAILS) + @javax.annotation.Nullable private Object googleDetails; public static final String SERIALIZED_NAME_GOOGLE_ID = "googleId"; @SerializedName(SERIALIZED_NAME_GOOGLE_ID) + @javax.annotation.Nullable private String googleId; public static final String SERIALIZED_NAME_HAS_BIRTHDAY = "hasBirthday"; @SerializedName(SERIALIZED_NAME_HAS_BIRTHDAY) + @javax.annotation.Nonnull private Boolean hasBirthday; + public static final String SERIALIZED_NAME_HAS_DISCORD_FRIENDS_OPT_OUT = "hasDiscordFriendsOptOut"; + @SerializedName(SERIALIZED_NAME_HAS_DISCORD_FRIENDS_OPT_OUT) + @javax.annotation.Nullable + private Boolean hasDiscordFriendsOptOut; + public static final String SERIALIZED_NAME_HAS_EMAIL = "hasEmail"; @SerializedName(SERIALIZED_NAME_HAS_EMAIL) + @javax.annotation.Nonnull private Boolean hasEmail; public static final String SERIALIZED_NAME_HAS_LOGGED_IN_FROM_CLIENT = "hasLoggedInFromClient"; @SerializedName(SERIALIZED_NAME_HAS_LOGGED_IN_FROM_CLIENT) + @javax.annotation.Nonnull private Boolean hasLoggedInFromClient; public static final String SERIALIZED_NAME_HAS_PENDING_EMAIL = "hasPendingEmail"; @SerializedName(SERIALIZED_NAME_HAS_PENDING_EMAIL) + @javax.annotation.Nonnull private Boolean hasPendingEmail; + public static final String SERIALIZED_NAME_HAS_SHARED_CONNECTIONS_OPT_OUT = "hasSharedConnectionsOptOut"; + @SerializedName(SERIALIZED_NAME_HAS_SHARED_CONNECTIONS_OPT_OUT) + @javax.annotation.Nullable + private Boolean hasSharedConnectionsOptOut; + public static final String SERIALIZED_NAME_HIDE_CONTENT_FILTER_SETTINGS = "hideContentFilterSettings"; @SerializedName(SERIALIZED_NAME_HIDE_CONTENT_FILTER_SETTINGS) + @javax.annotation.Nullable private Boolean hideContentFilterSettings; public static final String SERIALIZED_NAME_HOME_LOCATION = "homeLocation"; @SerializedName(SERIALIZED_NAME_HOME_LOCATION) + @javax.annotation.Nonnull private String homeLocation; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IS_ADULT = "isAdult"; @SerializedName(SERIALIZED_NAME_IS_ADULT) + @javax.annotation.Nonnull private Boolean isAdult; public static final String SERIALIZED_NAME_IS_BOOPING_ENABLED = "isBoopingEnabled"; @SerializedName(SERIALIZED_NAME_IS_BOOPING_ENABLED) + @javax.annotation.Nullable private Boolean isBoopingEnabled = true; public static final String SERIALIZED_NAME_IS_FRIEND = "isFriend"; @SerializedName(SERIALIZED_NAME_IS_FRIEND) + @javax.annotation.Nonnull private Boolean isFriend = false; public static final String SERIALIZED_NAME_LAST_ACTIVITY = "last_activity"; @SerializedName(SERIALIZED_NAME_LAST_ACTIVITY) + @javax.annotation.Nullable private OffsetDateTime lastActivity; public static final String SERIALIZED_NAME_LAST_LOGIN = "last_login"; @SerializedName(SERIALIZED_NAME_LAST_LOGIN) + @javax.annotation.Nonnull private OffsetDateTime lastLogin; public static final String SERIALIZED_NAME_LAST_MOBILE = "last_mobile"; @SerializedName(SERIALIZED_NAME_LAST_MOBILE) + @javax.annotation.Nullable private OffsetDateTime lastMobile; public static final String SERIALIZED_NAME_LAST_PLATFORM = "last_platform"; @SerializedName(SERIALIZED_NAME_LAST_PLATFORM) + @javax.annotation.Nonnull private String lastPlatform; public static final String SERIALIZED_NAME_OBFUSCATED_EMAIL = "obfuscatedEmail"; @SerializedName(SERIALIZED_NAME_OBFUSCATED_EMAIL) + @javax.annotation.Nonnull private String obfuscatedEmail; public static final String SERIALIZED_NAME_OBFUSCATED_PENDING_EMAIL = "obfuscatedPendingEmail"; @SerializedName(SERIALIZED_NAME_OBFUSCATED_PENDING_EMAIL) + @javax.annotation.Nonnull private String obfuscatedPendingEmail; public static final String SERIALIZED_NAME_OCULUS_ID = "oculusId"; @SerializedName(SERIALIZED_NAME_OCULUS_ID) + @javax.annotation.Nonnull private String oculusId; public static final String SERIALIZED_NAME_OFFLINE_FRIENDS = "offlineFriends"; @SerializedName(SERIALIZED_NAME_OFFLINE_FRIENDS) - private List offlineFriends = null; + @javax.annotation.Nullable + private List offlineFriends = new ArrayList<>(); public static final String SERIALIZED_NAME_ONLINE_FRIENDS = "onlineFriends"; @SerializedName(SERIALIZED_NAME_ONLINE_FRIENDS) - private List onlineFriends = null; + @javax.annotation.Nullable + private List onlineFriends = new ArrayList<>(); public static final String SERIALIZED_NAME_PAST_DISPLAY_NAMES = "pastDisplayNames"; @SerializedName(SERIALIZED_NAME_PAST_DISPLAY_NAMES) + @javax.annotation.Nonnull private List pastDisplayNames = new ArrayList<>(); public static final String SERIALIZED_NAME_PICO_ID = "picoId"; @SerializedName(SERIALIZED_NAME_PICO_ID) + @javax.annotation.Nullable private String picoId; public static final String SERIALIZED_NAME_PLATFORM_HISTORY = "platform_history"; @SerializedName(SERIALIZED_NAME_PLATFORM_HISTORY) - private List platformHistory = null; + @javax.annotation.Nullable + private List platformHistory = new ArrayList<>(); public static final String SERIALIZED_NAME_PRESENCE = "presence"; @SerializedName(SERIALIZED_NAME_PRESENCE) + @javax.annotation.Nullable private CurrentUserPresence presence; public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE = "profilePicOverride"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE) + @javax.annotation.Nonnull private String profilePicOverride; public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE_THUMBNAIL = "profilePicOverrideThumbnail"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE_THUMBNAIL) + @javax.annotation.Nonnull private String profilePicOverrideThumbnail; public static final String SERIALIZED_NAME_PRONOUNS = "pronouns"; @SerializedName(SERIALIZED_NAME_PRONOUNS) + @javax.annotation.Nonnull private String pronouns; public static final String SERIALIZED_NAME_PRONOUNS_HISTORY = "pronounsHistory"; @SerializedName(SERIALIZED_NAME_PRONOUNS_HISTORY) + @javax.annotation.Nonnull private List pronounsHistory = new ArrayList<>(); public static final String SERIALIZED_NAME_QUEUED_INSTANCE = "queuedInstance"; @SerializedName(SERIALIZED_NAME_QUEUED_INSTANCE) + @javax.annotation.Nullable private String queuedInstance; public static final String SERIALIZED_NAME_RECEIVE_MOBILE_INVITATIONS = "receiveMobileInvitations"; @SerializedName(SERIALIZED_NAME_RECEIVE_MOBILE_INVITATIONS) + @javax.annotation.Nullable private Boolean receiveMobileInvitations; public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nonnull private UserState state = UserState.OFFLINE; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private UserStatus status = UserStatus.OFFLINE; public static final String SERIALIZED_NAME_STATUS_DESCRIPTION = "statusDescription"; @SerializedName(SERIALIZED_NAME_STATUS_DESCRIPTION) + @javax.annotation.Nonnull private String statusDescription; public static final String SERIALIZED_NAME_STATUS_FIRST_TIME = "statusFirstTime"; @SerializedName(SERIALIZED_NAME_STATUS_FIRST_TIME) + @javax.annotation.Nonnull private Boolean statusFirstTime; public static final String SERIALIZED_NAME_STATUS_HISTORY = "statusHistory"; @SerializedName(SERIALIZED_NAME_STATUS_HISTORY) + @javax.annotation.Nonnull private List statusHistory = new ArrayList<>(); public static final String SERIALIZED_NAME_STEAM_DETAILS = "steamDetails"; @SerializedName(SERIALIZED_NAME_STEAM_DETAILS) + @javax.annotation.Nonnull private Object steamDetails; public static final String SERIALIZED_NAME_STEAM_ID = "steamId"; @SerializedName(SERIALIZED_NAME_STEAM_ID) + @javax.annotation.Nonnull private String steamId; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); + public static final String SERIALIZED_NAME_TWITCH_DETAILS = "twitchDetails"; + @SerializedName(SERIALIZED_NAME_TWITCH_DETAILS) + @javax.annotation.Nullable + private Object twitchDetails; + + public static final String SERIALIZED_NAME_TWITCH_ID = "twitchId"; + @SerializedName(SERIALIZED_NAME_TWITCH_ID) + @javax.annotation.Nullable + private String twitchId; + public static final String SERIALIZED_NAME_TWO_FACTOR_AUTH_ENABLED = "twoFactorAuthEnabled"; @SerializedName(SERIALIZED_NAME_TWO_FACTOR_AUTH_ENABLED) + @javax.annotation.Nonnull private Boolean twoFactorAuthEnabled; public static final String SERIALIZED_NAME_TWO_FACTOR_AUTH_ENABLED_DATE = "twoFactorAuthEnabledDate"; @SerializedName(SERIALIZED_NAME_TWO_FACTOR_AUTH_ENABLED_DATE) + @javax.annotation.Nullable private OffsetDateTime twoFactorAuthEnabledDate; public static final String SERIALIZED_NAME_UNSUBSCRIBE = "unsubscribe"; @SerializedName(SERIALIZED_NAME_UNSUBSCRIBE) + @javax.annotation.Nonnull private Boolean unsubscribe; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_USER_ICON = "userIcon"; @SerializedName(SERIALIZED_NAME_USER_ICON) + @javax.annotation.Nonnull private String userIcon; public static final String SERIALIZED_NAME_USER_LANGUAGE = "userLanguage"; @SerializedName(SERIALIZED_NAME_USER_LANGUAGE) + @javax.annotation.Nullable private String userLanguage; public static final String SERIALIZED_NAME_USER_LANGUAGE_CODE = "userLanguageCode"; @SerializedName(SERIALIZED_NAME_USER_LANGUAGE_CODE) + @javax.annotation.Nullable private String userLanguageCode; public static final String SERIALIZED_NAME_USERNAME = "username"; + @Deprecated @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable private String username; public static final String SERIALIZED_NAME_USES_GENERATED_PASSWORD = "usesGeneratedPassword"; @SerializedName(SERIALIZED_NAME_USES_GENERATED_PASSWORD) + @javax.annotation.Nonnull private Boolean usesGeneratedPassword; public static final String SERIALIZED_NAME_VIVE_ID = "viveId"; @SerializedName(SERIALIZED_NAME_VIVE_ID) + @javax.annotation.Nullable private String viveId; public CurrentUser() { } - public CurrentUser acceptedPrivacyVersion(Integer acceptedPrivacyVersion) { - + public CurrentUser acceptedPrivacyVersion(@javax.annotation.Nullable Integer acceptedPrivacyVersion) { this.acceptedPrivacyVersion = acceptedPrivacyVersion; return this; } - /** + /** * Get acceptedPrivacyVersion * minimum: 0 * @return acceptedPrivacyVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "0", value = "") - public Integer getAcceptedPrivacyVersion() { return acceptedPrivacyVersion; } - - public void setAcceptedPrivacyVersion(Integer acceptedPrivacyVersion) { + public void setAcceptedPrivacyVersion(@javax.annotation.Nullable Integer acceptedPrivacyVersion) { this.acceptedPrivacyVersion = acceptedPrivacyVersion; } - public CurrentUser acceptedTOSVersion(Integer acceptedTOSVersion) { - + public CurrentUser acceptedTOSVersion(@javax.annotation.Nonnull Integer acceptedTOSVersion) { this.acceptedTOSVersion = acceptedTOSVersion; return this; } - /** + /** * Get acceptedTOSVersion * minimum: 0 * @return acceptedTOSVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "7", required = true, value = "") - public Integer getAcceptedTOSVersion() { return acceptedTOSVersion; } - - public void setAcceptedTOSVersion(Integer acceptedTOSVersion) { + public void setAcceptedTOSVersion(@javax.annotation.Nonnull Integer acceptedTOSVersion) { this.acceptedTOSVersion = acceptedTOSVersion; } - public CurrentUser accountDeletionDate(LocalDate accountDeletionDate) { - + public CurrentUser accountDeletionDate(@javax.annotation.Nullable LocalDate accountDeletionDate) { this.accountDeletionDate = accountDeletionDate; return this; } - /** + /** * Get accountDeletionDate * @return accountDeletionDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public LocalDate getAccountDeletionDate() { return accountDeletionDate; } - - public void setAccountDeletionDate(LocalDate accountDeletionDate) { + public void setAccountDeletionDate(@javax.annotation.Nullable LocalDate accountDeletionDate) { this.accountDeletionDate = accountDeletionDate; } - public CurrentUser accountDeletionLog(List accountDeletionLog) { - + public CurrentUser accountDeletionLog(@javax.annotation.Nullable List accountDeletionLog) { this.accountDeletionLog = accountDeletionLog; return this; } @@ -456,25 +551,21 @@ public CurrentUser addAccountDeletionLogItem(AccountDeletionLog accountDeletionL return this; } - /** + /** * * @return accountDeletionLog - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getAccountDeletionLog() { return accountDeletionLog; } - - public void setAccountDeletionLog(List accountDeletionLog) { + public void setAccountDeletionLog(@javax.annotation.Nullable List accountDeletionLog) { this.accountDeletionLog = accountDeletionLog; } - public CurrentUser activeFriends(List activeFriends) { - + public CurrentUser activeFriends(@javax.annotation.Nullable List activeFriends) { this.activeFriends = activeFriends; return this; } @@ -487,117 +578,135 @@ public CurrentUser addActiveFriendsItem(String activeFriendsItem) { return this; } - /** + /** * * @return activeFriends - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getActiveFriends() { return activeFriends; } - - public void setActiveFriends(List activeFriends) { + public void setActiveFriends(@javax.annotation.Nullable List activeFriends) { this.activeFriends = activeFriends; } - public CurrentUser ageVerificationStatus(AgeVerificationStatus ageVerificationStatus) { - + public CurrentUser ageVerificationStatus(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { this.ageVerificationStatus = ageVerificationStatus; return this; } - /** + /** * Get ageVerificationStatus * @return ageVerificationStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AgeVerificationStatus getAgeVerificationStatus() { return ageVerificationStatus; } - - public void setAgeVerificationStatus(AgeVerificationStatus ageVerificationStatus) { + public void setAgeVerificationStatus(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { this.ageVerificationStatus = ageVerificationStatus; } - public CurrentUser ageVerified(Boolean ageVerified) { - + public CurrentUser ageVerified(@javax.annotation.Nonnull Boolean ageVerified) { this.ageVerified = ageVerified; return this; } - /** + /** * `true` if, user is age verified (not 18+). * @return ageVerified - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "`true` if, user is age verified (not 18+).") - public Boolean getAgeVerified() { return ageVerified; } - - public void setAgeVerified(Boolean ageVerified) { + public void setAgeVerified(@javax.annotation.Nonnull Boolean ageVerified) { this.ageVerified = ageVerified; } - public CurrentUser allowAvatarCopying(Boolean allowAvatarCopying) { - + public CurrentUser allowAvatarCopying(@javax.annotation.Nonnull Boolean allowAvatarCopying) { this.allowAvatarCopying = allowAvatarCopying; return this; } - /** + /** * Get allowAvatarCopying * @return allowAvatarCopying - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getAllowAvatarCopying() { return allowAvatarCopying; } - - public void setAllowAvatarCopying(Boolean allowAvatarCopying) { + public void setAllowAvatarCopying(@javax.annotation.Nonnull Boolean allowAvatarCopying) { this.allowAvatarCopying = allowAvatarCopying; } - public CurrentUser authToken(String authToken) { - + public CurrentUser appleDetails(@javax.annotation.Nullable Object appleDetails) { + this.appleDetails = appleDetails; + return this; + } + + /** + * Get appleDetails + * @return appleDetails + */ + @javax.annotation.Nullable + public Object getAppleDetails() { + return appleDetails; + } + + public void setAppleDetails(@javax.annotation.Nullable Object appleDetails) { + this.appleDetails = appleDetails; + } + + + public CurrentUser appleId(@javax.annotation.Nullable String appleId) { + this.appleId = appleId; + return this; + } + + /** + * Get appleId + * @return appleId + */ + @javax.annotation.Nullable + public String getAppleId() { + return appleId; + } + + public void setAppleId(@javax.annotation.Nullable String appleId) { + this.appleId = appleId; + } + + + public CurrentUser authToken(@javax.annotation.Nullable String authToken) { this.authToken = authToken; return this; } - /** + /** * The auth token for NEWLY REGISTERED ACCOUNTS ONLY (/auth/register) * @return authToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The auth token for NEWLY REGISTERED ACCOUNTS ONLY (/auth/register)") - public String getAuthToken() { return authToken; } - - public void setAuthToken(String authToken) { + public void setAuthToken(@javax.annotation.Nullable String authToken) { this.authToken = authToken; } - public CurrentUser badges(List badges) { - + public CurrentUser badges(@javax.annotation.Nullable List badges) { this.badges = badges; return this; } @@ -610,76 +719,67 @@ public CurrentUser addBadgesItem(Badge badgesItem) { return this; } - /** + /** * * @return badges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getBadges() { return badges; } - - public void setBadges(List badges) { + public void setBadges(@javax.annotation.Nullable List badges) { this.badges = badges; } - public CurrentUser bio(String bio) { - + public CurrentUser bio(@javax.annotation.Nonnull String bio) { this.bio = bio; return this; } - /** + /** * Get bio * @return bio - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getBio() { return bio; } - - public void setBio(String bio) { + public void setBio(@javax.annotation.Nonnull String bio) { this.bio = bio; } - public CurrentUser bioLinks(List bioLinks) { - + public CurrentUser bioLinks(@javax.annotation.Nonnull List bioLinks) { this.bioLinks = bioLinks; return this; } public CurrentUser addBioLinksItem(String bioLinksItem) { + if (this.bioLinks == null) { + this.bioLinks = new ArrayList<>(); + } this.bioLinks.add(bioLinksItem); return this; } - /** + /** * * @return bioLinks - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public List getBioLinks() { return bioLinks; } - - public void setBioLinks(List bioLinks) { + public void setBioLinks(@javax.annotation.Nonnull List bioLinks) { this.bioLinks = bioLinks; } - public CurrentUser contentFilters(List contentFilters) { - + public CurrentUser contentFilters(@javax.annotation.Nullable List contentFilters) { this.contentFilters = contentFilters; return this; } @@ -692,801 +792,714 @@ public CurrentUser addContentFiltersItem(String contentFiltersItem) { return this; } - /** + /** * These tags begin with `content_` and control content gating * @return contentFilters - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "These tags begin with `content_` and control content gating") - public List getContentFilters() { return contentFilters; } - - public void setContentFilters(List contentFilters) { + public void setContentFilters(@javax.annotation.Nullable List contentFilters) { this.contentFilters = contentFilters; } - public CurrentUser currentAvatar(String currentAvatar) { - + public CurrentUser currentAvatar(@javax.annotation.Nonnull String currentAvatar) { this.currentAvatar = currentAvatar; return this; } - /** + /** * Get currentAvatar * @return currentAvatar - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_912d66a4-4714-43b8-8407-7de2cafbf55b", required = true, value = "") - public String getCurrentAvatar() { return currentAvatar; } - - public void setCurrentAvatar(String currentAvatar) { + public void setCurrentAvatar(@javax.annotation.Nonnull String currentAvatar) { this.currentAvatar = currentAvatar; } - public CurrentUser currentAvatarImageUrl(String currentAvatarImageUrl) { - + public CurrentUser currentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/file/file_ae46d521-7281-4b38-b365-804b32a1d6a7/1/file", required = true, value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarImageUrl() { return currentAvatarImageUrl; } - - public void setCurrentAvatarImageUrl(String currentAvatarImageUrl) { + public void setCurrentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; } - public CurrentUser currentAvatarTags(List currentAvatarTags) { - + public CurrentUser currentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; return this; } public CurrentUser addCurrentAvatarTagsItem(String currentAvatarTagsItem) { + if (this.currentAvatarTags == null) { + this.currentAvatarTags = new ArrayList<>(); + } this.currentAvatarTags.add(currentAvatarTagsItem); return this; } - /** + /** * Get currentAvatarTags * @return currentAvatarTags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getCurrentAvatarTags() { return currentAvatarTags; } - - public void setCurrentAvatarTags(List currentAvatarTags) { + public void setCurrentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; } - public CurrentUser currentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { - + public CurrentUser currentAvatarThumbnailImageUrl(@javax.annotation.Nonnull String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarThumbnailImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/image/file_aae83ed9-d42d-4d72-9f4b-9f1e41ed17e1/1/256", required = true, value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarThumbnailImageUrl() { return currentAvatarThumbnailImageUrl; } - - public void setCurrentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nonnull String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; } - public CurrentUser dateJoined(LocalDate dateJoined) { - + public CurrentUser dateJoined(@javax.annotation.Nonnull LocalDate dateJoined) { this.dateJoined = dateJoined; return this; } - /** + /** * Get dateJoined * @return dateJoined - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public LocalDate getDateJoined() { return dateJoined; } - - public void setDateJoined(LocalDate dateJoined) { + public void setDateJoined(@javax.annotation.Nonnull LocalDate dateJoined) { this.dateJoined = dateJoined; } - public CurrentUser developerType(DeveloperType developerType) { - + public CurrentUser developerType(@javax.annotation.Nonnull DeveloperType developerType) { this.developerType = developerType; return this; } - /** + /** * Get developerType * @return developerType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public DeveloperType getDeveloperType() { return developerType; } - - public void setDeveloperType(DeveloperType developerType) { + public void setDeveloperType(@javax.annotation.Nonnull DeveloperType developerType) { this.developerType = developerType; } - public CurrentUser discordDetails(DiscordDetails discordDetails) { - + public CurrentUser discordDetails(@javax.annotation.Nullable DiscordDetails discordDetails) { this.discordDetails = discordDetails; return this; } - /** + /** * Get discordDetails * @return discordDetails - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public DiscordDetails getDiscordDetails() { return discordDetails; } - - public void setDiscordDetails(DiscordDetails discordDetails) { + public void setDiscordDetails(@javax.annotation.Nullable DiscordDetails discordDetails) { this.discordDetails = discordDetails; } - public CurrentUser discordId(String discordId) { - + public CurrentUser discordId(@javax.annotation.Nullable String discordId) { this.discordId = discordId; return this; } - /** + /** * https://discord.com/developers/docs/reference#snowflakes * @return discordId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1280064052206370848", value = "https://discord.com/developers/docs/reference#snowflakes") - public String getDiscordId() { return discordId; } - - public void setDiscordId(String discordId) { + public void setDiscordId(@javax.annotation.Nullable String discordId) { this.discordId = discordId; } - public CurrentUser displayName(String displayName) { - + public CurrentUser displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public CurrentUser emailVerified(Boolean emailVerified) { - + public CurrentUser emailVerified(@javax.annotation.Nonnull Boolean emailVerified) { this.emailVerified = emailVerified; return this; } - /** + /** * Get emailVerified * @return emailVerified - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getEmailVerified() { return emailVerified; } - - public void setEmailVerified(Boolean emailVerified) { + public void setEmailVerified(@javax.annotation.Nonnull Boolean emailVerified) { this.emailVerified = emailVerified; } - public CurrentUser fallbackAvatar(String fallbackAvatar) { - + public CurrentUser fallbackAvatar(@javax.annotation.Nullable String fallbackAvatar) { this.fallbackAvatar = fallbackAvatar; return this; } - /** + /** * Get fallbackAvatar * @return fallbackAvatar - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "avtr_912d66a4-4714-43b8-8407-7de2cafbf55b", value = "") - public String getFallbackAvatar() { return fallbackAvatar; } - - public void setFallbackAvatar(String fallbackAvatar) { + public void setFallbackAvatar(@javax.annotation.Nullable String fallbackAvatar) { this.fallbackAvatar = fallbackAvatar; } - public CurrentUser friendGroupNames(List friendGroupNames) { - + @Deprecated + public CurrentUser friendGroupNames(@javax.annotation.Nonnull List friendGroupNames) { this.friendGroupNames = friendGroupNames; return this; } public CurrentUser addFriendGroupNamesItem(String friendGroupNamesItem) { + if (this.friendGroupNames == null) { + this.friendGroupNames = new ArrayList<>(); + } this.friendGroupNames.add(friendGroupNamesItem); return this; } - /** + /** * Always empty array. * @return friendGroupNames * @deprecated - **/ + */ @Deprecated @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Always empty array.") - public List getFriendGroupNames() { return friendGroupNames; } - - public void setFriendGroupNames(List friendGroupNames) { + @Deprecated + public void setFriendGroupNames(@javax.annotation.Nonnull List friendGroupNames) { this.friendGroupNames = friendGroupNames; } - public CurrentUser friendKey(String friendKey) { - + public CurrentUser friendKey(@javax.annotation.Nonnull String friendKey) { this.friendKey = friendKey; return this; } - /** + /** * Get friendKey * @return friendKey - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getFriendKey() { return friendKey; } - - public void setFriendKey(String friendKey) { + public void setFriendKey(@javax.annotation.Nonnull String friendKey) { this.friendKey = friendKey; } - public CurrentUser friends(List friends) { - + public CurrentUser friends(@javax.annotation.Nonnull List friends) { this.friends = friends; return this; } public CurrentUser addFriendsItem(String friendsItem) { + if (this.friends == null) { + this.friends = new ArrayList<>(); + } this.friends.add(friendsItem); return this; } - /** + /** * Get friends * @return friends - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getFriends() { return friends; } - - public void setFriends(List friends) { + public void setFriends(@javax.annotation.Nonnull List friends) { this.friends = friends; } - public CurrentUser googleDetails(Object googleDetails) { - + public CurrentUser googleDetails(@javax.annotation.Nullable Object googleDetails) { this.googleDetails = googleDetails; return this; } - /** + /** * Get googleDetails * @return googleDetails - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Object getGoogleDetails() { return googleDetails; } - - public void setGoogleDetails(Object googleDetails) { + public void setGoogleDetails(@javax.annotation.Nullable Object googleDetails) { this.googleDetails = googleDetails; } - public CurrentUser googleId(String googleId) { - + public CurrentUser googleId(@javax.annotation.Nullable String googleId) { this.googleId = googleId; return this; } - /** + /** * Get googleId * @return googleId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getGoogleId() { return googleId; } - - public void setGoogleId(String googleId) { + public void setGoogleId(@javax.annotation.Nullable String googleId) { this.googleId = googleId; } - public CurrentUser hasBirthday(Boolean hasBirthday) { - + public CurrentUser hasBirthday(@javax.annotation.Nonnull Boolean hasBirthday) { this.hasBirthday = hasBirthday; return this; } - /** + /** * Get hasBirthday * @return hasBirthday - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getHasBirthday() { return hasBirthday; } - - public void setHasBirthday(Boolean hasBirthday) { + public void setHasBirthday(@javax.annotation.Nonnull Boolean hasBirthday) { this.hasBirthday = hasBirthday; } - public CurrentUser hasEmail(Boolean hasEmail) { - + public CurrentUser hasDiscordFriendsOptOut(@javax.annotation.Nullable Boolean hasDiscordFriendsOptOut) { + this.hasDiscordFriendsOptOut = hasDiscordFriendsOptOut; + return this; + } + + /** + * Get hasDiscordFriendsOptOut + * @return hasDiscordFriendsOptOut + */ + @javax.annotation.Nullable + public Boolean getHasDiscordFriendsOptOut() { + return hasDiscordFriendsOptOut; + } + + public void setHasDiscordFriendsOptOut(@javax.annotation.Nullable Boolean hasDiscordFriendsOptOut) { + this.hasDiscordFriendsOptOut = hasDiscordFriendsOptOut; + } + + + public CurrentUser hasEmail(@javax.annotation.Nonnull Boolean hasEmail) { this.hasEmail = hasEmail; return this; } - /** + /** * Get hasEmail * @return hasEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getHasEmail() { return hasEmail; } - - public void setHasEmail(Boolean hasEmail) { + public void setHasEmail(@javax.annotation.Nonnull Boolean hasEmail) { this.hasEmail = hasEmail; } - public CurrentUser hasLoggedInFromClient(Boolean hasLoggedInFromClient) { - + public CurrentUser hasLoggedInFromClient(@javax.annotation.Nonnull Boolean hasLoggedInFromClient) { this.hasLoggedInFromClient = hasLoggedInFromClient; return this; } - /** + /** * Get hasLoggedInFromClient * @return hasLoggedInFromClient - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getHasLoggedInFromClient() { return hasLoggedInFromClient; } - - public void setHasLoggedInFromClient(Boolean hasLoggedInFromClient) { + public void setHasLoggedInFromClient(@javax.annotation.Nonnull Boolean hasLoggedInFromClient) { this.hasLoggedInFromClient = hasLoggedInFromClient; } - public CurrentUser hasPendingEmail(Boolean hasPendingEmail) { - + public CurrentUser hasPendingEmail(@javax.annotation.Nonnull Boolean hasPendingEmail) { this.hasPendingEmail = hasPendingEmail; return this; } - /** + /** * Get hasPendingEmail * @return hasPendingEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getHasPendingEmail() { return hasPendingEmail; } - - public void setHasPendingEmail(Boolean hasPendingEmail) { + public void setHasPendingEmail(@javax.annotation.Nonnull Boolean hasPendingEmail) { this.hasPendingEmail = hasPendingEmail; } - public CurrentUser hideContentFilterSettings(Boolean hideContentFilterSettings) { - + public CurrentUser hasSharedConnectionsOptOut(@javax.annotation.Nullable Boolean hasSharedConnectionsOptOut) { + this.hasSharedConnectionsOptOut = hasSharedConnectionsOptOut; + return this; + } + + /** + * Get hasSharedConnectionsOptOut + * @return hasSharedConnectionsOptOut + */ + @javax.annotation.Nullable + public Boolean getHasSharedConnectionsOptOut() { + return hasSharedConnectionsOptOut; + } + + public void setHasSharedConnectionsOptOut(@javax.annotation.Nullable Boolean hasSharedConnectionsOptOut) { + this.hasSharedConnectionsOptOut = hasSharedConnectionsOptOut; + } + + + public CurrentUser hideContentFilterSettings(@javax.annotation.Nullable Boolean hideContentFilterSettings) { this.hideContentFilterSettings = hideContentFilterSettings; return this; } - /** + /** * Get hideContentFilterSettings * @return hideContentFilterSettings - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getHideContentFilterSettings() { return hideContentFilterSettings; } - - public void setHideContentFilterSettings(Boolean hideContentFilterSettings) { + public void setHideContentFilterSettings(@javax.annotation.Nullable Boolean hideContentFilterSettings) { this.hideContentFilterSettings = hideContentFilterSettings; } - public CurrentUser homeLocation(String homeLocation) { - + public CurrentUser homeLocation(@javax.annotation.Nonnull String homeLocation) { this.homeLocation = homeLocation; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return homeLocation - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getHomeLocation() { return homeLocation; } - - public void setHomeLocation(String homeLocation) { + public void setHomeLocation(@javax.annotation.Nonnull String homeLocation) { this.homeLocation = homeLocation; } - public CurrentUser id(String id) { - + public CurrentUser id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public CurrentUser isAdult(Boolean isAdult) { - + public CurrentUser isAdult(@javax.annotation.Nonnull Boolean isAdult) { this.isAdult = isAdult; return this; } - /** + /** * Get isAdult * @return isAdult - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsAdult() { return isAdult; } - - public void setIsAdult(Boolean isAdult) { + public void setIsAdult(@javax.annotation.Nonnull Boolean isAdult) { this.isAdult = isAdult; } - public CurrentUser isBoopingEnabled(Boolean isBoopingEnabled) { - + public CurrentUser isBoopingEnabled(@javax.annotation.Nullable Boolean isBoopingEnabled) { this.isBoopingEnabled = isBoopingEnabled; return this; } - /** + /** * Get isBoopingEnabled * @return isBoopingEnabled - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsBoopingEnabled() { return isBoopingEnabled; } - - public void setIsBoopingEnabled(Boolean isBoopingEnabled) { + public void setIsBoopingEnabled(@javax.annotation.Nullable Boolean isBoopingEnabled) { this.isBoopingEnabled = isBoopingEnabled; } - public CurrentUser isFriend(Boolean isFriend) { - + public CurrentUser isFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; return this; } - /** + /** * Get isFriend * @return isFriend - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsFriend() { return isFriend; } - - public void setIsFriend(Boolean isFriend) { + public void setIsFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; } - public CurrentUser lastActivity(OffsetDateTime lastActivity) { - + public CurrentUser lastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { this.lastActivity = lastActivity; return this; } - /** + /** * Get lastActivity * @return lastActivity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getLastActivity() { return lastActivity; } - - public void setLastActivity(OffsetDateTime lastActivity) { + public void setLastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { this.lastActivity = lastActivity; } - public CurrentUser lastLogin(OffsetDateTime lastLogin) { - + public CurrentUser lastLogin(@javax.annotation.Nonnull OffsetDateTime lastLogin) { this.lastLogin = lastLogin; return this; } - /** + /** * Get lastLogin * @return lastLogin - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getLastLogin() { return lastLogin; } - - public void setLastLogin(OffsetDateTime lastLogin) { + public void setLastLogin(@javax.annotation.Nonnull OffsetDateTime lastLogin) { this.lastLogin = lastLogin; } - public CurrentUser lastMobile(OffsetDateTime lastMobile) { - + public CurrentUser lastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { this.lastMobile = lastMobile; return this; } - /** + /** * Get lastMobile * @return lastMobile - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getLastMobile() { return lastMobile; } - - public void setLastMobile(OffsetDateTime lastMobile) { + public void setLastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { this.lastMobile = lastMobile; } - public CurrentUser lastPlatform(String lastPlatform) { - + public CurrentUser lastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return lastPlatform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows", required = true, value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getLastPlatform() { return lastPlatform; } - - public void setLastPlatform(String lastPlatform) { + public void setLastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; } - public CurrentUser obfuscatedEmail(String obfuscatedEmail) { - + public CurrentUser obfuscatedEmail(@javax.annotation.Nonnull String obfuscatedEmail) { this.obfuscatedEmail = obfuscatedEmail; return this; } - /** + /** * Get obfuscatedEmail * @return obfuscatedEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getObfuscatedEmail() { return obfuscatedEmail; } - - public void setObfuscatedEmail(String obfuscatedEmail) { + public void setObfuscatedEmail(@javax.annotation.Nonnull String obfuscatedEmail) { this.obfuscatedEmail = obfuscatedEmail; } - public CurrentUser obfuscatedPendingEmail(String obfuscatedPendingEmail) { - + public CurrentUser obfuscatedPendingEmail(@javax.annotation.Nonnull String obfuscatedPendingEmail) { this.obfuscatedPendingEmail = obfuscatedPendingEmail; return this; } - /** + /** * Get obfuscatedPendingEmail * @return obfuscatedPendingEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getObfuscatedPendingEmail() { return obfuscatedPendingEmail; } - - public void setObfuscatedPendingEmail(String obfuscatedPendingEmail) { + public void setObfuscatedPendingEmail(@javax.annotation.Nonnull String obfuscatedPendingEmail) { this.obfuscatedPendingEmail = obfuscatedPendingEmail; } - public CurrentUser oculusId(String oculusId) { - + public CurrentUser oculusId(@javax.annotation.Nonnull String oculusId) { this.oculusId = oculusId; return this; } - /** + /** * Get oculusId * @return oculusId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getOculusId() { return oculusId; } - - public void setOculusId(String oculusId) { + public void setOculusId(@javax.annotation.Nonnull String oculusId) { this.oculusId = oculusId; } - public CurrentUser offlineFriends(List offlineFriends) { - + public CurrentUser offlineFriends(@javax.annotation.Nullable List offlineFriends) { this.offlineFriends = offlineFriends; return this; } @@ -1499,25 +1512,21 @@ public CurrentUser addOfflineFriendsItem(String offlineFriendsItem) { return this; } - /** + /** * Get offlineFriends * @return offlineFriends - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getOfflineFriends() { return offlineFriends; } - - public void setOfflineFriends(List offlineFriends) { + public void setOfflineFriends(@javax.annotation.Nullable List offlineFriends) { this.offlineFriends = offlineFriends; } - public CurrentUser onlineFriends(List onlineFriends) { - + public CurrentUser onlineFriends(@javax.annotation.Nullable List onlineFriends) { this.onlineFriends = onlineFriends; return this; } @@ -1530,76 +1539,67 @@ public CurrentUser addOnlineFriendsItem(String onlineFriendsItem) { return this; } - /** + /** * Get onlineFriends * @return onlineFriends - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getOnlineFriends() { return onlineFriends; } - - public void setOnlineFriends(List onlineFriends) { + public void setOnlineFriends(@javax.annotation.Nullable List onlineFriends) { this.onlineFriends = onlineFriends; } - public CurrentUser pastDisplayNames(List pastDisplayNames) { - + public CurrentUser pastDisplayNames(@javax.annotation.Nonnull List pastDisplayNames) { this.pastDisplayNames = pastDisplayNames; return this; } public CurrentUser addPastDisplayNamesItem(PastDisplayName pastDisplayNamesItem) { + if (this.pastDisplayNames == null) { + this.pastDisplayNames = new ArrayList<>(); + } this.pastDisplayNames.add(pastDisplayNamesItem); return this; } - /** + /** * * @return pastDisplayNames - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public List getPastDisplayNames() { return pastDisplayNames; } - - public void setPastDisplayNames(List pastDisplayNames) { + public void setPastDisplayNames(@javax.annotation.Nonnull List pastDisplayNames) { this.pastDisplayNames = pastDisplayNames; } - public CurrentUser picoId(String picoId) { - + public CurrentUser picoId(@javax.annotation.Nullable String picoId) { this.picoId = picoId; return this; } - /** + /** * Get picoId * @return picoId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPicoId() { return picoId; } - - public void setPicoId(String picoId) { + public void setPicoId(@javax.annotation.Nullable String picoId) { this.picoId = picoId; } - public CurrentUser platformHistory(List platformHistory) { - + public CurrentUser platformHistory(@javax.annotation.Nullable List platformHistory) { this.platformHistory = platformHistory; return this; } @@ -1612,611 +1612,557 @@ public CurrentUser addPlatformHistoryItem(CurrentUserPlatformHistoryInner platfo return this; } - /** + /** * Get platformHistory * @return platformHistory - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getPlatformHistory() { return platformHistory; } - - public void setPlatformHistory(List platformHistory) { + public void setPlatformHistory(@javax.annotation.Nullable List platformHistory) { this.platformHistory = platformHistory; } - public CurrentUser presence(CurrentUserPresence presence) { - + public CurrentUser presence(@javax.annotation.Nullable CurrentUserPresence presence) { this.presence = presence; return this; } - /** + /** * Get presence * @return presence - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public CurrentUserPresence getPresence() { return presence; } - - public void setPresence(CurrentUserPresence presence) { + public void setPresence(@javax.annotation.Nullable CurrentUserPresence presence) { this.presence = presence; } - public CurrentUser profilePicOverride(String profilePicOverride) { - + public CurrentUser profilePicOverride(@javax.annotation.Nonnull String profilePicOverride) { this.profilePicOverride = profilePicOverride; return this; } - /** + /** * Get profilePicOverride * @return profilePicOverride - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getProfilePicOverride() { return profilePicOverride; } - - public void setProfilePicOverride(String profilePicOverride) { + public void setProfilePicOverride(@javax.annotation.Nonnull String profilePicOverride) { this.profilePicOverride = profilePicOverride; } - public CurrentUser profilePicOverrideThumbnail(String profilePicOverrideThumbnail) { - + public CurrentUser profilePicOverrideThumbnail(@javax.annotation.Nonnull String profilePicOverrideThumbnail) { this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; return this; } - /** + /** * Get profilePicOverrideThumbnail * @return profilePicOverrideThumbnail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getProfilePicOverrideThumbnail() { return profilePicOverrideThumbnail; } - - public void setProfilePicOverrideThumbnail(String profilePicOverrideThumbnail) { + public void setProfilePicOverrideThumbnail(@javax.annotation.Nonnull String profilePicOverrideThumbnail) { this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; } - public CurrentUser pronouns(String pronouns) { - + public CurrentUser pronouns(@javax.annotation.Nonnull String pronouns) { this.pronouns = pronouns; return this; } - /** + /** * Get pronouns * @return pronouns - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getPronouns() { return pronouns; } - - public void setPronouns(String pronouns) { + public void setPronouns(@javax.annotation.Nonnull String pronouns) { this.pronouns = pronouns; } - public CurrentUser pronounsHistory(List pronounsHistory) { - + public CurrentUser pronounsHistory(@javax.annotation.Nonnull List pronounsHistory) { this.pronounsHistory = pronounsHistory; return this; } public CurrentUser addPronounsHistoryItem(String pronounsHistoryItem) { + if (this.pronounsHistory == null) { + this.pronounsHistory = new ArrayList<>(); + } this.pronounsHistory.add(pronounsHistoryItem); return this; } - /** + /** * Get pronounsHistory * @return pronounsHistory - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getPronounsHistory() { return pronounsHistory; } - - public void setPronounsHistory(List pronounsHistory) { + public void setPronounsHistory(@javax.annotation.Nonnull List pronounsHistory) { this.pronounsHistory = pronounsHistory; } - public CurrentUser queuedInstance(String queuedInstance) { - + public CurrentUser queuedInstance(@javax.annotation.Nullable String queuedInstance) { this.queuedInstance = queuedInstance; return this; } - /** + /** * Get queuedInstance * @return queuedInstance - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getQueuedInstance() { return queuedInstance; } - - public void setQueuedInstance(String queuedInstance) { + public void setQueuedInstance(@javax.annotation.Nullable String queuedInstance) { this.queuedInstance = queuedInstance; } - public CurrentUser receiveMobileInvitations(Boolean receiveMobileInvitations) { - + public CurrentUser receiveMobileInvitations(@javax.annotation.Nullable Boolean receiveMobileInvitations) { this.receiveMobileInvitations = receiveMobileInvitations; return this; } - /** + /** * Get receiveMobileInvitations * @return receiveMobileInvitations - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getReceiveMobileInvitations() { return receiveMobileInvitations; } - - public void setReceiveMobileInvitations(Boolean receiveMobileInvitations) { + public void setReceiveMobileInvitations(@javax.annotation.Nullable Boolean receiveMobileInvitations) { this.receiveMobileInvitations = receiveMobileInvitations; } - public CurrentUser state(UserState state) { - + public CurrentUser state(@javax.annotation.Nonnull UserState state) { this.state = state; return this; } - /** + /** * Get state * @return state - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public UserState getState() { return state; } - - public void setState(UserState state) { + public void setState(@javax.annotation.Nonnull UserState state) { this.state = state; } - public CurrentUser status(UserStatus status) { - + public CurrentUser status(@javax.annotation.Nonnull UserStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public UserStatus getStatus() { return status; } - - public void setStatus(UserStatus status) { + public void setStatus(@javax.annotation.Nonnull UserStatus status) { this.status = status; } - public CurrentUser statusDescription(String statusDescription) { - + public CurrentUser statusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; return this; } - /** + /** * Get statusDescription * @return statusDescription - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getStatusDescription() { return statusDescription; } - - public void setStatusDescription(String statusDescription) { + public void setStatusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; } - public CurrentUser statusFirstTime(Boolean statusFirstTime) { - + public CurrentUser statusFirstTime(@javax.annotation.Nonnull Boolean statusFirstTime) { this.statusFirstTime = statusFirstTime; return this; } - /** + /** * Get statusFirstTime * @return statusFirstTime - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getStatusFirstTime() { return statusFirstTime; } - - public void setStatusFirstTime(Boolean statusFirstTime) { + public void setStatusFirstTime(@javax.annotation.Nonnull Boolean statusFirstTime) { this.statusFirstTime = statusFirstTime; } - public CurrentUser statusHistory(List statusHistory) { - + public CurrentUser statusHistory(@javax.annotation.Nonnull List statusHistory) { this.statusHistory = statusHistory; return this; } public CurrentUser addStatusHistoryItem(String statusHistoryItem) { + if (this.statusHistory == null) { + this.statusHistory = new ArrayList<>(); + } this.statusHistory.add(statusHistoryItem); return this; } - /** + /** * Get statusHistory * @return statusHistory - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getStatusHistory() { return statusHistory; } - - public void setStatusHistory(List statusHistory) { + public void setStatusHistory(@javax.annotation.Nonnull List statusHistory) { this.statusHistory = statusHistory; } - public CurrentUser steamDetails(Object steamDetails) { - + public CurrentUser steamDetails(@javax.annotation.Nonnull Object steamDetails) { this.steamDetails = steamDetails; return this; } - /** + /** * Get steamDetails * @return steamDetails - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Object getSteamDetails() { return steamDetails; } - - public void setSteamDetails(Object steamDetails) { + public void setSteamDetails(@javax.annotation.Nonnull Object steamDetails) { this.steamDetails = steamDetails; } - public CurrentUser steamId(String steamId) { - + public CurrentUser steamId(@javax.annotation.Nonnull String steamId) { this.steamId = steamId; return this; } - /** + /** * Get steamId * @return steamId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSteamId() { return steamId; } - - public void setSteamId(String steamId) { + public void setSteamId(@javax.annotation.Nonnull String steamId) { this.steamId = steamId; } - public CurrentUser tags(List tags) { - + public CurrentUser tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public CurrentUser addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public CurrentUser twoFactorAuthEnabled(Boolean twoFactorAuthEnabled) { - + public CurrentUser twitchDetails(@javax.annotation.Nullable Object twitchDetails) { + this.twitchDetails = twitchDetails; + return this; + } + + /** + * Get twitchDetails + * @return twitchDetails + */ + @javax.annotation.Nullable + public Object getTwitchDetails() { + return twitchDetails; + } + + public void setTwitchDetails(@javax.annotation.Nullable Object twitchDetails) { + this.twitchDetails = twitchDetails; + } + + + public CurrentUser twitchId(@javax.annotation.Nullable String twitchId) { + this.twitchId = twitchId; + return this; + } + + /** + * Get twitchId + * @return twitchId + */ + @javax.annotation.Nullable + public String getTwitchId() { + return twitchId; + } + + public void setTwitchId(@javax.annotation.Nullable String twitchId) { + this.twitchId = twitchId; + } + + + public CurrentUser twoFactorAuthEnabled(@javax.annotation.Nonnull Boolean twoFactorAuthEnabled) { this.twoFactorAuthEnabled = twoFactorAuthEnabled; return this; } - /** + /** * Get twoFactorAuthEnabled * @return twoFactorAuthEnabled - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getTwoFactorAuthEnabled() { return twoFactorAuthEnabled; } - - public void setTwoFactorAuthEnabled(Boolean twoFactorAuthEnabled) { + public void setTwoFactorAuthEnabled(@javax.annotation.Nonnull Boolean twoFactorAuthEnabled) { this.twoFactorAuthEnabled = twoFactorAuthEnabled; } - public CurrentUser twoFactorAuthEnabledDate(OffsetDateTime twoFactorAuthEnabledDate) { - + public CurrentUser twoFactorAuthEnabledDate(@javax.annotation.Nullable OffsetDateTime twoFactorAuthEnabledDate) { this.twoFactorAuthEnabledDate = twoFactorAuthEnabledDate; return this; } - /** + /** * Get twoFactorAuthEnabledDate * @return twoFactorAuthEnabledDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getTwoFactorAuthEnabledDate() { return twoFactorAuthEnabledDate; } - - public void setTwoFactorAuthEnabledDate(OffsetDateTime twoFactorAuthEnabledDate) { + public void setTwoFactorAuthEnabledDate(@javax.annotation.Nullable OffsetDateTime twoFactorAuthEnabledDate) { this.twoFactorAuthEnabledDate = twoFactorAuthEnabledDate; } - public CurrentUser unsubscribe(Boolean unsubscribe) { - + public CurrentUser unsubscribe(@javax.annotation.Nonnull Boolean unsubscribe) { this.unsubscribe = unsubscribe; return this; } - /** + /** * Get unsubscribe * @return unsubscribe - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getUnsubscribe() { return unsubscribe; } - - public void setUnsubscribe(Boolean unsubscribe) { + public void setUnsubscribe(@javax.annotation.Nonnull Boolean unsubscribe) { this.unsubscribe = unsubscribe; } - public CurrentUser updatedAt(OffsetDateTime updatedAt) { - + public CurrentUser updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public CurrentUser userIcon(String userIcon) { - + public CurrentUser userIcon(@javax.annotation.Nonnull String userIcon) { this.userIcon = userIcon; return this; } - /** + /** * Get userIcon * @return userIcon - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getUserIcon() { return userIcon; } - - public void setUserIcon(String userIcon) { + public void setUserIcon(@javax.annotation.Nonnull String userIcon) { this.userIcon = userIcon; } - public CurrentUser userLanguage(String userLanguage) { - + public CurrentUser userLanguage(@javax.annotation.Nullable String userLanguage) { this.userLanguage = userLanguage; return this; } - /** + /** * Get userLanguage * @return userLanguage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUserLanguage() { return userLanguage; } - - public void setUserLanguage(String userLanguage) { + public void setUserLanguage(@javax.annotation.Nullable String userLanguage) { this.userLanguage = userLanguage; } - public CurrentUser userLanguageCode(String userLanguageCode) { - + public CurrentUser userLanguageCode(@javax.annotation.Nullable String userLanguageCode) { this.userLanguageCode = userLanguageCode; return this; } - /** + /** * Get userLanguageCode * @return userLanguageCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUserLanguageCode() { return userLanguageCode; } - - public void setUserLanguageCode(String userLanguageCode) { + public void setUserLanguageCode(@javax.annotation.Nullable String userLanguageCode) { this.userLanguageCode = userLanguageCode; } - public CurrentUser username(String username) { - + @Deprecated + public CurrentUser username(@javax.annotation.Nullable String username) { this.username = username; return this; } - /** + /** * -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). * @return username * @deprecated - **/ + */ @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "-| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).") - public String getUsername() { return username; } - - public void setUsername(String username) { + @Deprecated + public void setUsername(@javax.annotation.Nullable String username) { this.username = username; } - public CurrentUser usesGeneratedPassword(Boolean usesGeneratedPassword) { - + public CurrentUser usesGeneratedPassword(@javax.annotation.Nonnull Boolean usesGeneratedPassword) { this.usesGeneratedPassword = usesGeneratedPassword; return this; } - /** + /** * Get usesGeneratedPassword * @return usesGeneratedPassword - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getUsesGeneratedPassword() { return usesGeneratedPassword; } - - public void setUsesGeneratedPassword(Boolean usesGeneratedPassword) { + public void setUsesGeneratedPassword(@javax.annotation.Nonnull Boolean usesGeneratedPassword) { this.usesGeneratedPassword = usesGeneratedPassword; } - public CurrentUser viveId(String viveId) { - + public CurrentUser viveId(@javax.annotation.Nullable String viveId) { this.viveId = viveId; return this; } - /** + /** * Get viveId * @return viveId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getViveId() { return viveId; } - - public void setViveId(String viveId) { + public void setViveId(@javax.annotation.Nullable String viveId) { this.viveId = viveId; } @@ -2239,6 +2185,8 @@ public boolean equals(Object o) { Objects.equals(this.ageVerificationStatus, currentUser.ageVerificationStatus) && Objects.equals(this.ageVerified, currentUser.ageVerified) && Objects.equals(this.allowAvatarCopying, currentUser.allowAvatarCopying) && + Objects.equals(this.appleDetails, currentUser.appleDetails) && + Objects.equals(this.appleId, currentUser.appleId) && Objects.equals(this.authToken, currentUser.authToken) && Objects.equals(this.badges, currentUser.badges) && Objects.equals(this.bio, currentUser.bio) && @@ -2261,9 +2209,11 @@ public boolean equals(Object o) { Objects.equals(this.googleDetails, currentUser.googleDetails) && Objects.equals(this.googleId, currentUser.googleId) && Objects.equals(this.hasBirthday, currentUser.hasBirthday) && + Objects.equals(this.hasDiscordFriendsOptOut, currentUser.hasDiscordFriendsOptOut) && Objects.equals(this.hasEmail, currentUser.hasEmail) && Objects.equals(this.hasLoggedInFromClient, currentUser.hasLoggedInFromClient) && Objects.equals(this.hasPendingEmail, currentUser.hasPendingEmail) && + Objects.equals(this.hasSharedConnectionsOptOut, currentUser.hasSharedConnectionsOptOut) && Objects.equals(this.hideContentFilterSettings, currentUser.hideContentFilterSettings) && Objects.equals(this.homeLocation, currentUser.homeLocation) && Objects.equals(this.id, currentUser.id) && @@ -2297,6 +2247,8 @@ public boolean equals(Object o) { Objects.equals(this.steamDetails, currentUser.steamDetails) && Objects.equals(this.steamId, currentUser.steamId) && Objects.equals(this.tags, currentUser.tags) && + Objects.equals(this.twitchDetails, currentUser.twitchDetails) && + Objects.equals(this.twitchId, currentUser.twitchId) && Objects.equals(this.twoFactorAuthEnabled, currentUser.twoFactorAuthEnabled) && Objects.equals(this.twoFactorAuthEnabledDate, currentUser.twoFactorAuthEnabledDate) && Objects.equals(this.unsubscribe, currentUser.unsubscribe) && @@ -2315,7 +2267,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(acceptedPrivacyVersion, acceptedTOSVersion, accountDeletionDate, accountDeletionLog, activeFriends, ageVerificationStatus, ageVerified, allowAvatarCopying, authToken, badges, bio, bioLinks, contentFilters, currentAvatar, currentAvatarImageUrl, currentAvatarTags, currentAvatarThumbnailImageUrl, dateJoined, developerType, discordDetails, discordId, displayName, emailVerified, fallbackAvatar, friendGroupNames, friendKey, friends, googleDetails, googleId, hasBirthday, hasEmail, hasLoggedInFromClient, hasPendingEmail, hideContentFilterSettings, homeLocation, id, isAdult, isBoopingEnabled, isFriend, lastActivity, lastLogin, lastMobile, lastPlatform, obfuscatedEmail, obfuscatedPendingEmail, oculusId, offlineFriends, onlineFriends, pastDisplayNames, picoId, platformHistory, presence, profilePicOverride, profilePicOverrideThumbnail, pronouns, pronounsHistory, queuedInstance, receiveMobileInvitations, state, status, statusDescription, statusFirstTime, statusHistory, steamDetails, steamId, tags, twoFactorAuthEnabled, twoFactorAuthEnabledDate, unsubscribe, updatedAt, userIcon, userLanguage, userLanguageCode, username, usesGeneratedPassword, viveId); + return Objects.hash(acceptedPrivacyVersion, acceptedTOSVersion, accountDeletionDate, accountDeletionLog, activeFriends, ageVerificationStatus, ageVerified, allowAvatarCopying, appleDetails, appleId, authToken, badges, bio, bioLinks, contentFilters, currentAvatar, currentAvatarImageUrl, currentAvatarTags, currentAvatarThumbnailImageUrl, dateJoined, developerType, discordDetails, discordId, displayName, emailVerified, fallbackAvatar, friendGroupNames, friendKey, friends, googleDetails, googleId, hasBirthday, hasDiscordFriendsOptOut, hasEmail, hasLoggedInFromClient, hasPendingEmail, hasSharedConnectionsOptOut, hideContentFilterSettings, homeLocation, id, isAdult, isBoopingEnabled, isFriend, lastActivity, lastLogin, lastMobile, lastPlatform, obfuscatedEmail, obfuscatedPendingEmail, oculusId, offlineFriends, onlineFriends, pastDisplayNames, picoId, platformHistory, presence, profilePicOverride, profilePicOverrideThumbnail, pronouns, pronounsHistory, queuedInstance, receiveMobileInvitations, state, status, statusDescription, statusFirstTime, statusHistory, steamDetails, steamId, tags, twitchDetails, twitchId, twoFactorAuthEnabled, twoFactorAuthEnabledDate, unsubscribe, updatedAt, userIcon, userLanguage, userLanguageCode, username, usesGeneratedPassword, viveId); } private static int hashCodeNullable(JsonNullable a) { @@ -2337,6 +2289,8 @@ public String toString() { sb.append(" ageVerificationStatus: ").append(toIndentedString(ageVerificationStatus)).append("\n"); sb.append(" ageVerified: ").append(toIndentedString(ageVerified)).append("\n"); sb.append(" allowAvatarCopying: ").append(toIndentedString(allowAvatarCopying)).append("\n"); + sb.append(" appleDetails: ").append(toIndentedString(appleDetails)).append("\n"); + sb.append(" appleId: ").append(toIndentedString(appleId)).append("\n"); sb.append(" authToken: ").append(toIndentedString(authToken)).append("\n"); sb.append(" badges: ").append(toIndentedString(badges)).append("\n"); sb.append(" bio: ").append(toIndentedString(bio)).append("\n"); @@ -2359,9 +2313,11 @@ public String toString() { sb.append(" googleDetails: ").append(toIndentedString(googleDetails)).append("\n"); sb.append(" googleId: ").append(toIndentedString(googleId)).append("\n"); sb.append(" hasBirthday: ").append(toIndentedString(hasBirthday)).append("\n"); + sb.append(" hasDiscordFriendsOptOut: ").append(toIndentedString(hasDiscordFriendsOptOut)).append("\n"); sb.append(" hasEmail: ").append(toIndentedString(hasEmail)).append("\n"); sb.append(" hasLoggedInFromClient: ").append(toIndentedString(hasLoggedInFromClient)).append("\n"); sb.append(" hasPendingEmail: ").append(toIndentedString(hasPendingEmail)).append("\n"); + sb.append(" hasSharedConnectionsOptOut: ").append(toIndentedString(hasSharedConnectionsOptOut)).append("\n"); sb.append(" hideContentFilterSettings: ").append(toIndentedString(hideContentFilterSettings)).append("\n"); sb.append(" homeLocation: ").append(toIndentedString(homeLocation)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -2395,6 +2351,8 @@ public String toString() { sb.append(" steamDetails: ").append(toIndentedString(steamDetails)).append("\n"); sb.append(" steamId: ").append(toIndentedString(steamId)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" twitchDetails: ").append(toIndentedString(twitchDetails)).append("\n"); + sb.append(" twitchId: ").append(toIndentedString(twitchId)).append("\n"); sb.append(" twoFactorAuthEnabled: ").append(toIndentedString(twoFactorAuthEnabled)).append("\n"); sb.append(" twoFactorAuthEnabledDate: ").append(toIndentedString(twoFactorAuthEnabledDate)).append("\n"); sb.append(" unsubscribe: ").append(toIndentedString(unsubscribe)).append("\n"); @@ -2414,10 +2372,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -2426,364 +2381,255 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("acceptedPrivacyVersion"); - openapiFields.add("acceptedTOSVersion"); - openapiFields.add("accountDeletionDate"); - openapiFields.add("accountDeletionLog"); - openapiFields.add("activeFriends"); - openapiFields.add("ageVerificationStatus"); - openapiFields.add("ageVerified"); - openapiFields.add("allowAvatarCopying"); - openapiFields.add("authToken"); - openapiFields.add("badges"); - openapiFields.add("bio"); - openapiFields.add("bioLinks"); - openapiFields.add("contentFilters"); - openapiFields.add("currentAvatar"); - openapiFields.add("currentAvatarImageUrl"); - openapiFields.add("currentAvatarTags"); - openapiFields.add("currentAvatarThumbnailImageUrl"); - openapiFields.add("date_joined"); - openapiFields.add("developerType"); - openapiFields.add("discordDetails"); - openapiFields.add("discordId"); - openapiFields.add("displayName"); - openapiFields.add("emailVerified"); - openapiFields.add("fallbackAvatar"); - openapiFields.add("friendGroupNames"); - openapiFields.add("friendKey"); - openapiFields.add("friends"); - openapiFields.add("googleDetails"); - openapiFields.add("googleId"); - openapiFields.add("hasBirthday"); - openapiFields.add("hasEmail"); - openapiFields.add("hasLoggedInFromClient"); - openapiFields.add("hasPendingEmail"); - openapiFields.add("hideContentFilterSettings"); - openapiFields.add("homeLocation"); - openapiFields.add("id"); - openapiFields.add("isAdult"); - openapiFields.add("isBoopingEnabled"); - openapiFields.add("isFriend"); - openapiFields.add("last_activity"); - openapiFields.add("last_login"); - openapiFields.add("last_mobile"); - openapiFields.add("last_platform"); - openapiFields.add("obfuscatedEmail"); - openapiFields.add("obfuscatedPendingEmail"); - openapiFields.add("oculusId"); - openapiFields.add("offlineFriends"); - openapiFields.add("onlineFriends"); - openapiFields.add("pastDisplayNames"); - openapiFields.add("picoId"); - openapiFields.add("platform_history"); - openapiFields.add("presence"); - openapiFields.add("profilePicOverride"); - openapiFields.add("profilePicOverrideThumbnail"); - openapiFields.add("pronouns"); - openapiFields.add("pronounsHistory"); - openapiFields.add("queuedInstance"); - openapiFields.add("receiveMobileInvitations"); - openapiFields.add("state"); - openapiFields.add("status"); - openapiFields.add("statusDescription"); - openapiFields.add("statusFirstTime"); - openapiFields.add("statusHistory"); - openapiFields.add("steamDetails"); - openapiFields.add("steamId"); - openapiFields.add("tags"); - openapiFields.add("twoFactorAuthEnabled"); - openapiFields.add("twoFactorAuthEnabledDate"); - openapiFields.add("unsubscribe"); - openapiFields.add("updated_at"); - openapiFields.add("userIcon"); - openapiFields.add("userLanguage"); - openapiFields.add("userLanguageCode"); - openapiFields.add("username"); - openapiFields.add("usesGeneratedPassword"); - openapiFields.add("viveId"); + openapiFields = new HashSet(Arrays.asList("acceptedPrivacyVersion", "acceptedTOSVersion", "accountDeletionDate", "accountDeletionLog", "activeFriends", "ageVerificationStatus", "ageVerified", "allowAvatarCopying", "appleDetails", "appleId", "authToken", "badges", "bio", "bioLinks", "contentFilters", "currentAvatar", "currentAvatarImageUrl", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "date_joined", "developerType", "discordDetails", "discordId", "displayName", "emailVerified", "fallbackAvatar", "friendGroupNames", "friendKey", "friends", "googleDetails", "googleId", "hasBirthday", "hasDiscordFriendsOptOut", "hasEmail", "hasLoggedInFromClient", "hasPendingEmail", "hasSharedConnectionsOptOut", "hideContentFilterSettings", "homeLocation", "id", "isAdult", "isBoopingEnabled", "isFriend", "last_activity", "last_login", "last_mobile", "last_platform", "obfuscatedEmail", "obfuscatedPendingEmail", "oculusId", "offlineFriends", "onlineFriends", "pastDisplayNames", "picoId", "platform_history", "presence", "profilePicOverride", "profilePicOverrideThumbnail", "pronouns", "pronounsHistory", "queuedInstance", "receiveMobileInvitations", "state", "status", "statusDescription", "statusFirstTime", "statusHistory", "steamDetails", "steamId", "tags", "twitchDetails", "twitchId", "twoFactorAuthEnabled", "twoFactorAuthEnabledDate", "unsubscribe", "updated_at", "userIcon", "userLanguage", "userLanguageCode", "username", "usesGeneratedPassword", "viveId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("acceptedTOSVersion"); - openapiRequiredFields.add("ageVerificationStatus"); - openapiRequiredFields.add("ageVerified"); - openapiRequiredFields.add("allowAvatarCopying"); - openapiRequiredFields.add("bio"); - openapiRequiredFields.add("bioLinks"); - openapiRequiredFields.add("currentAvatar"); - openapiRequiredFields.add("currentAvatarImageUrl"); - openapiRequiredFields.add("currentAvatarTags"); - openapiRequiredFields.add("currentAvatarThumbnailImageUrl"); - openapiRequiredFields.add("date_joined"); - openapiRequiredFields.add("developerType"); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("emailVerified"); - openapiRequiredFields.add("friendGroupNames"); - openapiRequiredFields.add("friendKey"); - openapiRequiredFields.add("friends"); - openapiRequiredFields.add("hasBirthday"); - openapiRequiredFields.add("hasEmail"); - openapiRequiredFields.add("hasLoggedInFromClient"); - openapiRequiredFields.add("hasPendingEmail"); - openapiRequiredFields.add("homeLocation"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("isAdult"); - openapiRequiredFields.add("isFriend"); - openapiRequiredFields.add("last_login"); - openapiRequiredFields.add("last_mobile"); - openapiRequiredFields.add("last_platform"); - openapiRequiredFields.add("obfuscatedEmail"); - openapiRequiredFields.add("obfuscatedPendingEmail"); - openapiRequiredFields.add("oculusId"); - openapiRequiredFields.add("pastDisplayNames"); - openapiRequiredFields.add("profilePicOverride"); - openapiRequiredFields.add("profilePicOverrideThumbnail"); - openapiRequiredFields.add("pronouns"); - openapiRequiredFields.add("pronounsHistory"); - openapiRequiredFields.add("state"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("statusDescription"); - openapiRequiredFields.add("statusFirstTime"); - openapiRequiredFields.add("statusHistory"); - openapiRequiredFields.add("steamDetails"); - openapiRequiredFields.add("steamId"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("twoFactorAuthEnabled"); - openapiRequiredFields.add("unsubscribe"); - openapiRequiredFields.add("userIcon"); - openapiRequiredFields.add("usesGeneratedPassword"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CurrentUser - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CurrentUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CurrentUser is not found in the empty JSON string", CurrentUser.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("acceptedTOSVersion", "ageVerificationStatus", "ageVerified", "allowAvatarCopying", "bio", "bioLinks", "currentAvatar", "currentAvatarImageUrl", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "date_joined", "developerType", "displayName", "emailVerified", "friendGroupNames", "friendKey", "friends", "hasBirthday", "hasEmail", "hasLoggedInFromClient", "hasPendingEmail", "homeLocation", "id", "isAdult", "isFriend", "last_login", "last_mobile", "last_platform", "obfuscatedEmail", "obfuscatedPendingEmail", "oculusId", "pastDisplayNames", "profilePicOverride", "profilePicOverrideThumbnail", "pronouns", "pronounsHistory", "state", "status", "statusDescription", "statusFirstTime", "statusHistory", "steamDetails", "steamId", "tags", "twoFactorAuthEnabled", "unsubscribe", "userIcon", "usesGeneratedPassword")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CurrentUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CurrentUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CurrentUser is not found in the empty JSON string", CurrentUser.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CurrentUser.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CurrentUser` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CurrentUser` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CurrentUser.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("accountDeletionLog") != null && !jsonObj.get("accountDeletionLog").isJsonNull()) { JsonArray jsonArrayaccountDeletionLog = jsonObj.getAsJsonArray("accountDeletionLog"); if (jsonArrayaccountDeletionLog != null) { // ensure the json data is an array if (!jsonObj.get("accountDeletionLog").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `accountDeletionLog` to be an array in the JSON string but got `%s`", jsonObj.get("accountDeletionLog").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountDeletionLog` to be an array in the JSON string but got `%s`", jsonObj.get("accountDeletionLog").toString())); } // validate the optional field `accountDeletionLog` (array) for (int i = 0; i < jsonArrayaccountDeletionLog.size(); i++) { - AccountDeletionLog.validateJsonObject(jsonArrayaccountDeletionLog.get(i).getAsJsonObject()); + AccountDeletionLog.validateJsonElement(jsonArrayaccountDeletionLog.get(i)); }; } } // ensure the optional json data is an array if present - if (jsonObj.get("activeFriends") != null && !jsonObj.get("activeFriends").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `activeFriends` to be an array in the JSON string but got `%s`", jsonObj.get("activeFriends").toString())); + if (jsonObj.get("activeFriends") != null && !jsonObj.get("activeFriends").isJsonNull() && !jsonObj.get("activeFriends").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `activeFriends` to be an array in the JSON string but got `%s`", jsonObj.get("activeFriends").toString())); + } + // validate the required field `ageVerificationStatus` + AgeVerificationStatus.validateJsonElement(jsonObj.get("ageVerificationStatus")); + if ((jsonObj.get("appleId") != null && !jsonObj.get("appleId").isJsonNull()) && !jsonObj.get("appleId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `appleId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appleId").toString())); } if ((jsonObj.get("authToken") != null && !jsonObj.get("authToken").isJsonNull()) && !jsonObj.get("authToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authToken").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authToken").toString())); } if (jsonObj.get("badges") != null && !jsonObj.get("badges").isJsonNull()) { JsonArray jsonArraybadges = jsonObj.getAsJsonArray("badges"); if (jsonArraybadges != null) { // ensure the json data is an array if (!jsonObj.get("badges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `badges` to be an array in the JSON string but got `%s`", jsonObj.get("badges").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badges` to be an array in the JSON string but got `%s`", jsonObj.get("badges").toString())); } // validate the optional field `badges` (array) for (int i = 0; i < jsonArraybadges.size(); i++) { - Badge.validateJsonObject(jsonArraybadges.get(i).getAsJsonObject()); + Badge.validateJsonElement(jsonArraybadges.get(i)); }; } } if (!jsonObj.get("bio").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); } // ensure the required json array is present if (jsonObj.get("bioLinks") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("bioLinks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("contentFilters") != null && !jsonObj.get("contentFilters").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `contentFilters` to be an array in the JSON string but got `%s`", jsonObj.get("contentFilters").toString())); + if (jsonObj.get("contentFilters") != null && !jsonObj.get("contentFilters").isJsonNull() && !jsonObj.get("contentFilters").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentFilters` to be an array in the JSON string but got `%s`", jsonObj.get("contentFilters").toString())); } if (!jsonObj.get("currentAvatar").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatar").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatar").toString())); } if (!jsonObj.get("currentAvatarImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); } // ensure the required json array is present if (jsonObj.get("currentAvatarTags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("currentAvatarTags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); } if (!jsonObj.get("currentAvatarThumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); } + // validate the required field `developerType` + DeveloperType.validateJsonElement(jsonObj.get("developerType")); // validate the optional field `discordDetails` if (jsonObj.get("discordDetails") != null && !jsonObj.get("discordDetails").isJsonNull()) { - DiscordDetails.validateJsonObject(jsonObj.getAsJsonObject("discordDetails")); + DiscordDetails.validateJsonElement(jsonObj.get("discordDetails")); } if ((jsonObj.get("discordId") != null && !jsonObj.get("discordId").isJsonNull()) && !jsonObj.get("discordId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `discordId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discordId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `discordId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discordId").toString())); } if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("fallbackAvatar") != null && !jsonObj.get("fallbackAvatar").isJsonNull()) && !jsonObj.get("fallbackAvatar").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackAvatar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackAvatar").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fallbackAvatar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackAvatar").toString())); } // ensure the required json array is present if (jsonObj.get("friendGroupNames") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("friendGroupNames").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `friendGroupNames` to be an array in the JSON string but got `%s`", jsonObj.get("friendGroupNames").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `friendGroupNames` to be an array in the JSON string but got `%s`", jsonObj.get("friendGroupNames").toString())); } if (!jsonObj.get("friendKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `friendKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friendKey").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `friendKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friendKey").toString())); } // ensure the required json array is present if (jsonObj.get("friends") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("friends").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `friends` to be an array in the JSON string but got `%s`", jsonObj.get("friends").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `friends` to be an array in the JSON string but got `%s`", jsonObj.get("friends").toString())); } if ((jsonObj.get("googleId") != null && !jsonObj.get("googleId").isJsonNull()) && !jsonObj.get("googleId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `googleId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("googleId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `googleId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("googleId").toString())); } if (!jsonObj.get("homeLocation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `homeLocation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("homeLocation").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `homeLocation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("homeLocation").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("last_platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_platform").toString())); } if (!jsonObj.get("obfuscatedEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `obfuscatedEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("obfuscatedEmail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `obfuscatedEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("obfuscatedEmail").toString())); } if (!jsonObj.get("obfuscatedPendingEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `obfuscatedPendingEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("obfuscatedPendingEmail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `obfuscatedPendingEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("obfuscatedPendingEmail").toString())); } if (!jsonObj.get("oculusId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `oculusId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("oculusId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `oculusId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("oculusId").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("offlineFriends") != null && !jsonObj.get("offlineFriends").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `offlineFriends` to be an array in the JSON string but got `%s`", jsonObj.get("offlineFriends").toString())); + if (jsonObj.get("offlineFriends") != null && !jsonObj.get("offlineFriends").isJsonNull() && !jsonObj.get("offlineFriends").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `offlineFriends` to be an array in the JSON string but got `%s`", jsonObj.get("offlineFriends").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("onlineFriends") != null && !jsonObj.get("onlineFriends").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `onlineFriends` to be an array in the JSON string but got `%s`", jsonObj.get("onlineFriends").toString())); + if (jsonObj.get("onlineFriends") != null && !jsonObj.get("onlineFriends").isJsonNull() && !jsonObj.get("onlineFriends").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `onlineFriends` to be an array in the JSON string but got `%s`", jsonObj.get("onlineFriends").toString())); } - // ensure the json data is an array - if (!jsonObj.get("pastDisplayNames").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `pastDisplayNames` to be an array in the JSON string but got `%s`", jsonObj.get("pastDisplayNames").toString())); + if (jsonObj.get("pastDisplayNames") != null) { + if (!jsonObj.get("pastDisplayNames").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pastDisplayNames` to be an array in the JSON string but got `%s`", jsonObj.get("pastDisplayNames").toString())); + } + JsonArray jsonArraypastDisplayNames = jsonObj.getAsJsonArray("pastDisplayNames"); + // validate the required field `pastDisplayNames` (array) + for (int i = 0; i < jsonArraypastDisplayNames.size(); i++) { + PastDisplayName.validateJsonElement(jsonArraypastDisplayNames.get(i)); + } } - - JsonArray jsonArraypastDisplayNames = jsonObj.getAsJsonArray("pastDisplayNames"); - // validate the required field `pastDisplayNames` (array) - for (int i = 0; i < jsonArraypastDisplayNames.size(); i++) { - PastDisplayName.validateJsonObject(jsonArraypastDisplayNames.get(i).getAsJsonObject()); - }; if ((jsonObj.get("picoId") != null && !jsonObj.get("picoId").isJsonNull()) && !jsonObj.get("picoId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `picoId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("picoId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `picoId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("picoId").toString())); } if (jsonObj.get("platform_history") != null && !jsonObj.get("platform_history").isJsonNull()) { JsonArray jsonArrayplatformHistory = jsonObj.getAsJsonArray("platform_history"); if (jsonArrayplatformHistory != null) { // ensure the json data is an array if (!jsonObj.get("platform_history").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `platform_history` to be an array in the JSON string but got `%s`", jsonObj.get("platform_history").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform_history` to be an array in the JSON string but got `%s`", jsonObj.get("platform_history").toString())); } // validate the optional field `platform_history` (array) for (int i = 0; i < jsonArrayplatformHistory.size(); i++) { - CurrentUserPlatformHistoryInner.validateJsonObject(jsonArrayplatformHistory.get(i).getAsJsonObject()); + CurrentUserPlatformHistoryInner.validateJsonElement(jsonArrayplatformHistory.get(i)); }; } } // validate the optional field `presence` if (jsonObj.get("presence") != null && !jsonObj.get("presence").isJsonNull()) { - CurrentUserPresence.validateJsonObject(jsonObj.getAsJsonObject("presence")); + CurrentUserPresence.validateJsonElement(jsonObj.get("presence")); } if (!jsonObj.get("profilePicOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); } if (!jsonObj.get("profilePicOverrideThumbnail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverrideThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverrideThumbnail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverrideThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverrideThumbnail").toString())); } if (!jsonObj.get("pronouns").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `pronouns` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronouns").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pronouns` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronouns").toString())); } // ensure the required json array is present if (jsonObj.get("pronounsHistory") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("pronounsHistory").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `pronounsHistory` to be an array in the JSON string but got `%s`", jsonObj.get("pronounsHistory").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pronounsHistory` to be an array in the JSON string but got `%s`", jsonObj.get("pronounsHistory").toString())); } if ((jsonObj.get("queuedInstance") != null && !jsonObj.get("queuedInstance").isJsonNull()) && !jsonObj.get("queuedInstance").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `queuedInstance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("queuedInstance").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `queuedInstance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("queuedInstance").toString())); } + // validate the required field `state` + UserState.validateJsonElement(jsonObj.get("state")); + // validate the required field `status` + UserStatus.validateJsonElement(jsonObj.get("status")); if (!jsonObj.get("statusDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); } // ensure the required json array is present if (jsonObj.get("statusHistory") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("statusHistory").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `statusHistory` to be an array in the JSON string but got `%s`", jsonObj.get("statusHistory").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `statusHistory` to be an array in the JSON string but got `%s`", jsonObj.get("statusHistory").toString())); } if (!jsonObj.get("steamId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `steamId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `steamId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamId").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + if ((jsonObj.get("twitchId") != null && !jsonObj.get("twitchId").isJsonNull()) && !jsonObj.get("twitchId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `twitchId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("twitchId").toString())); } if (!jsonObj.get("userIcon").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); } if ((jsonObj.get("userLanguage") != null && !jsonObj.get("userLanguage").isJsonNull()) && !jsonObj.get("userLanguage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userLanguage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userLanguage").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userLanguage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userLanguage").toString())); } if ((jsonObj.get("userLanguageCode") != null && !jsonObj.get("userLanguageCode").isJsonNull()) && !jsonObj.get("userLanguageCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userLanguageCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userLanguageCode").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userLanguageCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userLanguageCode").toString())); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("viveId") != null && !jsonObj.get("viveId").isJsonNull()) && !jsonObj.get("viveId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `viveId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("viveId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `viveId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("viveId").toString())); } } @@ -2807,31 +2653,31 @@ public void write(JsonWriter out, CurrentUser value) throws IOException { @Override public CurrentUser read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CurrentUser given an JSON string - * - * @param jsonString JSON string - * @return An instance of CurrentUser - * @throws IOException if the JSON string is invalid with respect to CurrentUser - */ + /** + * Create an instance of CurrentUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of CurrentUser + * @throws IOException if the JSON string is invalid with respect to CurrentUser + */ public static CurrentUser fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CurrentUser.class); } - /** - * Convert an instance of CurrentUser to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CurrentUser to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CurrentUserPlatformHistoryInner.java b/src/main/java/io/github/vrchatapi/model/CurrentUserPlatformHistoryInner.java index a04d618c..4b5ade9e 100644 --- a/src/main/java/io/github/vrchatapi/model/CurrentUserPlatformHistoryInner.java +++ b/src/main/java/io/github/vrchatapi/model/CurrentUserPlatformHistoryInner.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,88 +48,79 @@ /** * CurrentUserPlatformHistoryInner */ -@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 CurrentUserPlatformHistoryInner { public static final String SERIALIZED_NAME_IS_MOBILE = "isMobile"; @SerializedName(SERIALIZED_NAME_IS_MOBILE) + @javax.annotation.Nullable private Boolean isMobile; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nullable private String platform; public static final String SERIALIZED_NAME_RECORDED = "recorded"; @SerializedName(SERIALIZED_NAME_RECORDED) + @javax.annotation.Nullable private OffsetDateTime recorded; public CurrentUserPlatformHistoryInner() { } - public CurrentUserPlatformHistoryInner isMobile(Boolean isMobile) { - + public CurrentUserPlatformHistoryInner isMobile(@javax.annotation.Nullable Boolean isMobile) { this.isMobile = isMobile; return this; } - /** + /** * Get isMobile * @return isMobile - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsMobile() { return isMobile; } - - public void setIsMobile(Boolean isMobile) { + public void setIsMobile(@javax.annotation.Nullable Boolean isMobile) { this.isMobile = isMobile; } - public CurrentUserPlatformHistoryInner platform(String platform) { - + public CurrentUserPlatformHistoryInner platform(@javax.annotation.Nullable String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "standalonewindows", value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nullable String platform) { this.platform = platform; } - public CurrentUserPlatformHistoryInner recorded(OffsetDateTime recorded) { - + public CurrentUserPlatformHistoryInner recorded(@javax.annotation.Nullable OffsetDateTime recorded) { this.recorded = recorded; return this; } - /** + /** * Get recorded * @return recorded - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getRecorded() { return recorded; } - - public void setRecorded(OffsetDateTime recorded) { + public void setRecorded(@javax.annotation.Nullable OffsetDateTime recorded) { this.recorded = recorded; } @@ -170,10 +161,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -182,37 +170,35 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("isMobile"); - openapiFields.add("platform"); - openapiFields.add("recorded"); + openapiFields = new HashSet(Arrays.asList("isMobile", "platform", "recorded")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CurrentUserPlatformHistoryInner - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CurrentUserPlatformHistoryInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CurrentUserPlatformHistoryInner is not found in the empty JSON string", CurrentUserPlatformHistoryInner.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CurrentUserPlatformHistoryInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CurrentUserPlatformHistoryInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CurrentUserPlatformHistoryInner is not found in the empty JSON string", CurrentUserPlatformHistoryInner.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CurrentUserPlatformHistoryInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CurrentUserPlatformHistoryInner` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CurrentUserPlatformHistoryInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) && !jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } } @@ -236,31 +222,31 @@ public void write(JsonWriter out, CurrentUserPlatformHistoryInner value) throws @Override public CurrentUserPlatformHistoryInner read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CurrentUserPlatformHistoryInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of CurrentUserPlatformHistoryInner - * @throws IOException if the JSON string is invalid with respect to CurrentUserPlatformHistoryInner - */ + /** + * Create an instance of CurrentUserPlatformHistoryInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of CurrentUserPlatformHistoryInner + * @throws IOException if the JSON string is invalid with respect to CurrentUserPlatformHistoryInner + */ public static CurrentUserPlatformHistoryInner fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CurrentUserPlatformHistoryInner.class); } - /** - * Convert an instance of CurrentUserPlatformHistoryInner to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CurrentUserPlatformHistoryInner to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/CurrentUserPresence.java b/src/main/java/io/github/vrchatapi/model/CurrentUserPresence.java index 918430ee..dfc9402e 100644 --- a/src/main/java/io/github/vrchatapi/model/CurrentUserPresence.java +++ b/src/main/java/io/github/vrchatapi/model/CurrentUserPresence.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,100 +50,111 @@ /** * CurrentUserPresence */ -@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 CurrentUserPresence { public static final String SERIALIZED_NAME_AVATAR_THUMBNAIL = "avatarThumbnail"; @SerializedName(SERIALIZED_NAME_AVATAR_THUMBNAIL) + @javax.annotation.Nullable private String avatarThumbnail; public static final String SERIALIZED_NAME_CURRENT_AVATAR_TAGS = "currentAvatarTags"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_TAGS) - private List currentAvatarTags = null; + @javax.annotation.Nullable + private List currentAvatarTags = new ArrayList<>(); public static final String SERIALIZED_NAME_DEBUGFLAG = "debugflag"; @SerializedName(SERIALIZED_NAME_DEBUGFLAG) + @javax.annotation.Nullable private String debugflag; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable private String displayName; public static final String SERIALIZED_NAME_GROUPS = "groups"; @SerializedName(SERIALIZED_NAME_GROUPS) - private List groups = null; + @javax.annotation.Nullable + private List groups; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_INSTANCE = "instance"; @SerializedName(SERIALIZED_NAME_INSTANCE) + @javax.annotation.Nullable private String instance; public static final String SERIALIZED_NAME_INSTANCE_TYPE = "instanceType"; @SerializedName(SERIALIZED_NAME_INSTANCE_TYPE) + @javax.annotation.Nullable private String instanceType; public static final String SERIALIZED_NAME_IS_REJOINING = "isRejoining"; @SerializedName(SERIALIZED_NAME_IS_REJOINING) + @javax.annotation.Nullable private String isRejoining; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nullable private String platform; public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE = "profilePicOverride"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE) + @javax.annotation.Nullable private String profilePicOverride; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private String status; public static final String SERIALIZED_NAME_TRAVELING_TO_INSTANCE = "travelingToInstance"; @SerializedName(SERIALIZED_NAME_TRAVELING_TO_INSTANCE) + @javax.annotation.Nullable private String travelingToInstance; public static final String SERIALIZED_NAME_TRAVELING_TO_WORLD = "travelingToWorld"; @SerializedName(SERIALIZED_NAME_TRAVELING_TO_WORLD) + @javax.annotation.Nullable private String travelingToWorld; public static final String SERIALIZED_NAME_USER_ICON = "userIcon"; @SerializedName(SERIALIZED_NAME_USER_ICON) + @javax.annotation.Nullable private String userIcon; public static final String SERIALIZED_NAME_WORLD = "world"; @SerializedName(SERIALIZED_NAME_WORLD) + @javax.annotation.Nullable private String world; public CurrentUserPresence() { } - public CurrentUserPresence avatarThumbnail(String avatarThumbnail) { - + public CurrentUserPresence avatarThumbnail(@javax.annotation.Nullable String avatarThumbnail) { this.avatarThumbnail = avatarThumbnail; return this; } - /** + /** * Get avatarThumbnail * @return avatarThumbnail - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAvatarThumbnail() { return avatarThumbnail; } - - public void setAvatarThumbnail(String avatarThumbnail) { + public void setAvatarThumbnail(@javax.annotation.Nullable String avatarThumbnail) { this.avatarThumbnail = avatarThumbnail; } - public CurrentUserPresence currentAvatarTags(List currentAvatarTags) { - + public CurrentUserPresence currentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; return this; } @@ -156,71 +167,59 @@ public CurrentUserPresence addCurrentAvatarTagsItem(String currentAvatarTagsItem return this; } - /** + /** * Get currentAvatarTags * @return currentAvatarTags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getCurrentAvatarTags() { return currentAvatarTags; } - - public void setCurrentAvatarTags(List currentAvatarTags) { + public void setCurrentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; } - public CurrentUserPresence debugflag(String debugflag) { - + public CurrentUserPresence debugflag(@javax.annotation.Nullable String debugflag) { this.debugflag = debugflag; return this; } - /** + /** * Get debugflag * @return debugflag - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDebugflag() { return debugflag; } - - public void setDebugflag(String debugflag) { + public void setDebugflag(@javax.annotation.Nullable String debugflag) { this.debugflag = debugflag; } - public CurrentUserPresence displayName(String displayName) { - + public CurrentUserPresence displayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; } - public CurrentUserPresence groups(List groups) { - + public CurrentUserPresence groups(@javax.annotation.Nullable List groups) { this.groups = groups; return this; } @@ -233,272 +232,225 @@ public CurrentUserPresence addGroupsItem(String groupsItem) { return this; } - /** + /** * Get groups * @return groups - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getGroups() { return groups; } - - public void setGroups(List groups) { + public void setGroups(@javax.annotation.Nullable List groups) { this.groups = groups; } - public CurrentUserPresence id(String id) { - + public CurrentUserPresence id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public CurrentUserPresence instance(String instance) { - + public CurrentUserPresence instance(@javax.annotation.Nullable String instance) { this.instance = instance; return this; } - /** + /** * Get instance * @return instance - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getInstance() { return instance; } - - public void setInstance(String instance) { + public void setInstance(@javax.annotation.Nullable String instance) { this.instance = instance; } - public CurrentUserPresence instanceType(String instanceType) { - + public CurrentUserPresence instanceType(@javax.annotation.Nullable String instanceType) { this.instanceType = instanceType; return this; } - /** + /** * either an InstanceType or an empty string * @return instanceType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "either an InstanceType or an empty string") - public String getInstanceType() { return instanceType; } - - public void setInstanceType(String instanceType) { + public void setInstanceType(@javax.annotation.Nullable String instanceType) { this.instanceType = instanceType; } - public CurrentUserPresence isRejoining(String isRejoining) { - + public CurrentUserPresence isRejoining(@javax.annotation.Nullable String isRejoining) { this.isRejoining = isRejoining; return this; } - /** + /** * Get isRejoining * @return isRejoining - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIsRejoining() { return isRejoining; } - - public void setIsRejoining(String isRejoining) { + public void setIsRejoining(@javax.annotation.Nullable String isRejoining) { this.isRejoining = isRejoining; } - public CurrentUserPresence platform(String platform) { - + public CurrentUserPresence platform(@javax.annotation.Nullable String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "standalonewindows", value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nullable String platform) { this.platform = platform; } - public CurrentUserPresence profilePicOverride(String profilePicOverride) { - + public CurrentUserPresence profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; return this; } - /** + /** * Get profilePicOverride * @return profilePicOverride - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProfilePicOverride() { return profilePicOverride; } - - public void setProfilePicOverride(String profilePicOverride) { + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; } - public CurrentUserPresence status(String status) { - + public CurrentUserPresence status(@javax.annotation.Nullable String status) { this.status = status; return this; } - /** + /** * either a UserStatus or empty string * @return status - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "either a UserStatus or empty string") - public String getStatus() { return status; } - - public void setStatus(String status) { + public void setStatus(@javax.annotation.Nullable String status) { this.status = status; } - public CurrentUserPresence travelingToInstance(String travelingToInstance) { - + public CurrentUserPresence travelingToInstance(@javax.annotation.Nullable String travelingToInstance) { this.travelingToInstance = travelingToInstance; return this; } - /** + /** * Get travelingToInstance * @return travelingToInstance - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getTravelingToInstance() { return travelingToInstance; } - - public void setTravelingToInstance(String travelingToInstance) { + public void setTravelingToInstance(@javax.annotation.Nullable String travelingToInstance) { this.travelingToInstance = travelingToInstance; } - public CurrentUserPresence travelingToWorld(String travelingToWorld) { - + public CurrentUserPresence travelingToWorld(@javax.annotation.Nullable String travelingToWorld) { this.travelingToWorld = travelingToWorld; return this; } - /** + /** * Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list. * @return travelingToWorld - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd:12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)", value = "Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list.") - public String getTravelingToWorld() { return travelingToWorld; } - - public void setTravelingToWorld(String travelingToWorld) { + public void setTravelingToWorld(@javax.annotation.Nullable String travelingToWorld) { this.travelingToWorld = travelingToWorld; } - public CurrentUserPresence userIcon(String userIcon) { - + public CurrentUserPresence userIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; return this; } - /** + /** * Get userIcon * @return userIcon - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUserIcon() { return userIcon; } - - public void setUserIcon(String userIcon) { + public void setUserIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; } - public CurrentUserPresence world(String world) { - + public CurrentUserPresence world(@javax.annotation.Nullable String world) { this.world = world; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return world - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getWorld() { return world; } - - public void setWorld(String world) { + public void setWorld(@javax.annotation.Nullable String world) { this.world = world; } @@ -576,10 +528,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -588,97 +537,82 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatarThumbnail"); - openapiFields.add("currentAvatarTags"); - openapiFields.add("debugflag"); - openapiFields.add("displayName"); - openapiFields.add("groups"); - openapiFields.add("id"); - openapiFields.add("instance"); - openapiFields.add("instanceType"); - openapiFields.add("isRejoining"); - openapiFields.add("platform"); - openapiFields.add("profilePicOverride"); - openapiFields.add("status"); - openapiFields.add("travelingToInstance"); - openapiFields.add("travelingToWorld"); - openapiFields.add("userIcon"); - openapiFields.add("world"); + openapiFields = new HashSet(Arrays.asList("avatarThumbnail", "currentAvatarTags", "debugflag", "displayName", "groups", "id", "instance", "instanceType", "isRejoining", "platform", "profilePicOverride", "status", "travelingToInstance", "travelingToWorld", "userIcon", "world")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CurrentUserPresence - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CurrentUserPresence.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CurrentUserPresence is not found in the empty JSON string", CurrentUserPresence.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CurrentUserPresence + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CurrentUserPresence.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CurrentUserPresence is not found in the empty JSON string", CurrentUserPresence.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CurrentUserPresence.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CurrentUserPresence` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CurrentUserPresence` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("avatarThumbnail") != null && !jsonObj.get("avatarThumbnail").isJsonNull()) && !jsonObj.get("avatarThumbnail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `avatarThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatarThumbnail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `avatarThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatarThumbnail").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("currentAvatarTags") != null && !jsonObj.get("currentAvatarTags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); + if (jsonObj.get("currentAvatarTags") != null && !jsonObj.get("currentAvatarTags").isJsonNull() && !jsonObj.get("currentAvatarTags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); } if ((jsonObj.get("debugflag") != null && !jsonObj.get("debugflag").isJsonNull()) && !jsonObj.get("debugflag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `debugflag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("debugflag").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `debugflag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("debugflag").toString())); } if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull() && !jsonObj.get("groups").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("instance") != null && !jsonObj.get("instance").isJsonNull()) && !jsonObj.get("instance").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `instance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instance").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `instance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instance").toString())); } if ((jsonObj.get("instanceType") != null && !jsonObj.get("instanceType").isJsonNull()) && !jsonObj.get("instanceType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `instanceType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `instanceType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceType").toString())); } if ((jsonObj.get("isRejoining") != null && !jsonObj.get("isRejoining").isJsonNull()) && !jsonObj.get("isRejoining").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `isRejoining` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isRejoining").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `isRejoining` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isRejoining").toString())); } if ((jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) && !jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if ((jsonObj.get("profilePicOverride") != null && !jsonObj.get("profilePicOverride").isJsonNull()) && !jsonObj.get("profilePicOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("travelingToInstance") != null && !jsonObj.get("travelingToInstance").isJsonNull()) && !jsonObj.get("travelingToInstance").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `travelingToInstance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToInstance").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `travelingToInstance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToInstance").toString())); } if ((jsonObj.get("travelingToWorld") != null && !jsonObj.get("travelingToWorld").isJsonNull()) && !jsonObj.get("travelingToWorld").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `travelingToWorld` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToWorld").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `travelingToWorld` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToWorld").toString())); } if ((jsonObj.get("userIcon") != null && !jsonObj.get("userIcon").isJsonNull()) && !jsonObj.get("userIcon").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); } if ((jsonObj.get("world") != null && !jsonObj.get("world").isJsonNull()) && !jsonObj.get("world").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `world` to be a primitive type in the JSON string but got `%s`", jsonObj.get("world").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `world` to be a primitive type in the JSON string but got `%s`", jsonObj.get("world").toString())); } } @@ -702,31 +636,31 @@ public void write(JsonWriter out, CurrentUserPresence value) throws IOException @Override public CurrentUserPresence read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of CurrentUserPresence given an JSON string - * - * @param jsonString JSON string - * @return An instance of CurrentUserPresence - * @throws IOException if the JSON string is invalid with respect to CurrentUserPresence - */ + /** + * Create an instance of CurrentUserPresence given an JSON string + * + * @param jsonString JSON string + * @return An instance of CurrentUserPresence + * @throws IOException if the JSON string is invalid with respect to CurrentUserPresence + */ public static CurrentUserPresence fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CurrentUserPresence.class); } - /** - * Convert an instance of CurrentUserPresence to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of CurrentUserPresence to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/DeclineGroupInviteRequest.java b/src/main/java/io/github/vrchatapi/model/DeclineGroupInviteRequest.java index 1ce97e3d..614c5b4f 100644 --- a/src/main/java/io/github/vrchatapi/model/DeclineGroupInviteRequest.java +++ b/src/main/java/io/github/vrchatapi/model/DeclineGroupInviteRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * DeclineGroupInviteRequest */ -@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 DeclineGroupInviteRequest { public static final String SERIALIZED_NAME_BLOCK = "block"; @SerializedName(SERIALIZED_NAME_BLOCK) + @javax.annotation.Nullable private Boolean block = false; public DeclineGroupInviteRequest() { } - public DeclineGroupInviteRequest block(Boolean block) { - + public DeclineGroupInviteRequest block(@javax.annotation.Nullable Boolean block) { this.block = block; return this; } - /** + /** * Get block * @return block - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getBlock() { return block; } - - public void setBlock(Boolean block) { + public void setBlock(@javax.annotation.Nullable Boolean block) { this.block = block; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,33 +117,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("block"); + openapiFields = new HashSet(Arrays.asList("block")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeclineGroupInviteRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeclineGroupInviteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeclineGroupInviteRequest is not found in the empty JSON string", DeclineGroupInviteRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeclineGroupInviteRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeclineGroupInviteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in DeclineGroupInviteRequest is not found in the empty JSON string", DeclineGroupInviteRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!DeclineGroupInviteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeclineGroupInviteRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `DeclineGroupInviteRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -172,31 +166,31 @@ public void write(JsonWriter out, DeclineGroupInviteRequest value) throws IOExce @Override public DeclineGroupInviteRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of DeclineGroupInviteRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeclineGroupInviteRequest - * @throws IOException if the JSON string is invalid with respect to DeclineGroupInviteRequest - */ + /** + * Create an instance of DeclineGroupInviteRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeclineGroupInviteRequest + * @throws IOException if the JSON string is invalid with respect to DeclineGroupInviteRequest + */ public static DeclineGroupInviteRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, DeclineGroupInviteRequest.class); } - /** - * Convert an instance of DeclineGroupInviteRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of DeclineGroupInviteRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/DeveloperType.java b/src/main/java/io/github/vrchatapi/model/DeveloperType.java index 6cfe8e07..bd4c1b94 100644 --- a/src/main/java/io/github/vrchatapi/model/DeveloperType.java +++ b/src/main/java/io/github/vrchatapi/model/DeveloperType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -73,5 +72,10 @@ public DeveloperType read(final JsonReader jsonReader) throws IOException { return DeveloperType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DeveloperType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/Disable2FAResult.java b/src/main/java/io/github/vrchatapi/model/Disable2FAResult.java index 4ec23577..8460a7f8 100644 --- a/src/main/java/io/github/vrchatapi/model/Disable2FAResult.java +++ b/src/main/java/io/github/vrchatapi/model/Disable2FAResult.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * Disable2FAResult */ -@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 Disable2FAResult { public static final String SERIALIZED_NAME_REMOVED = "removed"; @SerializedName(SERIALIZED_NAME_REMOVED) + @javax.annotation.Nonnull private Boolean removed; public Disable2FAResult() { } - public Disable2FAResult removed(Boolean removed) { - + public Disable2FAResult removed(@javax.annotation.Nonnull Boolean removed) { this.removed = removed; return this; } - /** + /** * Get removed * @return removed - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getRemoved() { return removed; } - - public void setRemoved(Boolean removed) { + public void setRemoved(@javax.annotation.Nonnull Boolean removed) { this.removed = removed; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("removed"); + openapiFields = new HashSet(Arrays.asList("removed")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("removed"); + openapiRequiredFields = new HashSet(Arrays.asList("removed")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Disable2FAResult - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Disable2FAResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Disable2FAResult is not found in the empty JSON string", Disable2FAResult.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Disable2FAResult + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Disable2FAResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Disable2FAResult is not found in the empty JSON string", Disable2FAResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Disable2FAResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Disable2FAResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Disable2FAResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Disable2FAResult.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -180,31 +173,31 @@ public void write(JsonWriter out, Disable2FAResult value) throws IOException { @Override public Disable2FAResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Disable2FAResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of Disable2FAResult - * @throws IOException if the JSON string is invalid with respect to Disable2FAResult - */ + /** + * Create an instance of Disable2FAResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of Disable2FAResult + * @throws IOException if the JSON string is invalid with respect to Disable2FAResult + */ public static Disable2FAResult fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Disable2FAResult.class); } - /** - * Convert an instance of Disable2FAResult to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Disable2FAResult to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/DiscordDetails.java b/src/main/java/io/github/vrchatapi/model/DiscordDetails.java index 503301d4..28039036 100644 --- a/src/main/java/io/github/vrchatapi/model/DiscordDetails.java +++ b/src/main/java/io/github/vrchatapi/model/DiscordDetails.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,55 @@ /** * */ -@ApiModel(description = "") -@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 DiscordDetails { public static final String SERIALIZED_NAME_GLOBAL_NAME = "global_name"; @SerializedName(SERIALIZED_NAME_GLOBAL_NAME) + @javax.annotation.Nullable private String globalName; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public DiscordDetails() { } - public DiscordDetails globalName(String globalName) { - + public DiscordDetails globalName(@javax.annotation.Nullable String globalName) { this.globalName = globalName; return this; } - /** + /** * Get globalName * @return globalName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getGlobalName() { return globalName; } - - public void setGlobalName(String globalName) { + public void setGlobalName(@javax.annotation.Nullable String globalName) { this.globalName = globalName; } - public DiscordDetails id(String id) { - + public DiscordDetails id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * https://discord.com/developers/docs/reference#snowflakes * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1280064052206370848", value = "https://discord.com/developers/docs/reference#snowflakes") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } @@ -141,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,39 +143,38 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("global_name"); - openapiFields.add("id"); + openapiFields = new HashSet(Arrays.asList("global_name", "id")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DiscordDetails - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DiscordDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DiscordDetails is not found in the empty JSON string", DiscordDetails.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DiscordDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DiscordDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in DiscordDetails is not found in the empty JSON string", DiscordDetails.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!DiscordDetails.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DiscordDetails` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `DiscordDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("global_name") != null && !jsonObj.get("global_name").isJsonNull()) && !jsonObj.get("global_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `global_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("global_name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `global_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("global_name").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } @@ -209,31 +198,31 @@ public void write(JsonWriter out, DiscordDetails value) throws IOException { @Override public DiscordDetails read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of DiscordDetails given an JSON string - * - * @param jsonString JSON string - * @return An instance of DiscordDetails - * @throws IOException if the JSON string is invalid with respect to DiscordDetails - */ + /** + * Create an instance of DiscordDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of DiscordDetails + * @throws IOException if the JSON string is invalid with respect to DiscordDetails + */ public static DiscordDetails fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, DiscordDetails.class); } - /** - * Convert an instance of DiscordDetails to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of DiscordDetails to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/DynamicContentRow.java b/src/main/java/io/github/vrchatapi/model/DynamicContentRow.java index 3387f523..d4045c19 100644 --- a/src/main/java/io/github/vrchatapi/model/DynamicContentRow.java +++ b/src/main/java/io/github/vrchatapi/model/DynamicContentRow.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,224 +47,200 @@ /** * DynamicContentRow */ -@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 DynamicContentRow { public static final String SERIALIZED_NAME_INDEX = "index"; @SerializedName(SERIALIZED_NAME_INDEX) + @javax.annotation.Nullable private Integer index; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nonnull private String platform; public static final String SERIALIZED_NAME_SORT_HEADING = "sortHeading"; @SerializedName(SERIALIZED_NAME_SORT_HEADING) + @javax.annotation.Nonnull private String sortHeading; public static final String SERIALIZED_NAME_SORT_ORDER = "sortOrder"; @SerializedName(SERIALIZED_NAME_SORT_ORDER) + @javax.annotation.Nonnull private String sortOrder; public static final String SERIALIZED_NAME_SORT_OWNERSHIP = "sortOwnership"; @SerializedName(SERIALIZED_NAME_SORT_OWNERSHIP) + @javax.annotation.Nonnull private String sortOwnership; public static final String SERIALIZED_NAME_TAG = "tag"; @SerializedName(SERIALIZED_NAME_TAG) + @javax.annotation.Nullable private String tag; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable private String type; public DynamicContentRow() { } - public DynamicContentRow index(Integer index) { - + public DynamicContentRow index(@javax.annotation.Nullable Integer index) { this.index = index; return this; } - /** + /** * Get index * minimum: 0 * @return index - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getIndex() { return index; } - - public void setIndex(Integer index) { + public void setIndex(@javax.annotation.Nullable Integer index) { this.index = index; } - public DynamicContentRow name(String name) { - + public DynamicContentRow name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public DynamicContentRow platform(String platform) { - + public DynamicContentRow platform(@javax.annotation.Nonnull String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows", required = true, value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nonnull String platform) { this.platform = platform; } - public DynamicContentRow sortHeading(String sortHeading) { - + public DynamicContentRow sortHeading(@javax.annotation.Nonnull String sortHeading) { this.sortHeading = sortHeading; return this; } - /** + /** * Get sortHeading * @return sortHeading - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSortHeading() { return sortHeading; } - - public void setSortHeading(String sortHeading) { + public void setSortHeading(@javax.annotation.Nonnull String sortHeading) { this.sortHeading = sortHeading; } - public DynamicContentRow sortOrder(String sortOrder) { - + public DynamicContentRow sortOrder(@javax.annotation.Nonnull String sortOrder) { this.sortOrder = sortOrder; return this; } - /** + /** * Get sortOrder * @return sortOrder - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSortOrder() { return sortOrder; } - - public void setSortOrder(String sortOrder) { + public void setSortOrder(@javax.annotation.Nonnull String sortOrder) { this.sortOrder = sortOrder; } - public DynamicContentRow sortOwnership(String sortOwnership) { - + public DynamicContentRow sortOwnership(@javax.annotation.Nonnull String sortOwnership) { this.sortOwnership = sortOwnership; return this; } - /** + /** * Get sortOwnership * @return sortOwnership - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSortOwnership() { return sortOwnership; } - - public void setSortOwnership(String sortOwnership) { + public void setSortOwnership(@javax.annotation.Nonnull String sortOwnership) { this.sortOwnership = sortOwnership; } - public DynamicContentRow tag(String tag) { - + public DynamicContentRow tag(@javax.annotation.Nullable String tag) { this.tag = tag; return this; } - /** + /** * Tags are a way to grant various access, assign restrictions or other kinds of metadata to various to objects such as worlds, users and avatars. System tags starting with `system_` are granted automatically by the system, while admin tags with `admin_` are granted manually. More prefixes such as `language_ ` (to indicate that a player can speak the tagged language), and `author_tag_` (provided by a world author for search and sorting) exist as well. * @return tag - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Tags are a way to grant various access, assign restrictions or other kinds of metadata to various to objects such as worlds, users and avatars. System tags starting with `system_` are granted automatically by the system, while admin tags with `admin_` are granted manually. More prefixes such as `language_ ` (to indicate that a player can speak the tagged language), and `author_tag_` (provided by a world author for search and sorting) exist as well.") - public String getTag() { return tag; } - - public void setTag(String tag) { + public void setTag(@javax.annotation.Nullable String tag) { this.tag = tag; } - public DynamicContentRow type(String type) { - + public DynamicContentRow type(@javax.annotation.Nullable String type) { this.type = type; return this; } - /** + /** * Type is not present if it is a world. * @return type - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "avatar", value = "Type is not present if it is a world.") - public String getType() { return type; } - - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } @@ -315,10 +291,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -327,72 +300,60 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("index"); - openapiFields.add("name"); - openapiFields.add("platform"); - openapiFields.add("sortHeading"); - openapiFields.add("sortOrder"); - openapiFields.add("sortOwnership"); - openapiFields.add("tag"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("index", "name", "platform", "sortHeading", "sortOrder", "sortOwnership", "tag", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("platform"); - openapiRequiredFields.add("sortHeading"); - openapiRequiredFields.add("sortOrder"); - openapiRequiredFields.add("sortOwnership"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DynamicContentRow - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DynamicContentRow.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DynamicContentRow is not found in the empty JSON string", DynamicContentRow.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("name", "platform", "sortHeading", "sortOrder", "sortOwnership")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DynamicContentRow + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DynamicContentRow.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in DynamicContentRow is not found in the empty JSON string", DynamicContentRow.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!DynamicContentRow.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DynamicContentRow` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `DynamicContentRow` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : DynamicContentRow.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if (!jsonObj.get("sortHeading").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sortHeading` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sortHeading").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sortHeading` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sortHeading").toString())); } if (!jsonObj.get("sortOrder").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sortOrder` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sortOrder").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sortOrder` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sortOrder").toString())); } if (!jsonObj.get("sortOwnership").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sortOwnership` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sortOwnership").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sortOwnership` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sortOwnership").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } @@ -416,31 +377,31 @@ public void write(JsonWriter out, DynamicContentRow value) throws IOException { @Override public DynamicContentRow read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of DynamicContentRow given an JSON string - * - * @param jsonString JSON string - * @return An instance of DynamicContentRow - * @throws IOException if the JSON string is invalid with respect to DynamicContentRow - */ + /** + * Create an instance of DynamicContentRow given an JSON string + * + * @param jsonString JSON string + * @return An instance of DynamicContentRow + * @throws IOException if the JSON string is invalid with respect to DynamicContentRow + */ public static DynamicContentRow fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, DynamicContentRow.class); } - /** - * Convert an instance of DynamicContentRow to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of DynamicContentRow to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/EarningsMetrics.java b/src/main/java/io/github/vrchatapi/model/EarningsMetrics.java index 15db8bbc..74386b03 100644 --- a/src/main/java/io/github/vrchatapi/model/EarningsMetrics.java +++ b/src/main/java/io/github/vrchatapi/model/EarningsMetrics.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.EarningsMetricsTotals; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,93 +50,87 @@ /** * EarningsMetrics */ -@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 EarningsMetrics { public static final String SERIALIZED_NAME_BREAKDOWN = "breakdown"; @SerializedName(SERIALIZED_NAME_BREAKDOWN) + @javax.annotation.Nonnull private List breakdown = new ArrayList<>(); public static final String SERIALIZED_NAME_SELLER_ID = "sellerId"; @SerializedName(SERIALIZED_NAME_SELLER_ID) + @javax.annotation.Nonnull private String sellerId; public static final String SERIALIZED_NAME_TOTALS = "totals"; @SerializedName(SERIALIZED_NAME_TOTALS) + @javax.annotation.Nonnull private EarningsMetricsTotals totals; public EarningsMetrics() { } - public EarningsMetrics breakdown(List breakdown) { - + public EarningsMetrics breakdown(@javax.annotation.Nonnull List breakdown) { this.breakdown = breakdown; return this; } public EarningsMetrics addBreakdownItem(Object breakdownItem) { + if (this.breakdown == null) { + this.breakdown = new ArrayList<>(); + } this.breakdown.add(breakdownItem); return this; } - /** + /** * Get breakdown * @return breakdown - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getBreakdown() { return breakdown; } - - public void setBreakdown(List breakdown) { + public void setBreakdown(@javax.annotation.Nonnull List breakdown) { this.breakdown = breakdown; } - public EarningsMetrics sellerId(String sellerId) { - + public EarningsMetrics sellerId(@javax.annotation.Nonnull String sellerId) { this.sellerId = sellerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return sellerId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getSellerId() { return sellerId; } - - public void setSellerId(String sellerId) { + public void setSellerId(@javax.annotation.Nonnull String sellerId) { this.sellerId = sellerId; } - public EarningsMetrics totals(EarningsMetricsTotals totals) { - + public EarningsMetrics totals(@javax.annotation.Nonnull EarningsMetricsTotals totals) { this.totals = totals; return this; } - /** + /** * Get totals * @return totals - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public EarningsMetricsTotals getTotals() { return totals; } - - public void setTotals(EarningsMetricsTotals totals) { + public void setTotals(@javax.annotation.Nonnull EarningsMetricsTotals totals) { this.totals = totals; } @@ -177,10 +171,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -189,56 +180,51 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("breakdown"); - openapiFields.add("sellerId"); - openapiFields.add("totals"); + openapiFields = new HashSet(Arrays.asList("breakdown", "sellerId", "totals")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("breakdown"); - openapiRequiredFields.add("sellerId"); - openapiRequiredFields.add("totals"); + openapiRequiredFields = new HashSet(Arrays.asList("breakdown", "sellerId", "totals")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EarningsMetrics - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EarningsMetrics.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EarningsMetrics is not found in the empty JSON string", EarningsMetrics.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EarningsMetrics + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EarningsMetrics.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EarningsMetrics is not found in the empty JSON string", EarningsMetrics.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EarningsMetrics.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EarningsMetrics` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `EarningsMetrics` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EarningsMetrics.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("breakdown") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("breakdown").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `breakdown` to be an array in the JSON string but got `%s`", jsonObj.get("breakdown").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `breakdown` to be an array in the JSON string but got `%s`", jsonObj.get("breakdown").toString())); } if (!jsonObj.get("sellerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); } // validate the required field `totals` - EarningsMetricsTotals.validateJsonObject(jsonObj.getAsJsonObject("totals")); + EarningsMetricsTotals.validateJsonElement(jsonObj.get("totals")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -261,31 +247,31 @@ public void write(JsonWriter out, EarningsMetrics value) throws IOException { @Override public EarningsMetrics read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of EarningsMetrics given an JSON string - * - * @param jsonString JSON string - * @return An instance of EarningsMetrics - * @throws IOException if the JSON string is invalid with respect to EarningsMetrics - */ + /** + * Create an instance of EarningsMetrics given an JSON string + * + * @param jsonString JSON string + * @return An instance of EarningsMetrics + * @throws IOException if the JSON string is invalid with respect to EarningsMetrics + */ public static EarningsMetrics fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, EarningsMetrics.class); } - /** - * Convert an instance of EarningsMetrics to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of EarningsMetrics to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/EarningsMetricsTotals.java b/src/main/java/io/github/vrchatapi/model/EarningsMetricsTotals.java index a13681ed..dc4349e2 100644 --- a/src/main/java/io/github/vrchatapi/model/EarningsMetricsTotals.java +++ b/src/main/java/io/github/vrchatapi/model/EarningsMetricsTotals.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,147 +47,132 @@ /** * EarningsMetricsTotals */ -@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 EarningsMetricsTotals { public static final String SERIALIZED_NAME_OTP_EARNINGS = "otpEarnings"; @SerializedName(SERIALIZED_NAME_OTP_EARNINGS) + @javax.annotation.Nonnull private Integer otpEarnings; public static final String SERIALIZED_NAME_OTP_PURCHASE_COUNT = "otpPurchaseCount"; @SerializedName(SERIALIZED_NAME_OTP_PURCHASE_COUNT) + @javax.annotation.Nonnull private Integer otpPurchaseCount; public static final String SERIALIZED_NAME_SUBSCRIBER_EARNINGS = "subscriberEarnings"; @SerializedName(SERIALIZED_NAME_SUBSCRIBER_EARNINGS) + @javax.annotation.Nonnull private Integer subscriberEarnings; public static final String SERIALIZED_NAME_SUBSCRIBER_MONTHS = "subscriberMonths"; @SerializedName(SERIALIZED_NAME_SUBSCRIBER_MONTHS) + @javax.annotation.Nonnull private Integer subscriberMonths; public static final String SERIALIZED_NAME_TOTAL_EARNINGS = "totalEarnings"; @SerializedName(SERIALIZED_NAME_TOTAL_EARNINGS) + @javax.annotation.Nonnull private Integer totalEarnings; public EarningsMetricsTotals() { } - public EarningsMetricsTotals otpEarnings(Integer otpEarnings) { - + public EarningsMetricsTotals otpEarnings(@javax.annotation.Nonnull Integer otpEarnings) { this.otpEarnings = otpEarnings; return this; } - /** + /** * Get otpEarnings * minimum: 0 * @return otpEarnings - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getOtpEarnings() { return otpEarnings; } - - public void setOtpEarnings(Integer otpEarnings) { + public void setOtpEarnings(@javax.annotation.Nonnull Integer otpEarnings) { this.otpEarnings = otpEarnings; } - public EarningsMetricsTotals otpPurchaseCount(Integer otpPurchaseCount) { - + public EarningsMetricsTotals otpPurchaseCount(@javax.annotation.Nonnull Integer otpPurchaseCount) { this.otpPurchaseCount = otpPurchaseCount; return this; } - /** + /** * Get otpPurchaseCount * minimum: 0 * @return otpPurchaseCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getOtpPurchaseCount() { return otpPurchaseCount; } - - public void setOtpPurchaseCount(Integer otpPurchaseCount) { + public void setOtpPurchaseCount(@javax.annotation.Nonnull Integer otpPurchaseCount) { this.otpPurchaseCount = otpPurchaseCount; } - public EarningsMetricsTotals subscriberEarnings(Integer subscriberEarnings) { - + public EarningsMetricsTotals subscriberEarnings(@javax.annotation.Nonnull Integer subscriberEarnings) { this.subscriberEarnings = subscriberEarnings; return this; } - /** + /** * Get subscriberEarnings * minimum: 0 * @return subscriberEarnings - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getSubscriberEarnings() { return subscriberEarnings; } - - public void setSubscriberEarnings(Integer subscriberEarnings) { + public void setSubscriberEarnings(@javax.annotation.Nonnull Integer subscriberEarnings) { this.subscriberEarnings = subscriberEarnings; } - public EarningsMetricsTotals subscriberMonths(Integer subscriberMonths) { - + public EarningsMetricsTotals subscriberMonths(@javax.annotation.Nonnull Integer subscriberMonths) { this.subscriberMonths = subscriberMonths; return this; } - /** + /** * Get subscriberMonths * minimum: 0 * @return subscriberMonths - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getSubscriberMonths() { return subscriberMonths; } - - public void setSubscriberMonths(Integer subscriberMonths) { + public void setSubscriberMonths(@javax.annotation.Nonnull Integer subscriberMonths) { this.subscriberMonths = subscriberMonths; } - public EarningsMetricsTotals totalEarnings(Integer totalEarnings) { - + public EarningsMetricsTotals totalEarnings(@javax.annotation.Nonnull Integer totalEarnings) { this.totalEarnings = totalEarnings; return this; } - /** + /** * Get totalEarnings * minimum: 0 * @return totalEarnings - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTotalEarnings() { return totalEarnings; } - - public void setTotalEarnings(Integer totalEarnings) { + public void setTotalEarnings(@javax.annotation.Nonnull Integer totalEarnings) { this.totalEarnings = totalEarnings; } @@ -232,10 +217,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -244,49 +226,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("otpEarnings"); - openapiFields.add("otpPurchaseCount"); - openapiFields.add("subscriberEarnings"); - openapiFields.add("subscriberMonths"); - openapiFields.add("totalEarnings"); + openapiFields = new HashSet(Arrays.asList("otpEarnings", "otpPurchaseCount", "subscriberEarnings", "subscriberMonths", "totalEarnings")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("otpEarnings"); - openapiRequiredFields.add("otpPurchaseCount"); - openapiRequiredFields.add("subscriberEarnings"); - openapiRequiredFields.add("subscriberMonths"); - openapiRequiredFields.add("totalEarnings"); + openapiRequiredFields = new HashSet(Arrays.asList("otpEarnings", "otpPurchaseCount", "subscriberEarnings", "subscriberMonths", "totalEarnings")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EarningsMetricsTotals - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EarningsMetricsTotals.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EarningsMetricsTotals is not found in the empty JSON string", EarningsMetricsTotals.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EarningsMetricsTotals + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EarningsMetricsTotals.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EarningsMetricsTotals is not found in the empty JSON string", EarningsMetricsTotals.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EarningsMetricsTotals.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EarningsMetricsTotals` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `EarningsMetricsTotals` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EarningsMetricsTotals.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -309,31 +282,31 @@ public void write(JsonWriter out, EarningsMetricsTotals value) throws IOExceptio @Override public EarningsMetricsTotals read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of EarningsMetricsTotals given an JSON string - * - * @param jsonString JSON string - * @return An instance of EarningsMetricsTotals - * @throws IOException if the JSON string is invalid with respect to EarningsMetricsTotals - */ + /** + * Create an instance of EarningsMetricsTotals given an JSON string + * + * @param jsonString JSON string + * @return An instance of EarningsMetricsTotals + * @throws IOException if the JSON string is invalid with respect to EarningsMetricsTotals + */ public static EarningsMetricsTotals fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, EarningsMetricsTotals.class); } - /** - * Convert an instance of EarningsMetricsTotals to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of EarningsMetricsTotals to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/EconomyAccount.java b/src/main/java/io/github/vrchatapi/model/EconomyAccount.java index b9292d1a..6dee643a 100644 --- a/src/main/java/io/github/vrchatapi/model/EconomyAccount.java +++ b/src/main/java/io/github/vrchatapi/model/EconomyAccount.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,358 +49,319 @@ /** * EconomyAccount */ -@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 EconomyAccount { public static final String SERIALIZED_NAME_ACCOUNT_ACTIVATED_ON = "accountActivatedOn"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ACTIVATED_ON) + @javax.annotation.Nullable private OffsetDateTime accountActivatedOn; public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) + @javax.annotation.Nullable private String accountId; public static final String SERIALIZED_NAME_ACCOUNT_SELLER_REGISTERED_ON = "accountSellerRegisteredOn"; @SerializedName(SERIALIZED_NAME_ACCOUNT_SELLER_REGISTERED_ON) + @javax.annotation.Nullable private OffsetDateTime accountSellerRegisteredOn; public static final String SERIALIZED_NAME_ACCOUNT_SELLER_STATUS = "accountSellerStatus"; @SerializedName(SERIALIZED_NAME_ACCOUNT_SELLER_STATUS) + @javax.annotation.Nullable private String accountSellerStatus; public static final String SERIALIZED_NAME_BLOCKED = "blocked"; @SerializedName(SERIALIZED_NAME_BLOCKED) + @javax.annotation.Nonnull private Boolean blocked; public static final String SERIALIZED_NAME_CAN_EARN = "canEarn"; @SerializedName(SERIALIZED_NAME_CAN_EARN) + @javax.annotation.Nullable private Boolean canEarn; public static final String SERIALIZED_NAME_CAN_PAYOUT = "canPayout"; @SerializedName(SERIALIZED_NAME_CAN_PAYOUT) + @javax.annotation.Nullable private Boolean canPayout; public static final String SERIALIZED_NAME_CAN_SPEND = "canSpend"; @SerializedName(SERIALIZED_NAME_CAN_SPEND) + @javax.annotation.Nonnull private Boolean canSpend; public static final String SERIALIZED_NAME_SKRILL_EMAIL = "skrillEmail"; @SerializedName(SERIALIZED_NAME_SKRILL_EMAIL) + @javax.annotation.Nullable private String skrillEmail; public static final String SERIALIZED_NAME_SOURCE = "source"; @SerializedName(SERIALIZED_NAME_SOURCE) + @javax.annotation.Nonnull private String source; public static final String SERIALIZED_NAME_TILIA_ID = "tiliaId"; @SerializedName(SERIALIZED_NAME_TILIA_ID) + @javax.annotation.Nullable private String tiliaId; public static final String SERIALIZED_NAME_TILIA_TYPE = "tiliaType"; @SerializedName(SERIALIZED_NAME_TILIA_TYPE) + @javax.annotation.Nullable private String tiliaType; public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nonnull private String userId; public EconomyAccount() { } - public EconomyAccount accountActivatedOn(OffsetDateTime accountActivatedOn) { - + public EconomyAccount accountActivatedOn(@javax.annotation.Nullable OffsetDateTime accountActivatedOn) { this.accountActivatedOn = accountActivatedOn; return this; } - /** + /** * Get accountActivatedOn * @return accountActivatedOn - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getAccountActivatedOn() { return accountActivatedOn; } - - public void setAccountActivatedOn(OffsetDateTime accountActivatedOn) { + public void setAccountActivatedOn(@javax.annotation.Nullable OffsetDateTime accountActivatedOn) { this.accountActivatedOn = accountActivatedOn; } - public EconomyAccount accountId(String accountId) { - + public EconomyAccount accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } - /** + /** * Get accountId * @return accountId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getAccountId() { return accountId; } - - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public EconomyAccount accountSellerRegisteredOn(OffsetDateTime accountSellerRegisteredOn) { - + public EconomyAccount accountSellerRegisteredOn(@javax.annotation.Nullable OffsetDateTime accountSellerRegisteredOn) { this.accountSellerRegisteredOn = accountSellerRegisteredOn; return this; } - /** + /** * Get accountSellerRegisteredOn * @return accountSellerRegisteredOn - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getAccountSellerRegisteredOn() { return accountSellerRegisteredOn; } - - public void setAccountSellerRegisteredOn(OffsetDateTime accountSellerRegisteredOn) { + public void setAccountSellerRegisteredOn(@javax.annotation.Nullable OffsetDateTime accountSellerRegisteredOn) { this.accountSellerRegisteredOn = accountSellerRegisteredOn; } - public EconomyAccount accountSellerStatus(String accountSellerStatus) { - + public EconomyAccount accountSellerStatus(@javax.annotation.Nullable String accountSellerStatus) { this.accountSellerStatus = accountSellerStatus; return this; } - /** + /** * Get accountSellerStatus * @return accountSellerStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAccountSellerStatus() { return accountSellerStatus; } - - public void setAccountSellerStatus(String accountSellerStatus) { + public void setAccountSellerStatus(@javax.annotation.Nullable String accountSellerStatus) { this.accountSellerStatus = accountSellerStatus; } - public EconomyAccount blocked(Boolean blocked) { - + public EconomyAccount blocked(@javax.annotation.Nonnull Boolean blocked) { this.blocked = blocked; return this; } - /** + /** * Get blocked * @return blocked - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getBlocked() { return blocked; } - - public void setBlocked(Boolean blocked) { + public void setBlocked(@javax.annotation.Nonnull Boolean blocked) { this.blocked = blocked; } - public EconomyAccount canEarn(Boolean canEarn) { - + public EconomyAccount canEarn(@javax.annotation.Nullable Boolean canEarn) { this.canEarn = canEarn; return this; } - /** + /** * Get canEarn * @return canEarn - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getCanEarn() { return canEarn; } - - public void setCanEarn(Boolean canEarn) { + public void setCanEarn(@javax.annotation.Nullable Boolean canEarn) { this.canEarn = canEarn; } - public EconomyAccount canPayout(Boolean canPayout) { - + public EconomyAccount canPayout(@javax.annotation.Nullable Boolean canPayout) { this.canPayout = canPayout; return this; } - /** + /** * Get canPayout * @return canPayout - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getCanPayout() { return canPayout; } - - public void setCanPayout(Boolean canPayout) { + public void setCanPayout(@javax.annotation.Nullable Boolean canPayout) { this.canPayout = canPayout; } - public EconomyAccount canSpend(Boolean canSpend) { - + public EconomyAccount canSpend(@javax.annotation.Nonnull Boolean canSpend) { this.canSpend = canSpend; return this; } - /** + /** * Get canSpend * @return canSpend - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getCanSpend() { return canSpend; } - - public void setCanSpend(Boolean canSpend) { + public void setCanSpend(@javax.annotation.Nonnull Boolean canSpend) { this.canSpend = canSpend; } - public EconomyAccount skrillEmail(String skrillEmail) { - + public EconomyAccount skrillEmail(@javax.annotation.Nullable String skrillEmail) { this.skrillEmail = skrillEmail; return this; } - /** + /** * Get skrillEmail * @return skrillEmail - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getSkrillEmail() { return skrillEmail; } - - public void setSkrillEmail(String skrillEmail) { + public void setSkrillEmail(@javax.annotation.Nullable String skrillEmail) { this.skrillEmail = skrillEmail; } - public EconomyAccount source(String source) { - + public EconomyAccount source(@javax.annotation.Nonnull String source) { this.source = source; return this; } - /** + /** * Get source * @return source - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSource() { return source; } - - public void setSource(String source) { + public void setSource(@javax.annotation.Nonnull String source) { this.source = source; } - public EconomyAccount tiliaId(String tiliaId) { - + public EconomyAccount tiliaId(@javax.annotation.Nullable String tiliaId) { this.tiliaId = tiliaId; return this; } - /** + /** * Get tiliaId * @return tiliaId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getTiliaId() { return tiliaId; } - - public void setTiliaId(String tiliaId) { + public void setTiliaId(@javax.annotation.Nullable String tiliaId) { this.tiliaId = tiliaId; } - public EconomyAccount tiliaType(String tiliaType) { - + public EconomyAccount tiliaType(@javax.annotation.Nullable String tiliaType) { this.tiliaType = tiliaType; return this; } - /** + /** * Get tiliaType * @return tiliaType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getTiliaType() { return tiliaType; } - - public void setTiliaType(String tiliaType) { + public void setTiliaType(@javax.annotation.Nullable String tiliaType) { this.tiliaType = tiliaType; } - public EconomyAccount userId(String userId) { - + public EconomyAccount userId(@javax.annotation.Nonnull String userId) { this.userId = userId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return userId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getUserId() { return userId; } - - public void setUserId(String userId) { + public void setUserId(@javax.annotation.Nonnull String userId) { this.userId = userId; } @@ -472,10 +433,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -484,78 +442,60 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountActivatedOn"); - openapiFields.add("accountId"); - openapiFields.add("accountSellerRegisteredOn"); - openapiFields.add("accountSellerStatus"); - openapiFields.add("blocked"); - openapiFields.add("canEarn"); - openapiFields.add("canPayout"); - openapiFields.add("canSpend"); - openapiFields.add("skrillEmail"); - openapiFields.add("source"); - openapiFields.add("tiliaId"); - openapiFields.add("tiliaType"); - openapiFields.add("userId"); + openapiFields = new HashSet(Arrays.asList("accountActivatedOn", "accountId", "accountSellerRegisteredOn", "accountSellerStatus", "blocked", "canEarn", "canPayout", "canSpend", "skrillEmail", "source", "tiliaId", "tiliaType", "userId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("accountActivatedOn"); - openapiRequiredFields.add("accountId"); - openapiRequiredFields.add("blocked"); - openapiRequiredFields.add("canSpend"); - openapiRequiredFields.add("source"); - openapiRequiredFields.add("userId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EconomyAccount - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EconomyAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EconomyAccount is not found in the empty JSON string", EconomyAccount.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("accountActivatedOn", "accountId", "blocked", "canSpend", "source", "userId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EconomyAccount + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EconomyAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EconomyAccount is not found in the empty JSON string", EconomyAccount.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EconomyAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EconomyAccount` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `EconomyAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EconomyAccount.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } - if (!jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("accountSellerStatus") != null && !jsonObj.get("accountSellerStatus").isJsonNull()) && !jsonObj.get("accountSellerStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountSellerStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountSellerStatus").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accountSellerStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountSellerStatus").toString())); } if ((jsonObj.get("skrillEmail") != null && !jsonObj.get("skrillEmail").isJsonNull()) && !jsonObj.get("skrillEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `skrillEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("skrillEmail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `skrillEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("skrillEmail").toString())); } if (!jsonObj.get("source").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source").toString())); } if ((jsonObj.get("tiliaId") != null && !jsonObj.get("tiliaId").isJsonNull()) && !jsonObj.get("tiliaId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tiliaId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tiliaId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tiliaId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tiliaId").toString())); } if ((jsonObj.get("tiliaType") != null && !jsonObj.get("tiliaType").isJsonNull()) && !jsonObj.get("tiliaType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tiliaType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tiliaType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tiliaType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tiliaType").toString())); } if (!jsonObj.get("userId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); } } @@ -579,31 +519,31 @@ public void write(JsonWriter out, EconomyAccount value) throws IOException { @Override public EconomyAccount read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of EconomyAccount given an JSON string - * - * @param jsonString JSON string - * @return An instance of EconomyAccount - * @throws IOException if the JSON string is invalid with respect to EconomyAccount - */ + /** + * Create an instance of EconomyAccount given an JSON string + * + * @param jsonString JSON string + * @return An instance of EconomyAccount + * @throws IOException if the JSON string is invalid with respect to EconomyAccount + */ public static EconomyAccount fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, EconomyAccount.class); } - /** - * Convert an instance of EconomyAccount to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of EconomyAccount to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/EconomyBalances.java b/src/main/java/io/github/vrchatapi/model/EconomyBalances.java index 860d6fb4..769765e7 100644 --- a/src/main/java/io/github/vrchatapi/model/EconomyBalances.java +++ b/src/main/java/io/github/vrchatapi/model/EconomyBalances.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,88 +47,79 @@ /** * EconomyBalances */ -@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 EconomyBalances { public static final String SERIALIZED_NAME_BALANCE = "balance"; @SerializedName(SERIALIZED_NAME_BALANCE) + @javax.annotation.Nonnull private Integer balance; public static final String SERIALIZED_NAME_EARNINGS = "earnings"; @SerializedName(SERIALIZED_NAME_EARNINGS) + @javax.annotation.Nonnull private Integer earnings; public static final String SERIALIZED_NAME_STANDARD = "standard"; @SerializedName(SERIALIZED_NAME_STANDARD) + @javax.annotation.Nonnull private Integer standard; public EconomyBalances() { } - public EconomyBalances balance(Integer balance) { - + public EconomyBalances balance(@javax.annotation.Nonnull Integer balance) { this.balance = balance; return this; } - /** + /** * Get balance * @return balance - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getBalance() { return balance; } - - public void setBalance(Integer balance) { + public void setBalance(@javax.annotation.Nonnull Integer balance) { this.balance = balance; } - public EconomyBalances earnings(Integer earnings) { - + public EconomyBalances earnings(@javax.annotation.Nonnull Integer earnings) { this.earnings = earnings; return this; } - /** + /** * Get earnings * @return earnings - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getEarnings() { return earnings; } - - public void setEarnings(Integer earnings) { + public void setEarnings(@javax.annotation.Nonnull Integer earnings) { this.earnings = earnings; } - public EconomyBalances standard(Integer standard) { - + public EconomyBalances standard(@javax.annotation.Nonnull Integer standard) { this.standard = standard; return this; } - /** + /** * Get standard * @return standard - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getStandard() { return standard; } - - public void setStandard(Integer standard) { + public void setStandard(@javax.annotation.Nonnull Integer standard) { this.standard = standard; } @@ -169,10 +160,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -181,45 +169,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("balance"); - openapiFields.add("earnings"); - openapiFields.add("standard"); + openapiFields = new HashSet(Arrays.asList("balance", "earnings", "standard")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("earnings"); - openapiRequiredFields.add("standard"); + openapiRequiredFields = new HashSet(Arrays.asList("balance", "earnings", "standard")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EconomyBalances - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EconomyBalances.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EconomyBalances is not found in the empty JSON string", EconomyBalances.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EconomyBalances + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EconomyBalances.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EconomyBalances is not found in the empty JSON string", EconomyBalances.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EconomyBalances.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EconomyBalances` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `EconomyBalances` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EconomyBalances.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -242,31 +225,31 @@ public void write(JsonWriter out, EconomyBalances value) throws IOException { @Override public EconomyBalances read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of EconomyBalances given an JSON string - * - * @param jsonString JSON string - * @return An instance of EconomyBalances - * @throws IOException if the JSON string is invalid with respect to EconomyBalances - */ + /** + * Create an instance of EconomyBalances given an JSON string + * + * @param jsonString JSON string + * @return An instance of EconomyBalances + * @throws IOException if the JSON string is invalid with respect to EconomyBalances + */ public static EconomyBalances fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, EconomyBalances.class); } - /** - * Convert an instance of EconomyBalances to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of EconomyBalances to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/EconomyPayout.java b/src/main/java/io/github/vrchatapi/model/EconomyPayout.java index 13554a69..b34f3641 100644 --- a/src/main/java/io/github/vrchatapi/model/EconomyPayout.java +++ b/src/main/java/io/github/vrchatapi/model/EconomyPayout.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,439 +49,391 @@ /** * EconomyPayout */ -@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 EconomyPayout { public static final String SERIALIZED_NAME_PAYMENT_AMOUNT_TOKENS = "paymentAmountTokens"; @SerializedName(SERIALIZED_NAME_PAYMENT_AMOUNT_TOKENS) + @javax.annotation.Nonnull private Integer paymentAmountTokens; public static final String SERIALIZED_NAME_PAYMENT_AMOUNT_USD = "paymentAmountUsd"; @SerializedName(SERIALIZED_NAME_PAYMENT_AMOUNT_USD) + @javax.annotation.Nonnull private Integer paymentAmountUsd; public static final String SERIALIZED_NAME_PAYMENT_CREATED = "paymentCreated"; @SerializedName(SERIALIZED_NAME_PAYMENT_CREATED) + @javax.annotation.Nonnull private OffsetDateTime paymentCreated; public static final String SERIALIZED_NAME_PAYMENT_OUT_ID = "paymentOutId"; @SerializedName(SERIALIZED_NAME_PAYMENT_OUT_ID) + @javax.annotation.Nonnull private Integer paymentOutId; public static final String SERIALIZED_NAME_PAYMENT_PLATFORM = "paymentPlatform"; @SerializedName(SERIALIZED_NAME_PAYMENT_PLATFORM) + @javax.annotation.Nonnull private String paymentPlatform; public static final String SERIALIZED_NAME_PAYMENT_PLATFORM_CODE = "paymentPlatformCode"; @SerializedName(SERIALIZED_NAME_PAYMENT_PLATFORM_CODE) + @javax.annotation.Nonnull private Integer paymentPlatformCode; public static final String SERIALIZED_NAME_PAYMENT_STATUS = "paymentStatus"; @SerializedName(SERIALIZED_NAME_PAYMENT_STATUS) + @javax.annotation.Nonnull private String paymentStatus; public static final String SERIALIZED_NAME_PAYMENT_STATUS_CODE = "paymentStatusCode"; @SerializedName(SERIALIZED_NAME_PAYMENT_STATUS_CODE) + @javax.annotation.Nonnull private Integer paymentStatusCode; public static final String SERIALIZED_NAME_PAYMENT_UPDATED = "paymentUpdated"; @SerializedName(SERIALIZED_NAME_PAYMENT_UPDATED) + @javax.annotation.Nonnull private OffsetDateTime paymentUpdated; public static final String SERIALIZED_NAME_PLATFORM_PAYMENT_GUID = "platformPaymentGuid"; @SerializedName(SERIALIZED_NAME_PLATFORM_PAYMENT_GUID) + @javax.annotation.Nullable private String platformPaymentGuid; public static final String SERIALIZED_NAME_PLATFORM_PAYMENT_METHOD = "platformPaymentMethod"; @SerializedName(SERIALIZED_NAME_PLATFORM_PAYMENT_METHOD) + @javax.annotation.Nullable private String platformPaymentMethod; public static final String SERIALIZED_NAME_REVERSAL_DATE = "reversalDate"; @SerializedName(SERIALIZED_NAME_REVERSAL_DATE) + @javax.annotation.Nullable private OffsetDateTime reversalDate; public static final String SERIALIZED_NAME_REVERSAL_REASON = "reversalReason"; @SerializedName(SERIALIZED_NAME_REVERSAL_REASON) + @javax.annotation.Nullable private String reversalReason; public static final String SERIALIZED_NAME_REVERSAL_REASON_CODE = "reversalReasonCode"; @SerializedName(SERIALIZED_NAME_REVERSAL_REASON_CODE) + @javax.annotation.Nullable private Integer reversalReasonCode; public static final String SERIALIZED_NAME_REVERSAL_TRANSACTION_ID = "reversalTransactionId"; @SerializedName(SERIALIZED_NAME_REVERSAL_TRANSACTION_ID) + @javax.annotation.Nullable private Integer reversalTransactionId; public static final String SERIALIZED_NAME_TRANSACTION_ID = "transactionId"; @SerializedName(SERIALIZED_NAME_TRANSACTION_ID) + @javax.annotation.Nonnull private Integer transactionId; public EconomyPayout() { } - public EconomyPayout paymentAmountTokens(Integer paymentAmountTokens) { - + public EconomyPayout paymentAmountTokens(@javax.annotation.Nonnull Integer paymentAmountTokens) { this.paymentAmountTokens = paymentAmountTokens; return this; } - /** + /** * Get paymentAmountTokens * @return paymentAmountTokens - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPaymentAmountTokens() { return paymentAmountTokens; } - - public void setPaymentAmountTokens(Integer paymentAmountTokens) { + public void setPaymentAmountTokens(@javax.annotation.Nonnull Integer paymentAmountTokens) { this.paymentAmountTokens = paymentAmountTokens; } - public EconomyPayout paymentAmountUsd(Integer paymentAmountUsd) { - + public EconomyPayout paymentAmountUsd(@javax.annotation.Nonnull Integer paymentAmountUsd) { this.paymentAmountUsd = paymentAmountUsd; return this; } - /** + /** * Get paymentAmountUsd * @return paymentAmountUsd - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPaymentAmountUsd() { return paymentAmountUsd; } - - public void setPaymentAmountUsd(Integer paymentAmountUsd) { + public void setPaymentAmountUsd(@javax.annotation.Nonnull Integer paymentAmountUsd) { this.paymentAmountUsd = paymentAmountUsd; } - public EconomyPayout paymentCreated(OffsetDateTime paymentCreated) { - + public EconomyPayout paymentCreated(@javax.annotation.Nonnull OffsetDateTime paymentCreated) { this.paymentCreated = paymentCreated; return this; } - /** + /** * Get paymentCreated * @return paymentCreated - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getPaymentCreated() { return paymentCreated; } - - public void setPaymentCreated(OffsetDateTime paymentCreated) { + public void setPaymentCreated(@javax.annotation.Nonnull OffsetDateTime paymentCreated) { this.paymentCreated = paymentCreated; } - public EconomyPayout paymentOutId(Integer paymentOutId) { - + public EconomyPayout paymentOutId(@javax.annotation.Nonnull Integer paymentOutId) { this.paymentOutId = paymentOutId; return this; } - /** + /** * Get paymentOutId * @return paymentOutId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPaymentOutId() { return paymentOutId; } - - public void setPaymentOutId(Integer paymentOutId) { + public void setPaymentOutId(@javax.annotation.Nonnull Integer paymentOutId) { this.paymentOutId = paymentOutId; } - public EconomyPayout paymentPlatform(String paymentPlatform) { - + public EconomyPayout paymentPlatform(@javax.annotation.Nonnull String paymentPlatform) { this.paymentPlatform = paymentPlatform; return this; } - /** + /** * Get paymentPlatform * @return paymentPlatform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getPaymentPlatform() { return paymentPlatform; } - - public void setPaymentPlatform(String paymentPlatform) { + public void setPaymentPlatform(@javax.annotation.Nonnull String paymentPlatform) { this.paymentPlatform = paymentPlatform; } - public EconomyPayout paymentPlatformCode(Integer paymentPlatformCode) { - + public EconomyPayout paymentPlatformCode(@javax.annotation.Nonnull Integer paymentPlatformCode) { this.paymentPlatformCode = paymentPlatformCode; return this; } - /** + /** * Get paymentPlatformCode * @return paymentPlatformCode - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPaymentPlatformCode() { return paymentPlatformCode; } - - public void setPaymentPlatformCode(Integer paymentPlatformCode) { + public void setPaymentPlatformCode(@javax.annotation.Nonnull Integer paymentPlatformCode) { this.paymentPlatformCode = paymentPlatformCode; } - public EconomyPayout paymentStatus(String paymentStatus) { - + public EconomyPayout paymentStatus(@javax.annotation.Nonnull String paymentStatus) { this.paymentStatus = paymentStatus; return this; } - /** + /** * Get paymentStatus * @return paymentStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getPaymentStatus() { return paymentStatus; } - - public void setPaymentStatus(String paymentStatus) { + public void setPaymentStatus(@javax.annotation.Nonnull String paymentStatus) { this.paymentStatus = paymentStatus; } - public EconomyPayout paymentStatusCode(Integer paymentStatusCode) { - + public EconomyPayout paymentStatusCode(@javax.annotation.Nonnull Integer paymentStatusCode) { this.paymentStatusCode = paymentStatusCode; return this; } - /** + /** * Get paymentStatusCode * @return paymentStatusCode - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPaymentStatusCode() { return paymentStatusCode; } - - public void setPaymentStatusCode(Integer paymentStatusCode) { + public void setPaymentStatusCode(@javax.annotation.Nonnull Integer paymentStatusCode) { this.paymentStatusCode = paymentStatusCode; } - public EconomyPayout paymentUpdated(OffsetDateTime paymentUpdated) { - + public EconomyPayout paymentUpdated(@javax.annotation.Nonnull OffsetDateTime paymentUpdated) { this.paymentUpdated = paymentUpdated; return this; } - /** + /** * Get paymentUpdated * @return paymentUpdated - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getPaymentUpdated() { return paymentUpdated; } - - public void setPaymentUpdated(OffsetDateTime paymentUpdated) { + public void setPaymentUpdated(@javax.annotation.Nonnull OffsetDateTime paymentUpdated) { this.paymentUpdated = paymentUpdated; } - public EconomyPayout platformPaymentGuid(String platformPaymentGuid) { - + public EconomyPayout platformPaymentGuid(@javax.annotation.Nullable String platformPaymentGuid) { this.platformPaymentGuid = platformPaymentGuid; return this; } - /** + /** * Get platformPaymentGuid * @return platformPaymentGuid - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPlatformPaymentGuid() { return platformPaymentGuid; } - - public void setPlatformPaymentGuid(String platformPaymentGuid) { + public void setPlatformPaymentGuid(@javax.annotation.Nullable String platformPaymentGuid) { this.platformPaymentGuid = platformPaymentGuid; } - public EconomyPayout platformPaymentMethod(String platformPaymentMethod) { - + public EconomyPayout platformPaymentMethod(@javax.annotation.Nullable String platformPaymentMethod) { this.platformPaymentMethod = platformPaymentMethod; return this; } - /** + /** * Get platformPaymentMethod * @return platformPaymentMethod - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPlatformPaymentMethod() { return platformPaymentMethod; } - - public void setPlatformPaymentMethod(String platformPaymentMethod) { + public void setPlatformPaymentMethod(@javax.annotation.Nullable String platformPaymentMethod) { this.platformPaymentMethod = platformPaymentMethod; } - public EconomyPayout reversalDate(OffsetDateTime reversalDate) { - + public EconomyPayout reversalDate(@javax.annotation.Nullable OffsetDateTime reversalDate) { this.reversalDate = reversalDate; return this; } - /** + /** * Get reversalDate * @return reversalDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getReversalDate() { return reversalDate; } - - public void setReversalDate(OffsetDateTime reversalDate) { + public void setReversalDate(@javax.annotation.Nullable OffsetDateTime reversalDate) { this.reversalDate = reversalDate; } - public EconomyPayout reversalReason(String reversalReason) { - + public EconomyPayout reversalReason(@javax.annotation.Nullable String reversalReason) { this.reversalReason = reversalReason; return this; } - /** + /** * Get reversalReason * @return reversalReason - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getReversalReason() { return reversalReason; } - - public void setReversalReason(String reversalReason) { + public void setReversalReason(@javax.annotation.Nullable String reversalReason) { this.reversalReason = reversalReason; } - public EconomyPayout reversalReasonCode(Integer reversalReasonCode) { - + public EconomyPayout reversalReasonCode(@javax.annotation.Nullable Integer reversalReasonCode) { this.reversalReasonCode = reversalReasonCode; return this; } - /** + /** * Get reversalReasonCode * @return reversalReasonCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getReversalReasonCode() { return reversalReasonCode; } - - public void setReversalReasonCode(Integer reversalReasonCode) { + public void setReversalReasonCode(@javax.annotation.Nullable Integer reversalReasonCode) { this.reversalReasonCode = reversalReasonCode; } - public EconomyPayout reversalTransactionId(Integer reversalTransactionId) { - + public EconomyPayout reversalTransactionId(@javax.annotation.Nullable Integer reversalTransactionId) { this.reversalTransactionId = reversalTransactionId; return this; } - /** + /** * Get reversalTransactionId * @return reversalTransactionId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getReversalTransactionId() { return reversalTransactionId; } - - public void setReversalTransactionId(Integer reversalTransactionId) { + public void setReversalTransactionId(@javax.annotation.Nullable Integer reversalTransactionId) { this.reversalTransactionId = reversalTransactionId; } - public EconomyPayout transactionId(Integer transactionId) { - + public EconomyPayout transactionId(@javax.annotation.Nonnull Integer transactionId) { this.transactionId = transactionId; return this; } - /** + /** * Get transactionId * @return transactionId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTransactionId() { return transactionId; } - - public void setTransactionId(Integer transactionId) { + public void setTransactionId(@javax.annotation.Nonnull Integer transactionId) { this.transactionId = transactionId; } @@ -559,10 +511,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -571,79 +520,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("paymentAmountTokens"); - openapiFields.add("paymentAmountUsd"); - openapiFields.add("paymentCreated"); - openapiFields.add("paymentOutId"); - openapiFields.add("paymentPlatform"); - openapiFields.add("paymentPlatformCode"); - openapiFields.add("paymentStatus"); - openapiFields.add("paymentStatusCode"); - openapiFields.add("paymentUpdated"); - openapiFields.add("platformPaymentGuid"); - openapiFields.add("platformPaymentMethod"); - openapiFields.add("reversalDate"); - openapiFields.add("reversalReason"); - openapiFields.add("reversalReasonCode"); - openapiFields.add("reversalTransactionId"); - openapiFields.add("transactionId"); + openapiFields = new HashSet(Arrays.asList("paymentAmountTokens", "paymentAmountUsd", "paymentCreated", "paymentOutId", "paymentPlatform", "paymentPlatformCode", "paymentStatus", "paymentStatusCode", "paymentUpdated", "platformPaymentGuid", "platformPaymentMethod", "reversalDate", "reversalReason", "reversalReasonCode", "reversalTransactionId", "transactionId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("paymentAmountTokens"); - openapiRequiredFields.add("paymentAmountUsd"); - openapiRequiredFields.add("paymentCreated"); - openapiRequiredFields.add("paymentOutId"); - openapiRequiredFields.add("paymentPlatform"); - openapiRequiredFields.add("paymentPlatformCode"); - openapiRequiredFields.add("paymentStatus"); - openapiRequiredFields.add("paymentStatusCode"); - openapiRequiredFields.add("paymentUpdated"); - openapiRequiredFields.add("transactionId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EconomyPayout - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EconomyPayout.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EconomyPayout is not found in the empty JSON string", EconomyPayout.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("paymentAmountTokens", "paymentAmountUsd", "paymentCreated", "paymentOutId", "paymentPlatform", "paymentPlatformCode", "paymentStatus", "paymentStatusCode", "paymentUpdated", "transactionId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EconomyPayout + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EconomyPayout.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EconomyPayout is not found in the empty JSON string", EconomyPayout.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EconomyPayout.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EconomyPayout` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `EconomyPayout` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EconomyPayout.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("paymentPlatform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentPlatform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentPlatform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `paymentPlatform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentPlatform").toString())); } if (!jsonObj.get("paymentStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentStatus").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `paymentStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentStatus").toString())); } if ((jsonObj.get("platformPaymentGuid") != null && !jsonObj.get("platformPaymentGuid").isJsonNull()) && !jsonObj.get("platformPaymentGuid").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platformPaymentGuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platformPaymentGuid").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platformPaymentGuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platformPaymentGuid").toString())); } if ((jsonObj.get("platformPaymentMethod") != null && !jsonObj.get("platformPaymentMethod").isJsonNull()) && !jsonObj.get("platformPaymentMethod").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platformPaymentMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platformPaymentMethod").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platformPaymentMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platformPaymentMethod").toString())); } if ((jsonObj.get("reversalReason") != null && !jsonObj.get("reversalReason").isJsonNull()) && !jsonObj.get("reversalReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reversalReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reversalReason").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reversalReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reversalReason").toString())); } } @@ -667,31 +591,31 @@ public void write(JsonWriter out, EconomyPayout value) throws IOException { @Override public EconomyPayout read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of EconomyPayout given an JSON string - * - * @param jsonString JSON string - * @return An instance of EconomyPayout - * @throws IOException if the JSON string is invalid with respect to EconomyPayout - */ + /** + * Create an instance of EconomyPayout given an JSON string + * + * @param jsonString JSON string + * @return An instance of EconomyPayout + * @throws IOException if the JSON string is invalid with respect to EconomyPayout + */ public static EconomyPayout fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, EconomyPayout.class); } - /** - * Convert an instance of EconomyPayout to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of EconomyPayout to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/EconomyPayoutEligibility.java b/src/main/java/io/github/vrchatapi/model/EconomyPayoutEligibility.java index b8e65c14..bcbf1616 100644 --- a/src/main/java/io/github/vrchatapi/model/EconomyPayoutEligibility.java +++ b/src/main/java/io/github/vrchatapi/model/EconomyPayoutEligibility.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,142 +47,127 @@ /** * EconomyPayoutEligibility */ -@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 EconomyPayoutEligibility { public static final String SERIALIZED_NAME_ISSUE = "issue"; @SerializedName(SERIALIZED_NAME_ISSUE) + @javax.annotation.Nonnull private String issue; public static final String SERIALIZED_NAME_OK_BALANCE = "okBalance"; @SerializedName(SERIALIZED_NAME_OK_BALANCE) + @javax.annotation.Nonnull private Boolean okBalance; public static final String SERIALIZED_NAME_OK_FREQUENCY = "okFrequency"; @SerializedName(SERIALIZED_NAME_OK_FREQUENCY) + @javax.annotation.Nonnull private Boolean okFrequency; public static final String SERIALIZED_NAME_OK_NOT_ONGOING = "okNotOngoing"; @SerializedName(SERIALIZED_NAME_OK_NOT_ONGOING) + @javax.annotation.Nonnull private Boolean okNotOngoing; public static final String SERIALIZED_NAME_OK_STANDING = "okStanding"; @SerializedName(SERIALIZED_NAME_OK_STANDING) + @javax.annotation.Nonnull private Boolean okStanding; public EconomyPayoutEligibility() { } - public EconomyPayoutEligibility issue(String issue) { - + public EconomyPayoutEligibility issue(@javax.annotation.Nonnull String issue) { this.issue = issue; return this; } - /** + /** * Get issue * @return issue - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getIssue() { return issue; } - - public void setIssue(String issue) { + public void setIssue(@javax.annotation.Nonnull String issue) { this.issue = issue; } - public EconomyPayoutEligibility okBalance(Boolean okBalance) { - + public EconomyPayoutEligibility okBalance(@javax.annotation.Nonnull Boolean okBalance) { this.okBalance = okBalance; return this; } - /** + /** * Get okBalance * @return okBalance - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getOkBalance() { return okBalance; } - - public void setOkBalance(Boolean okBalance) { + public void setOkBalance(@javax.annotation.Nonnull Boolean okBalance) { this.okBalance = okBalance; } - public EconomyPayoutEligibility okFrequency(Boolean okFrequency) { - + public EconomyPayoutEligibility okFrequency(@javax.annotation.Nonnull Boolean okFrequency) { this.okFrequency = okFrequency; return this; } - /** + /** * Get okFrequency * @return okFrequency - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getOkFrequency() { return okFrequency; } - - public void setOkFrequency(Boolean okFrequency) { + public void setOkFrequency(@javax.annotation.Nonnull Boolean okFrequency) { this.okFrequency = okFrequency; } - public EconomyPayoutEligibility okNotOngoing(Boolean okNotOngoing) { - + public EconomyPayoutEligibility okNotOngoing(@javax.annotation.Nonnull Boolean okNotOngoing) { this.okNotOngoing = okNotOngoing; return this; } - /** + /** * Get okNotOngoing * @return okNotOngoing - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getOkNotOngoing() { return okNotOngoing; } - - public void setOkNotOngoing(Boolean okNotOngoing) { + public void setOkNotOngoing(@javax.annotation.Nonnull Boolean okNotOngoing) { this.okNotOngoing = okNotOngoing; } - public EconomyPayoutEligibility okStanding(Boolean okStanding) { - + public EconomyPayoutEligibility okStanding(@javax.annotation.Nonnull Boolean okStanding) { this.okStanding = okStanding; return this; } - /** + /** * Get okStanding * @return okStanding - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getOkStanding() { return okStanding; } - - public void setOkStanding(Boolean okStanding) { + public void setOkStanding(@javax.annotation.Nonnull Boolean okStanding) { this.okStanding = okStanding; } @@ -227,10 +212,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -239,51 +221,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issue"); - openapiFields.add("okBalance"); - openapiFields.add("okFrequency"); - openapiFields.add("okNotOngoing"); - openapiFields.add("okStanding"); + openapiFields = new HashSet(Arrays.asList("issue", "okBalance", "okFrequency", "okNotOngoing", "okStanding")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("issue"); - openapiRequiredFields.add("okBalance"); - openapiRequiredFields.add("okFrequency"); - openapiRequiredFields.add("okNotOngoing"); - openapiRequiredFields.add("okStanding"); + openapiRequiredFields = new HashSet(Arrays.asList("issue", "okBalance", "okFrequency", "okNotOngoing", "okStanding")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EconomyPayoutEligibility - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EconomyPayoutEligibility.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EconomyPayoutEligibility is not found in the empty JSON string", EconomyPayoutEligibility.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EconomyPayoutEligibility + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EconomyPayoutEligibility.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EconomyPayoutEligibility is not found in the empty JSON string", EconomyPayoutEligibility.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EconomyPayoutEligibility.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EconomyPayoutEligibility` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `EconomyPayoutEligibility` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EconomyPayoutEligibility.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("issue").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issue").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `issue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issue").toString())); } } @@ -307,31 +280,31 @@ public void write(JsonWriter out, EconomyPayoutEligibility value) throws IOExcep @Override public EconomyPayoutEligibility read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of EconomyPayoutEligibility given an JSON string - * - * @param jsonString JSON string - * @return An instance of EconomyPayoutEligibility - * @throws IOException if the JSON string is invalid with respect to EconomyPayoutEligibility - */ + /** + * Create an instance of EconomyPayoutEligibility given an JSON string + * + * @param jsonString JSON string + * @return An instance of EconomyPayoutEligibility + * @throws IOException if the JSON string is invalid with respect to EconomyPayoutEligibility + */ public static EconomyPayoutEligibility fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, EconomyPayoutEligibility.class); } - /** - * Convert an instance of EconomyPayoutEligibility to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of EconomyPayoutEligibility to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/EconomyPayoutList.java b/src/main/java/io/github/vrchatapi/model/EconomyPayoutList.java index 2aba9226..7edefea9 100644 --- a/src/main/java/io/github/vrchatapi/model/EconomyPayoutList.java +++ b/src/main/java/io/github/vrchatapi/model/EconomyPayoutList.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.EconomyPayout; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,39 +50,39 @@ /** * EconomyPayoutList */ -@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 EconomyPayoutList { public static final String SERIALIZED_NAME_PAYOUTS = "payouts"; @SerializedName(SERIALIZED_NAME_PAYOUTS) + @javax.annotation.Nonnull private List payouts = new ArrayList<>(); public EconomyPayoutList() { } - public EconomyPayoutList payouts(List payouts) { - + public EconomyPayoutList payouts(@javax.annotation.Nonnull List payouts) { this.payouts = payouts; return this; } public EconomyPayoutList addPayoutsItem(EconomyPayout payoutsItem) { + if (this.payouts == null) { + this.payouts = new ArrayList<>(); + } this.payouts.add(payoutsItem); return this; } - /** + /** * Get payouts * @return payouts - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getPayouts() { return payouts; } - - public void setPayouts(List payouts) { + public void setPayouts(@javax.annotation.Nonnull List payouts) { this.payouts = payouts; } @@ -119,10 +119,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -131,51 +128,50 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("payouts"); + openapiFields = new HashSet(Arrays.asList("payouts")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("payouts"); + openapiRequiredFields = new HashSet(Arrays.asList("payouts")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EconomyPayoutList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EconomyPayoutList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EconomyPayoutList is not found in the empty JSON string", EconomyPayoutList.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EconomyPayoutList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EconomyPayoutList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EconomyPayoutList is not found in the empty JSON string", EconomyPayoutList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EconomyPayoutList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EconomyPayoutList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `EconomyPayoutList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EconomyPayoutList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("payouts").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `payouts` to be an array in the JSON string but got `%s`", jsonObj.get("payouts").toString())); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("payouts") != null) { + if (!jsonObj.get("payouts").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `payouts` to be an array in the JSON string but got `%s`", jsonObj.get("payouts").toString())); + } + JsonArray jsonArraypayouts = jsonObj.getAsJsonArray("payouts"); + // validate the required field `payouts` (array) + for (int i = 0; i < jsonArraypayouts.size(); i++) { + EconomyPayout.validateJsonElement(jsonArraypayouts.get(i)); + } } - - JsonArray jsonArraypayouts = jsonObj.getAsJsonArray("payouts"); - // validate the required field `payouts` (array) - for (int i = 0; i < jsonArraypayouts.size(); i++) { - EconomyPayout.validateJsonObject(jsonArraypayouts.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -198,31 +194,31 @@ public void write(JsonWriter out, EconomyPayoutList value) throws IOException { @Override public EconomyPayoutList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of EconomyPayoutList given an JSON string - * - * @param jsonString JSON string - * @return An instance of EconomyPayoutList - * @throws IOException if the JSON string is invalid with respect to EconomyPayoutList - */ + /** + * Create an instance of EconomyPayoutList given an JSON string + * + * @param jsonString JSON string + * @return An instance of EconomyPayoutList + * @throws IOException if the JSON string is invalid with respect to EconomyPayoutList + */ public static EconomyPayoutList fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, EconomyPayoutList.class); } - /** - * Convert an instance of EconomyPayoutList to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of EconomyPayoutList to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/EconomyPayoutStatus.java b/src/main/java/io/github/vrchatapi/model/EconomyPayoutStatus.java index 961926f3..b2c96dd0 100644 --- a/src/main/java/io/github/vrchatapi/model/EconomyPayoutStatus.java +++ b/src/main/java/io/github/vrchatapi/model/EconomyPayoutStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,9 +20,8 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.EconomyPayout; import io.github.vrchatapi.model.EconomyPayoutEligibility; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,223 +49,199 @@ /** * EconomyPayoutStatus */ -@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 EconomyPayoutStatus { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) + @javax.annotation.Nonnull private Integer accountId; public static final String SERIALIZED_NAME_ACTIVE_PAYOUT = "activePayout"; @SerializedName(SERIALIZED_NAME_ACTIVE_PAYOUT) + @javax.annotation.Nullable private EconomyPayout activePayout; public static final String SERIALIZED_NAME_ACTIVE_PAYOUT_CANCELLABLE = "activePayoutCancellable"; @SerializedName(SERIALIZED_NAME_ACTIVE_PAYOUT_CANCELLABLE) + @javax.annotation.Nonnull private Boolean activePayoutCancellable; public static final String SERIALIZED_NAME_ACTIVE_PAYOUT_TILIA_AMOUNT = "activePayoutTiliaAmount"; @SerializedName(SERIALIZED_NAME_ACTIVE_PAYOUT_TILIA_AMOUNT) + @javax.annotation.Nonnull private Integer activePayoutTiliaAmount; public static final String SERIALIZED_NAME_EARNINGS_BALANCE = "earningsBalance"; @SerializedName(SERIALIZED_NAME_EARNINGS_BALANCE) + @javax.annotation.Nonnull private Integer earningsBalance; public static final String SERIALIZED_NAME_ELIGIBILITY = "eligibility"; @SerializedName(SERIALIZED_NAME_ELIGIBILITY) + @javax.annotation.Nonnull private EconomyPayoutEligibility eligibility; public static final String SERIALIZED_NAME_PAYOUT_ELIGIBLE = "payoutEligible"; @SerializedName(SERIALIZED_NAME_PAYOUT_ELIGIBLE) + @javax.annotation.Nonnull private Boolean payoutEligible; public static final String SERIALIZED_NAME_TILIA_ID = "tiliaId"; @SerializedName(SERIALIZED_NAME_TILIA_ID) + @javax.annotation.Nonnull private String tiliaId; public EconomyPayoutStatus() { } - public EconomyPayoutStatus accountId(Integer accountId) { - + public EconomyPayoutStatus accountId(@javax.annotation.Nonnull Integer accountId) { this.accountId = accountId; return this; } - /** + /** * Get accountId * @return accountId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getAccountId() { return accountId; } - - public void setAccountId(Integer accountId) { + public void setAccountId(@javax.annotation.Nonnull Integer accountId) { this.accountId = accountId; } - public EconomyPayoutStatus activePayout(EconomyPayout activePayout) { - + public EconomyPayoutStatus activePayout(@javax.annotation.Nullable EconomyPayout activePayout) { this.activePayout = activePayout; return this; } - /** + /** * Get activePayout * @return activePayout - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public EconomyPayout getActivePayout() { return activePayout; } - - public void setActivePayout(EconomyPayout activePayout) { + public void setActivePayout(@javax.annotation.Nullable EconomyPayout activePayout) { this.activePayout = activePayout; } - public EconomyPayoutStatus activePayoutCancellable(Boolean activePayoutCancellable) { - + public EconomyPayoutStatus activePayoutCancellable(@javax.annotation.Nonnull Boolean activePayoutCancellable) { this.activePayoutCancellable = activePayoutCancellable; return this; } - /** + /** * Get activePayoutCancellable * @return activePayoutCancellable - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getActivePayoutCancellable() { return activePayoutCancellable; } - - public void setActivePayoutCancellable(Boolean activePayoutCancellable) { + public void setActivePayoutCancellable(@javax.annotation.Nonnull Boolean activePayoutCancellable) { this.activePayoutCancellable = activePayoutCancellable; } - public EconomyPayoutStatus activePayoutTiliaAmount(Integer activePayoutTiliaAmount) { - + public EconomyPayoutStatus activePayoutTiliaAmount(@javax.annotation.Nonnull Integer activePayoutTiliaAmount) { this.activePayoutTiliaAmount = activePayoutTiliaAmount; return this; } - /** + /** * Get activePayoutTiliaAmount * @return activePayoutTiliaAmount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getActivePayoutTiliaAmount() { return activePayoutTiliaAmount; } - - public void setActivePayoutTiliaAmount(Integer activePayoutTiliaAmount) { + public void setActivePayoutTiliaAmount(@javax.annotation.Nonnull Integer activePayoutTiliaAmount) { this.activePayoutTiliaAmount = activePayoutTiliaAmount; } - public EconomyPayoutStatus earningsBalance(Integer earningsBalance) { - + public EconomyPayoutStatus earningsBalance(@javax.annotation.Nonnull Integer earningsBalance) { this.earningsBalance = earningsBalance; return this; } - /** + /** * Get earningsBalance * @return earningsBalance - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getEarningsBalance() { return earningsBalance; } - - public void setEarningsBalance(Integer earningsBalance) { + public void setEarningsBalance(@javax.annotation.Nonnull Integer earningsBalance) { this.earningsBalance = earningsBalance; } - public EconomyPayoutStatus eligibility(EconomyPayoutEligibility eligibility) { - + public EconomyPayoutStatus eligibility(@javax.annotation.Nonnull EconomyPayoutEligibility eligibility) { this.eligibility = eligibility; return this; } - /** + /** * Get eligibility * @return eligibility - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public EconomyPayoutEligibility getEligibility() { return eligibility; } - - public void setEligibility(EconomyPayoutEligibility eligibility) { + public void setEligibility(@javax.annotation.Nonnull EconomyPayoutEligibility eligibility) { this.eligibility = eligibility; } - public EconomyPayoutStatus payoutEligible(Boolean payoutEligible) { - + public EconomyPayoutStatus payoutEligible(@javax.annotation.Nonnull Boolean payoutEligible) { this.payoutEligible = payoutEligible; return this; } - /** + /** * Get payoutEligible * @return payoutEligible - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getPayoutEligible() { return payoutEligible; } - - public void setPayoutEligible(Boolean payoutEligible) { + public void setPayoutEligible(@javax.annotation.Nonnull Boolean payoutEligible) { this.payoutEligible = payoutEligible; } - public EconomyPayoutStatus tiliaId(String tiliaId) { - + public EconomyPayoutStatus tiliaId(@javax.annotation.Nonnull String tiliaId) { this.tiliaId = tiliaId; return this; } - /** + /** * Get tiliaId * @return tiliaId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getTiliaId() { return tiliaId; } - - public void setTiliaId(String tiliaId) { + public void setTiliaId(@javax.annotation.Nonnull String tiliaId) { this.tiliaId = tiliaId; } @@ -316,10 +292,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -328,62 +301,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("activePayout"); - openapiFields.add("activePayoutCancellable"); - openapiFields.add("activePayoutTiliaAmount"); - openapiFields.add("earningsBalance"); - openapiFields.add("eligibility"); - openapiFields.add("payoutEligible"); - openapiFields.add("tiliaId"); + openapiFields = new HashSet(Arrays.asList("accountId", "activePayout", "activePayoutCancellable", "activePayoutTiliaAmount", "earningsBalance", "eligibility", "payoutEligible", "tiliaId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("accountId"); - openapiRequiredFields.add("activePayoutCancellable"); - openapiRequiredFields.add("activePayoutTiliaAmount"); - openapiRequiredFields.add("earningsBalance"); - openapiRequiredFields.add("eligibility"); - openapiRequiredFields.add("payoutEligible"); - openapiRequiredFields.add("tiliaId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EconomyPayoutStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EconomyPayoutStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EconomyPayoutStatus is not found in the empty JSON string", EconomyPayoutStatus.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("accountId", "activePayoutCancellable", "activePayoutTiliaAmount", "earningsBalance", "eligibility", "payoutEligible", "tiliaId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EconomyPayoutStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EconomyPayoutStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EconomyPayoutStatus is not found in the empty JSON string", EconomyPayoutStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EconomyPayoutStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EconomyPayoutStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `EconomyPayoutStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EconomyPayoutStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `activePayout` if (jsonObj.get("activePayout") != null && !jsonObj.get("activePayout").isJsonNull()) { - EconomyPayout.validateJsonObject(jsonObj.getAsJsonObject("activePayout")); + EconomyPayout.validateJsonElement(jsonObj.get("activePayout")); } // validate the required field `eligibility` - EconomyPayoutEligibility.validateJsonObject(jsonObj.getAsJsonObject("eligibility")); + EconomyPayoutEligibility.validateJsonElement(jsonObj.get("eligibility")); if (!jsonObj.get("tiliaId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tiliaId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tiliaId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tiliaId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tiliaId").toString())); } } @@ -407,31 +366,31 @@ public void write(JsonWriter out, EconomyPayoutStatus value) throws IOException @Override public EconomyPayoutStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of EconomyPayoutStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of EconomyPayoutStatus - * @throws IOException if the JSON string is invalid with respect to EconomyPayoutStatus - */ + /** + * Create an instance of EconomyPayoutStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of EconomyPayoutStatus + * @throws IOException if the JSON string is invalid with respect to EconomyPayoutStatus + */ public static EconomyPayoutStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, EconomyPayoutStatus.class); } - /** - * Convert an instance of EconomyPayoutStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of EconomyPayoutStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/EditPrintRequest.java b/src/main/java/io/github/vrchatapi/model/EditPrintRequest.java index 79d4eabd..0d7217f4 100644 --- a/src/main/java/io/github/vrchatapi/model/EditPrintRequest.java +++ b/src/main/java/io/github/vrchatapi/model/EditPrintRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,61 +48,55 @@ /** * EditPrintRequest */ -@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 EditPrintRequest { public static final String SERIALIZED_NAME_IMAGE = "image"; @SerializedName(SERIALIZED_NAME_IMAGE) + @javax.annotation.Nonnull private File image; public static final String SERIALIZED_NAME_NOTE = "note"; @SerializedName(SERIALIZED_NAME_NOTE) + @javax.annotation.Nullable private String note; public EditPrintRequest() { } - public EditPrintRequest image(File image) { - + public EditPrintRequest image(@javax.annotation.Nonnull File image) { this.image = image; return this; } - /** + /** * The binary blob of the png file. * @return image - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The binary blob of the png file.") - public File getImage() { return image; } - - public void setImage(File image) { + public void setImage(@javax.annotation.Nonnull File image) { this.image = image; } - public EditPrintRequest note(String note) { - + public EditPrintRequest note(@javax.annotation.Nullable String note) { this.note = note; return this; } - /** + /** * The caption for the image. * @return note - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The caption for the image.") - public String getNote() { return note; } - - public void setNote(String note) { + public void setNote(@javax.annotation.Nullable String note) { this.note = note; } @@ -141,10 +135,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,44 +144,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("image"); - openapiFields.add("note"); + openapiFields = new HashSet(Arrays.asList("image", "note")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("image"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EditPrintRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EditPrintRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EditPrintRequest is not found in the empty JSON string", EditPrintRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("image")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EditPrintRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EditPrintRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EditPrintRequest is not found in the empty JSON string", EditPrintRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EditPrintRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EditPrintRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `EditPrintRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EditPrintRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("note") != null && !jsonObj.get("note").isJsonNull()) && !jsonObj.get("note").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); } } @@ -214,31 +203,31 @@ public void write(JsonWriter out, EditPrintRequest value) throws IOException { @Override public EditPrintRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of EditPrintRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of EditPrintRequest - * @throws IOException if the JSON string is invalid with respect to EditPrintRequest - */ + /** + * Create an instance of EditPrintRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of EditPrintRequest + * @throws IOException if the JSON string is invalid with respect to EditPrintRequest + */ public static EditPrintRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, EditPrintRequest.class); } - /** - * Convert an instance of EditPrintRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of EditPrintRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/EquipInventoryItemRequest.java b/src/main/java/io/github/vrchatapi/model/EquipInventoryItemRequest.java index 3ae9fe26..bf720f4c 100644 --- a/src/main/java/io/github/vrchatapi/model/EquipInventoryItemRequest.java +++ b/src/main/java/io/github/vrchatapi/model/EquipInventoryItemRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InventoryEquipSlot; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,34 +48,31 @@ /** * EquipInventoryItemRequest */ -@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 EquipInventoryItemRequest { public static final String SERIALIZED_NAME_EQUIP_SLOT = "equipSlot"; @SerializedName(SERIALIZED_NAME_EQUIP_SLOT) + @javax.annotation.Nonnull private InventoryEquipSlot equipSlot = InventoryEquipSlot.EMPTY; public EquipInventoryItemRequest() { } - public EquipInventoryItemRequest equipSlot(InventoryEquipSlot equipSlot) { - + public EquipInventoryItemRequest equipSlot(@javax.annotation.Nonnull InventoryEquipSlot equipSlot) { this.equipSlot = equipSlot; return this; } - /** + /** * Get equipSlot * @return equipSlot - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InventoryEquipSlot getEquipSlot() { return equipSlot; } - - public void setEquipSlot(InventoryEquipSlot equipSlot) { + public void setEquipSlot(@javax.annotation.Nonnull InventoryEquipSlot equipSlot) { this.equipSlot = equipSlot; } @@ -112,10 +109,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,41 +118,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("equipSlot"); + openapiFields = new HashSet(Arrays.asList("equipSlot")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("equipSlot"); + openapiRequiredFields = new HashSet(Arrays.asList("equipSlot")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EquipInventoryItemRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EquipInventoryItemRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EquipInventoryItemRequest is not found in the empty JSON string", EquipInventoryItemRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EquipInventoryItemRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EquipInventoryItemRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in EquipInventoryItemRequest is not found in the empty JSON string", EquipInventoryItemRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EquipInventoryItemRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EquipInventoryItemRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `EquipInventoryItemRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EquipInventoryItemRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `equipSlot` + InventoryEquipSlot.validateJsonElement(jsonObj.get("equipSlot")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -181,31 +176,31 @@ public void write(JsonWriter out, EquipInventoryItemRequest value) throws IOExce @Override public EquipInventoryItemRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of EquipInventoryItemRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of EquipInventoryItemRequest - * @throws IOException if the JSON string is invalid with respect to EquipInventoryItemRequest - */ + /** + * Create an instance of EquipInventoryItemRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of EquipInventoryItemRequest + * @throws IOException if the JSON string is invalid with respect to EquipInventoryItemRequest + */ public static EquipInventoryItemRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, EquipInventoryItemRequest.class); } - /** - * Convert an instance of EquipInventoryItemRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of EquipInventoryItemRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Error.java b/src/main/java/io/github/vrchatapi/model/Error.java index 46bf0c78..5b2e9040 100644 --- a/src/main/java/io/github/vrchatapi/model/Error.java +++ b/src/main/java/io/github/vrchatapi/model/Error.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.Response; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,34 +48,31 @@ /** * Error */ -@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 Error { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nullable private Response error; public Error() { } - public Error error(Response error) { - + public Error error(@javax.annotation.Nullable Response error) { this.error = error; return this; } - /** + /** * Get error * @return error - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Response getError() { return error; } - - public void setError(Response error) { + public void setError(@javax.annotation.Nullable Response error) { this.error = error; } @@ -112,10 +109,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,36 +118,36 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("error"); + openapiFields = new HashSet(Arrays.asList("error")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Error - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Error + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Error.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Error` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Error` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `error` if (jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) { - Response.validateJsonObject(jsonObj.getAsJsonObject("error")); + Response.validateJsonElement(jsonObj.get("error")); } } @@ -177,31 +171,31 @@ public void write(JsonWriter out, Error value) throws IOException { @Override public Error read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Error given an JSON string - * - * @param jsonString JSON string - * @return An instance of Error - * @throws IOException if the JSON string is invalid with respect to Error - */ + /** + * Create an instance of Error given an JSON string + * + * @param jsonString JSON string + * @return An instance of Error + * @throws IOException if the JSON string is invalid with respect to Error + */ public static Error fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Error.class); } - /** - * Convert an instance of Error to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Error to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Favorite.java b/src/main/java/io/github/vrchatapi/model/Favorite.java index cc6510bb..a6da1cd5 100644 --- a/src/main/java/io/github/vrchatapi/model/Favorite.java +++ b/src/main/java/io/github/vrchatapi/model/Favorite.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.FavoriteType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,121 +50,111 @@ /** * */ -@ApiModel(description = "") -@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 Favorite { public static final String SERIALIZED_NAME_FAVORITE_ID = "favoriteId"; @SerializedName(SERIALIZED_NAME_FAVORITE_ID) + @javax.annotation.Nonnull private String favoriteId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private FavoriteType type = FavoriteType.FRIEND; public Favorite() { } - public Favorite favoriteId(String favoriteId) { - + public Favorite favoriteId(@javax.annotation.Nonnull String favoriteId) { this.favoriteId = favoriteId; return this; } - /** + /** * MUST be either AvatarID, UserID or WorldID. * @return favoriteId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "MUST be either AvatarID, UserID or WorldID.") - public String getFavoriteId() { return favoriteId; } - - public void setFavoriteId(String favoriteId) { + public void setFavoriteId(@javax.annotation.Nonnull String favoriteId) { this.favoriteId = favoriteId; } - public Favorite id(String id) { - + public Favorite id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "fvrt_9568d189-8776-44a5-a8c8-defc981e44de", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Favorite tags(List tags) { - + public Favorite tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public Favorite addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public Favorite type(FavoriteType type) { - + public Favorite type(@javax.annotation.Nonnull FavoriteType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FavoriteType getType() { return type; } - - public void setType(FavoriteType type) { + public void setType(@javax.annotation.Nonnull FavoriteType type) { this.type = type; } @@ -207,10 +197,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -219,59 +206,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("favoriteId"); - openapiFields.add("id"); - openapiFields.add("tags"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("favoriteId", "id", "tags", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("favoriteId"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("type"); + openapiRequiredFields = new HashSet(Arrays.asList("favoriteId", "id", "tags", "type")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Favorite - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Favorite.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Favorite is not found in the empty JSON string", Favorite.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Favorite + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Favorite.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Favorite is not found in the empty JSON string", Favorite.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Favorite.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Favorite` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Favorite` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Favorite.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("favoriteId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `favoriteId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("favoriteId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `favoriteId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("favoriteId").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } + // validate the required field `type` + FavoriteType.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -294,31 +276,31 @@ public void write(JsonWriter out, Favorite value) throws IOException { @Override public Favorite read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Favorite given an JSON string - * - * @param jsonString JSON string - * @return An instance of Favorite - * @throws IOException if the JSON string is invalid with respect to Favorite - */ + /** + * Create an instance of Favorite given an JSON string + * + * @param jsonString JSON string + * @return An instance of Favorite + * @throws IOException if the JSON string is invalid with respect to Favorite + */ public static Favorite fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Favorite.class); } - /** - * Convert an instance of Favorite to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Favorite to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FavoriteGroup.java b/src/main/java/io/github/vrchatapi/model/FavoriteGroup.java index 7942f8f6..af0551cd 100644 --- a/src/main/java/io/github/vrchatapi/model/FavoriteGroup.java +++ b/src/main/java/io/github/vrchatapi/model/FavoriteGroup.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,10 +20,9 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.FavoriteGroupVisibility; import io.github.vrchatapi.model.FavoriteType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,229 +51,207 @@ /** * */ -@ApiModel(description = "") -@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 FavoriteGroup { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_OWNER_DISPLAY_NAME = "ownerDisplayName"; @SerializedName(SERIALIZED_NAME_OWNER_DISPLAY_NAME) + @javax.annotation.Nonnull private String ownerDisplayName; public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nonnull private String ownerId; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private FavoriteType type = FavoriteType.FRIEND; public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nonnull private FavoriteGroupVisibility visibility = FavoriteGroupVisibility.PRIVATE; public FavoriteGroup() { } - public FavoriteGroup displayName(String displayName) { - + public FavoriteGroup displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public FavoriteGroup id(String id) { - + public FavoriteGroup id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "fvgrp_8a02a44b-dc3a-4a9a-bc77-77fa37996fc7", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public FavoriteGroup name(String name) { - + public FavoriteGroup name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public FavoriteGroup ownerDisplayName(String ownerDisplayName) { - + public FavoriteGroup ownerDisplayName(@javax.annotation.Nonnull String ownerDisplayName) { this.ownerDisplayName = ownerDisplayName; return this; } - /** + /** * Get ownerDisplayName * @return ownerDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getOwnerDisplayName() { return ownerDisplayName; } - - public void setOwnerDisplayName(String ownerDisplayName) { + public void setOwnerDisplayName(@javax.annotation.Nonnull String ownerDisplayName) { this.ownerDisplayName = ownerDisplayName; } - public FavoriteGroup ownerId(String ownerId) { - + public FavoriteGroup ownerId(@javax.annotation.Nonnull String ownerId) { this.ownerId = ownerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return ownerId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getOwnerId() { return ownerId; } - - public void setOwnerId(String ownerId) { + public void setOwnerId(@javax.annotation.Nonnull String ownerId) { this.ownerId = ownerId; } - public FavoriteGroup tags(List tags) { - + public FavoriteGroup tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public FavoriteGroup addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public FavoriteGroup type(FavoriteType type) { - + public FavoriteGroup type(@javax.annotation.Nonnull FavoriteType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FavoriteType getType() { return type; } - - public void setType(FavoriteType type) { + public void setType(@javax.annotation.Nonnull FavoriteType type) { this.type = type; } - public FavoriteGroup visibility(FavoriteGroupVisibility visibility) { - + public FavoriteGroup visibility(@javax.annotation.Nonnull FavoriteGroupVisibility visibility) { this.visibility = visibility; return this; } - /** + /** * Get visibility * @return visibility - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FavoriteGroupVisibility getVisibility() { return visibility; } - - public void setVisibility(FavoriteGroupVisibility visibility) { + public void setVisibility(@javax.annotation.Nonnull FavoriteGroupVisibility visibility) { this.visibility = visibility; } @@ -324,10 +302,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -336,76 +311,65 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("displayName"); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("ownerDisplayName"); - openapiFields.add("ownerId"); - openapiFields.add("tags"); - openapiFields.add("type"); - openapiFields.add("visibility"); + openapiFields = new HashSet(Arrays.asList("displayName", "id", "name", "ownerDisplayName", "ownerId", "tags", "type", "visibility")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("ownerDisplayName"); - openapiRequiredFields.add("ownerId"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("visibility"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FavoriteGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FavoriteGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FavoriteGroup is not found in the empty JSON string", FavoriteGroup.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("displayName", "id", "name", "ownerDisplayName", "ownerId", "tags", "type", "visibility")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FavoriteGroup + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FavoriteGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FavoriteGroup is not found in the empty JSON string", FavoriteGroup.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FavoriteGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FavoriteGroup` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FavoriteGroup` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FavoriteGroup.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("ownerDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerDisplayName").toString())); } if (!jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } + // validate the required field `type` + FavoriteType.validateJsonElement(jsonObj.get("type")); + // validate the required field `visibility` + FavoriteGroupVisibility.validateJsonElement(jsonObj.get("visibility")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -428,31 +392,31 @@ public void write(JsonWriter out, FavoriteGroup value) throws IOException { @Override public FavoriteGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FavoriteGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of FavoriteGroup - * @throws IOException if the JSON string is invalid with respect to FavoriteGroup - */ + /** + * Create an instance of FavoriteGroup given an JSON string + * + * @param jsonString JSON string + * @return An instance of FavoriteGroup + * @throws IOException if the JSON string is invalid with respect to FavoriteGroup + */ public static FavoriteGroup fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FavoriteGroup.class); } - /** - * Convert an instance of FavoriteGroup to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FavoriteGroup to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FavoriteGroupLimits.java b/src/main/java/io/github/vrchatapi/model/FavoriteGroupLimits.java index 42624efe..724f5ae5 100644 --- a/src/main/java/io/github/vrchatapi/model/FavoriteGroupLimits.java +++ b/src/main/java/io/github/vrchatapi/model/FavoriteGroupLimits.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,115 +47,103 @@ /** * FavoriteGroupLimits */ -@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 FavoriteGroupLimits { public static final String SERIALIZED_NAME_AVATAR = "avatar"; @SerializedName(SERIALIZED_NAME_AVATAR) + @javax.annotation.Nonnull private Integer avatar; public static final String SERIALIZED_NAME_FRIEND = "friend"; @SerializedName(SERIALIZED_NAME_FRIEND) + @javax.annotation.Nonnull private Integer friend; public static final String SERIALIZED_NAME_VRC_PLUS_WORLD = "vrcPlusWorld"; @SerializedName(SERIALIZED_NAME_VRC_PLUS_WORLD) + @javax.annotation.Nonnull private Integer vrcPlusWorld; public static final String SERIALIZED_NAME_WORLD = "world"; @SerializedName(SERIALIZED_NAME_WORLD) + @javax.annotation.Nonnull private Integer world; public FavoriteGroupLimits() { } - public FavoriteGroupLimits avatar(Integer avatar) { - + public FavoriteGroupLimits avatar(@javax.annotation.Nonnull Integer avatar) { this.avatar = avatar; return this; } - /** + /** * Get avatar * @return avatar - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getAvatar() { return avatar; } - - public void setAvatar(Integer avatar) { + public void setAvatar(@javax.annotation.Nonnull Integer avatar) { this.avatar = avatar; } - public FavoriteGroupLimits friend(Integer friend) { - + public FavoriteGroupLimits friend(@javax.annotation.Nonnull Integer friend) { this.friend = friend; return this; } - /** + /** * Get friend * @return friend - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getFriend() { return friend; } - - public void setFriend(Integer friend) { + public void setFriend(@javax.annotation.Nonnull Integer friend) { this.friend = friend; } - public FavoriteGroupLimits vrcPlusWorld(Integer vrcPlusWorld) { - + public FavoriteGroupLimits vrcPlusWorld(@javax.annotation.Nonnull Integer vrcPlusWorld) { this.vrcPlusWorld = vrcPlusWorld; return this; } - /** + /** * Get vrcPlusWorld * @return vrcPlusWorld - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getVrcPlusWorld() { return vrcPlusWorld; } - - public void setVrcPlusWorld(Integer vrcPlusWorld) { + public void setVrcPlusWorld(@javax.annotation.Nonnull Integer vrcPlusWorld) { this.vrcPlusWorld = vrcPlusWorld; } - public FavoriteGroupLimits world(Integer world) { - + public FavoriteGroupLimits world(@javax.annotation.Nonnull Integer world) { this.world = world; return this; } - /** + /** * Get world * @return world - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getWorld() { return world; } - - public void setWorld(Integer world) { + public void setWorld(@javax.annotation.Nonnull Integer world) { this.world = world; } @@ -198,10 +186,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -210,47 +195,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatar"); - openapiFields.add("friend"); - openapiFields.add("vrcPlusWorld"); - openapiFields.add("world"); + openapiFields = new HashSet(Arrays.asList("avatar", "friend", "vrcPlusWorld", "world")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("avatar"); - openapiRequiredFields.add("friend"); - openapiRequiredFields.add("vrcPlusWorld"); - openapiRequiredFields.add("world"); + openapiRequiredFields = new HashSet(Arrays.asList("avatar", "friend", "vrcPlusWorld", "world")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FavoriteGroupLimits - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FavoriteGroupLimits.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FavoriteGroupLimits is not found in the empty JSON string", FavoriteGroupLimits.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FavoriteGroupLimits + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FavoriteGroupLimits.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FavoriteGroupLimits is not found in the empty JSON string", FavoriteGroupLimits.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FavoriteGroupLimits.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FavoriteGroupLimits` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FavoriteGroupLimits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FavoriteGroupLimits.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -273,31 +251,31 @@ public void write(JsonWriter out, FavoriteGroupLimits value) throws IOException @Override public FavoriteGroupLimits read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FavoriteGroupLimits given an JSON string - * - * @param jsonString JSON string - * @return An instance of FavoriteGroupLimits - * @throws IOException if the JSON string is invalid with respect to FavoriteGroupLimits - */ + /** + * Create an instance of FavoriteGroupLimits given an JSON string + * + * @param jsonString JSON string + * @return An instance of FavoriteGroupLimits + * @throws IOException if the JSON string is invalid with respect to FavoriteGroupLimits + */ public static FavoriteGroupLimits fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FavoriteGroupLimits.class); } - /** - * Convert an instance of FavoriteGroupLimits to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FavoriteGroupLimits to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FavoriteGroupVisibility.java b/src/main/java/io/github/vrchatapi/model/FavoriteGroupVisibility.java index 23dc1110..a7be8bf3 100644 --- a/src/main/java/io/github/vrchatapi/model/FavoriteGroupVisibility.java +++ b/src/main/java/io/github/vrchatapi/model/FavoriteGroupVisibility.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -70,5 +70,10 @@ public FavoriteGroupVisibility read(final JsonReader jsonReader) throws IOExcept return FavoriteGroupVisibility.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FavoriteGroupVisibility.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/FavoriteLimits.java b/src/main/java/io/github/vrchatapi/model/FavoriteLimits.java index a8e88160..a17d0b09 100644 --- a/src/main/java/io/github/vrchatapi/model/FavoriteLimits.java +++ b/src/main/java/io/github/vrchatapi/model/FavoriteLimits.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.FavoriteGroupLimits; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,115 +48,103 @@ /** * FavoriteLimits */ -@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 FavoriteLimits { public static final String SERIALIZED_NAME_DEFAULT_MAX_FAVORITE_GROUPS = "defaultMaxFavoriteGroups"; @SerializedName(SERIALIZED_NAME_DEFAULT_MAX_FAVORITE_GROUPS) + @javax.annotation.Nonnull private Integer defaultMaxFavoriteGroups; public static final String SERIALIZED_NAME_DEFAULT_MAX_FAVORITES_PER_GROUP = "defaultMaxFavoritesPerGroup"; @SerializedName(SERIALIZED_NAME_DEFAULT_MAX_FAVORITES_PER_GROUP) + @javax.annotation.Nonnull private Integer defaultMaxFavoritesPerGroup; public static final String SERIALIZED_NAME_MAX_FAVORITE_GROUPS = "maxFavoriteGroups"; @SerializedName(SERIALIZED_NAME_MAX_FAVORITE_GROUPS) + @javax.annotation.Nonnull private FavoriteGroupLimits maxFavoriteGroups; public static final String SERIALIZED_NAME_MAX_FAVORITES_PER_GROUP = "maxFavoritesPerGroup"; @SerializedName(SERIALIZED_NAME_MAX_FAVORITES_PER_GROUP) + @javax.annotation.Nonnull private FavoriteGroupLimits maxFavoritesPerGroup; public FavoriteLimits() { } - public FavoriteLimits defaultMaxFavoriteGroups(Integer defaultMaxFavoriteGroups) { - + public FavoriteLimits defaultMaxFavoriteGroups(@javax.annotation.Nonnull Integer defaultMaxFavoriteGroups) { this.defaultMaxFavoriteGroups = defaultMaxFavoriteGroups; return this; } - /** + /** * Get defaultMaxFavoriteGroups * @return defaultMaxFavoriteGroups - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getDefaultMaxFavoriteGroups() { return defaultMaxFavoriteGroups; } - - public void setDefaultMaxFavoriteGroups(Integer defaultMaxFavoriteGroups) { + public void setDefaultMaxFavoriteGroups(@javax.annotation.Nonnull Integer defaultMaxFavoriteGroups) { this.defaultMaxFavoriteGroups = defaultMaxFavoriteGroups; } - public FavoriteLimits defaultMaxFavoritesPerGroup(Integer defaultMaxFavoritesPerGroup) { - + public FavoriteLimits defaultMaxFavoritesPerGroup(@javax.annotation.Nonnull Integer defaultMaxFavoritesPerGroup) { this.defaultMaxFavoritesPerGroup = defaultMaxFavoritesPerGroup; return this; } - /** + /** * Get defaultMaxFavoritesPerGroup * @return defaultMaxFavoritesPerGroup - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getDefaultMaxFavoritesPerGroup() { return defaultMaxFavoritesPerGroup; } - - public void setDefaultMaxFavoritesPerGroup(Integer defaultMaxFavoritesPerGroup) { + public void setDefaultMaxFavoritesPerGroup(@javax.annotation.Nonnull Integer defaultMaxFavoritesPerGroup) { this.defaultMaxFavoritesPerGroup = defaultMaxFavoritesPerGroup; } - public FavoriteLimits maxFavoriteGroups(FavoriteGroupLimits maxFavoriteGroups) { - + public FavoriteLimits maxFavoriteGroups(@javax.annotation.Nonnull FavoriteGroupLimits maxFavoriteGroups) { this.maxFavoriteGroups = maxFavoriteGroups; return this; } - /** + /** * Get maxFavoriteGroups * @return maxFavoriteGroups - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FavoriteGroupLimits getMaxFavoriteGroups() { return maxFavoriteGroups; } - - public void setMaxFavoriteGroups(FavoriteGroupLimits maxFavoriteGroups) { + public void setMaxFavoriteGroups(@javax.annotation.Nonnull FavoriteGroupLimits maxFavoriteGroups) { this.maxFavoriteGroups = maxFavoriteGroups; } - public FavoriteLimits maxFavoritesPerGroup(FavoriteGroupLimits maxFavoritesPerGroup) { - + public FavoriteLimits maxFavoritesPerGroup(@javax.annotation.Nonnull FavoriteGroupLimits maxFavoritesPerGroup) { this.maxFavoritesPerGroup = maxFavoritesPerGroup; return this; } - /** + /** * Get maxFavoritesPerGroup * @return maxFavoritesPerGroup - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FavoriteGroupLimits getMaxFavoritesPerGroup() { return maxFavoritesPerGroup; } - - public void setMaxFavoritesPerGroup(FavoriteGroupLimits maxFavoritesPerGroup) { + public void setMaxFavoritesPerGroup(@javax.annotation.Nonnull FavoriteGroupLimits maxFavoritesPerGroup) { this.maxFavoritesPerGroup = maxFavoritesPerGroup; } @@ -199,10 +187,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -211,51 +196,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("defaultMaxFavoriteGroups"); - openapiFields.add("defaultMaxFavoritesPerGroup"); - openapiFields.add("maxFavoriteGroups"); - openapiFields.add("maxFavoritesPerGroup"); + openapiFields = new HashSet(Arrays.asList("defaultMaxFavoriteGroups", "defaultMaxFavoritesPerGroup", "maxFavoriteGroups", "maxFavoritesPerGroup")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("defaultMaxFavoriteGroups"); - openapiRequiredFields.add("defaultMaxFavoritesPerGroup"); - openapiRequiredFields.add("maxFavoriteGroups"); - openapiRequiredFields.add("maxFavoritesPerGroup"); + openapiRequiredFields = new HashSet(Arrays.asList("defaultMaxFavoriteGroups", "defaultMaxFavoritesPerGroup", "maxFavoriteGroups", "maxFavoritesPerGroup")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FavoriteLimits - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FavoriteLimits.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FavoriteLimits is not found in the empty JSON string", FavoriteLimits.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FavoriteLimits + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FavoriteLimits.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FavoriteLimits is not found in the empty JSON string", FavoriteLimits.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FavoriteLimits.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FavoriteLimits` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FavoriteLimits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FavoriteLimits.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `maxFavoriteGroups` - FavoriteGroupLimits.validateJsonObject(jsonObj.getAsJsonObject("maxFavoriteGroups")); + FavoriteGroupLimits.validateJsonElement(jsonObj.get("maxFavoriteGroups")); // validate the required field `maxFavoritesPerGroup` - FavoriteGroupLimits.validateJsonObject(jsonObj.getAsJsonObject("maxFavoritesPerGroup")); + FavoriteGroupLimits.validateJsonElement(jsonObj.get("maxFavoritesPerGroup")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -278,31 +256,31 @@ public void write(JsonWriter out, FavoriteLimits value) throws IOException { @Override public FavoriteLimits read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FavoriteLimits given an JSON string - * - * @param jsonString JSON string - * @return An instance of FavoriteLimits - * @throws IOException if the JSON string is invalid with respect to FavoriteLimits - */ + /** + * Create an instance of FavoriteLimits given an JSON string + * + * @param jsonString JSON string + * @return An instance of FavoriteLimits + * @throws IOException if the JSON string is invalid with respect to FavoriteLimits + */ public static FavoriteLimits fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FavoriteLimits.class); } - /** - * Convert an instance of FavoriteLimits to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FavoriteLimits to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FavoriteType.java b/src/main/java/io/github/vrchatapi/model/FavoriteType.java index ee5bfcb2..6bd9283e 100644 --- a/src/main/java/io/github/vrchatapi/model/FavoriteType.java +++ b/src/main/java/io/github/vrchatapi/model/FavoriteType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -32,7 +32,7 @@ public enum FavoriteType { FRIEND("friend"), - VRCPLUSWORLD("vrcPlusWorld"), + VRC_PLUS_WORLD("vrcPlusWorld"), WORLD("world"); @@ -72,5 +72,10 @@ public FavoriteType read(final JsonReader jsonReader) throws IOException { return FavoriteType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FavoriteType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/FavoritedWorld.java b/src/main/java/io/github/vrchatapi/model/FavoritedWorld.java index 723de35d..eab03f92 100644 --- a/src/main/java/io/github/vrchatapi/model/FavoritedWorld.java +++ b/src/main/java/io/github/vrchatapi/model/FavoritedWorld.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,11 +21,10 @@ import io.github.vrchatapi.model.InstanceContentSettings; import io.github.vrchatapi.model.ReleaseStatus; import io.github.vrchatapi.model.UnityPackage; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -40,13 +38,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -54,644 +54,584 @@ /** * */ -@ApiModel(description = "") -@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 FavoritedWorld { public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable private String authorId; public static final String SERIALIZED_NAME_AUTHOR_NAME = "authorName"; @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nonnull private String authorName; public static final String SERIALIZED_NAME_CAPACITY = "capacity"; @SerializedName(SERIALIZED_NAME_CAPACITY) + @javax.annotation.Nonnull private Integer capacity; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DEFAULT_CONTENT_SETTINGS = "defaultContentSettings"; @SerializedName(SERIALIZED_NAME_DEFAULT_CONTENT_SETTINGS) + @javax.annotation.Nullable private InstanceContentSettings defaultContentSettings; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_FAVORITE_GROUP = "favoriteGroup"; @SerializedName(SERIALIZED_NAME_FAVORITE_GROUP) + @javax.annotation.Nonnull private String favoriteGroup; public static final String SERIALIZED_NAME_FAVORITE_ID = "favoriteId"; @SerializedName(SERIALIZED_NAME_FAVORITE_ID) + @javax.annotation.Nonnull private String favoriteId; public static final String SERIALIZED_NAME_FAVORITES = "favorites"; @SerializedName(SERIALIZED_NAME_FAVORITES) + @javax.annotation.Nullable private Integer favorites = 0; public static final String SERIALIZED_NAME_FEATURED = "featured"; @SerializedName(SERIALIZED_NAME_FEATURED) + @javax.annotation.Nullable private Boolean featured = false; public static final String SERIALIZED_NAME_HEAT = "heat"; @SerializedName(SERIALIZED_NAME_HEAT) + @javax.annotation.Nullable private Integer heat = 0; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_LABS_PUBLICATION_DATE = "labsPublicationDate"; @SerializedName(SERIALIZED_NAME_LABS_PUBLICATION_DATE) + @javax.annotation.Nullable private String labsPublicationDate; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_OCCUPANTS = "occupants"; @SerializedName(SERIALIZED_NAME_OCCUPANTS) + @javax.annotation.Nonnull private Integer occupants = 0; public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; @SerializedName(SERIALIZED_NAME_ORGANIZATION) + @javax.annotation.Nullable private String organization = "vrchat"; public static final String SERIALIZED_NAME_POPULARITY = "popularity"; @SerializedName(SERIALIZED_NAME_POPULARITY) + @javax.annotation.Nullable private Integer popularity = 0; public static final String SERIALIZED_NAME_PREVIEW_YOUTUBE_ID = "previewYoutubeId"; @SerializedName(SERIALIZED_NAME_PREVIEW_YOUTUBE_ID) + @javax.annotation.Nullable private String previewYoutubeId; public static final String SERIALIZED_NAME_PUBLICATION_DATE = "publicationDate"; @SerializedName(SERIALIZED_NAME_PUBLICATION_DATE) + @javax.annotation.Nullable private String publicationDate; public static final String SERIALIZED_NAME_RECOMMENDED_CAPACITY = "recommendedCapacity"; @SerializedName(SERIALIZED_NAME_RECOMMENDED_CAPACITY) + @javax.annotation.Nullable private Integer recommendedCapacity; public static final String SERIALIZED_NAME_RELEASE_STATUS = "releaseStatus"; @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) + @javax.annotation.Nonnull private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_THUMBNAIL_IMAGE_URL = "thumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nonnull private String thumbnailImageUrl; public static final String SERIALIZED_NAME_UDON_PRODUCTS = "udonProducts"; @SerializedName(SERIALIZED_NAME_UDON_PRODUCTS) - private List udonProducts = null; + @javax.annotation.Nullable + private List udonProducts = new ArrayList<>(); public static final String SERIALIZED_NAME_UNITY_PACKAGES = "unityPackages"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGES) - private List unityPackages = null; + @javax.annotation.Nullable + private List unityPackages = new ArrayList<>(); public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_URL_LIST = "urlList"; @SerializedName(SERIALIZED_NAME_URL_LIST) - private List urlList = null; + @javax.annotation.Nullable + private List urlList = new ArrayList<>(); public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nullable private Integer version; public static final String SERIALIZED_NAME_VISITS = "visits"; @SerializedName(SERIALIZED_NAME_VISITS) + @javax.annotation.Nullable private Integer visits = 0; public FavoritedWorld() { } - public FavoritedWorld authorId(String authorId) { - + public FavoritedWorld authorId(@javax.annotation.Nullable String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nullable String authorId) { this.authorId = authorId; } - public FavoritedWorld authorName(String authorName) { - + public FavoritedWorld authorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; return this; } - /** + /** * Get authorName * @return authorName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAuthorName() { return authorName; } - - public void setAuthorName(String authorName) { + public void setAuthorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; } - public FavoritedWorld capacity(Integer capacity) { - + public FavoritedWorld capacity(@javax.annotation.Nonnull Integer capacity) { this.capacity = capacity; return this; } - /** + /** * Get capacity * @return capacity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "8", required = true, value = "") - public Integer getCapacity() { return capacity; } - - public void setCapacity(Integer capacity) { + public void setCapacity(@javax.annotation.Nonnull Integer capacity) { this.capacity = capacity; } - public FavoritedWorld createdAt(OffsetDateTime createdAt) { - + public FavoritedWorld createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public FavoritedWorld defaultContentSettings(InstanceContentSettings defaultContentSettings) { - + public FavoritedWorld defaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { this.defaultContentSettings = defaultContentSettings; return this; } - /** + /** * Get defaultContentSettings * @return defaultContentSettings - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InstanceContentSettings getDefaultContentSettings() { return defaultContentSettings; } - - public void setDefaultContentSettings(InstanceContentSettings defaultContentSettings) { + public void setDefaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { this.defaultContentSettings = defaultContentSettings; } - public FavoritedWorld description(String description) { - + public FavoritedWorld description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public FavoritedWorld favoriteGroup(String favoriteGroup) { - + public FavoritedWorld favoriteGroup(@javax.annotation.Nonnull String favoriteGroup) { this.favoriteGroup = favoriteGroup; return this; } - /** + /** * Get favoriteGroup * @return favoriteGroup - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getFavoriteGroup() { return favoriteGroup; } - - public void setFavoriteGroup(String favoriteGroup) { + public void setFavoriteGroup(@javax.annotation.Nonnull String favoriteGroup) { this.favoriteGroup = favoriteGroup; } - public FavoritedWorld favoriteId(String favoriteId) { - + public FavoritedWorld favoriteId(@javax.annotation.Nonnull String favoriteId) { this.favoriteId = favoriteId; return this; } - /** + /** * Get favoriteId * @return favoriteId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "fvrt_9568d189-8776-44a5-a8c8-defc981e44de", required = true, value = "") - public String getFavoriteId() { return favoriteId; } - - public void setFavoriteId(String favoriteId) { + public void setFavoriteId(@javax.annotation.Nonnull String favoriteId) { this.favoriteId = favoriteId; } - public FavoritedWorld favorites(Integer favorites) { - + public FavoritedWorld favorites(@javax.annotation.Nullable Integer favorites) { this.favorites = favorites; return this; } - /** + /** * Get favorites * minimum: 0 * @return favorites - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "12024", value = "") - public Integer getFavorites() { return favorites; } - - public void setFavorites(Integer favorites) { + public void setFavorites(@javax.annotation.Nullable Integer favorites) { this.favorites = favorites; } - public FavoritedWorld featured(Boolean featured) { - + public FavoritedWorld featured(@javax.annotation.Nullable Boolean featured) { this.featured = featured; return this; } - /** + /** * Get featured * @return featured - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getFeatured() { return featured; } - - public void setFeatured(Boolean featured) { + public void setFeatured(@javax.annotation.Nullable Boolean featured) { this.featured = featured; } - public FavoritedWorld heat(Integer heat) { - + public FavoritedWorld heat(@javax.annotation.Nullable Integer heat) { this.heat = heat; return this; } - /** + /** * Get heat * minimum: 0 * @return heat - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "5", value = "") - public Integer getHeat() { return heat; } - - public void setHeat(Integer heat) { + public void setHeat(@javax.annotation.Nullable Integer heat) { this.heat = heat; } - public FavoritedWorld id(String id) { - + public FavoritedWorld id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public FavoritedWorld imageUrl(String imageUrl) { - + public FavoritedWorld imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public FavoritedWorld labsPublicationDate(String labsPublicationDate) { - + public FavoritedWorld labsPublicationDate(@javax.annotation.Nullable String labsPublicationDate) { this.labsPublicationDate = labsPublicationDate; return this; } - /** + /** * Get labsPublicationDate * @return labsPublicationDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "none", value = "") - public String getLabsPublicationDate() { return labsPublicationDate; } - - public void setLabsPublicationDate(String labsPublicationDate) { + public void setLabsPublicationDate(@javax.annotation.Nullable String labsPublicationDate) { this.labsPublicationDate = labsPublicationDate; } - public FavoritedWorld name(String name) { - + public FavoritedWorld name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public FavoritedWorld occupants(Integer occupants) { - + public FavoritedWorld occupants(@javax.annotation.Nonnull Integer occupants) { this.occupants = occupants; return this; } - /** + /** * Get occupants * minimum: 0 * @return occupants - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "47", required = true, value = "") - public Integer getOccupants() { return occupants; } - - public void setOccupants(Integer occupants) { + public void setOccupants(@javax.annotation.Nonnull Integer occupants) { this.occupants = occupants; } - public FavoritedWorld organization(String organization) { - + public FavoritedWorld organization(@javax.annotation.Nullable String organization) { this.organization = organization; return this; } - /** + /** * Get organization * @return organization - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getOrganization() { return organization; } - - public void setOrganization(String organization) { + public void setOrganization(@javax.annotation.Nullable String organization) { this.organization = organization; } - public FavoritedWorld popularity(Integer popularity) { - + public FavoritedWorld popularity(@javax.annotation.Nullable Integer popularity) { this.popularity = popularity; return this; } - /** + /** * Get popularity * minimum: 0 * @return popularity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "8", value = "") - public Integer getPopularity() { return popularity; } - - public void setPopularity(Integer popularity) { + public void setPopularity(@javax.annotation.Nullable Integer popularity) { this.popularity = popularity; } - public FavoritedWorld previewYoutubeId(String previewYoutubeId) { - + public FavoritedWorld previewYoutubeId(@javax.annotation.Nullable String previewYoutubeId) { this.previewYoutubeId = previewYoutubeId; return this; } - /** + /** * Get previewYoutubeId * @return previewYoutubeId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPreviewYoutubeId() { return previewYoutubeId; } - - public void setPreviewYoutubeId(String previewYoutubeId) { + public void setPreviewYoutubeId(@javax.annotation.Nullable String previewYoutubeId) { this.previewYoutubeId = previewYoutubeId; } - public FavoritedWorld publicationDate(String publicationDate) { - + public FavoritedWorld publicationDate(@javax.annotation.Nullable String publicationDate) { this.publicationDate = publicationDate; return this; } - /** + /** * Get publicationDate * @return publicationDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "none", value = "") - public String getPublicationDate() { return publicationDate; } - - public void setPublicationDate(String publicationDate) { + public void setPublicationDate(@javax.annotation.Nullable String publicationDate) { this.publicationDate = publicationDate; } - public FavoritedWorld recommendedCapacity(Integer recommendedCapacity) { - + public FavoritedWorld recommendedCapacity(@javax.annotation.Nullable Integer recommendedCapacity) { this.recommendedCapacity = recommendedCapacity; return this; } - /** + /** * Get recommendedCapacity * @return recommendedCapacity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "16", value = "") - public Integer getRecommendedCapacity() { return recommendedCapacity; } - - public void setRecommendedCapacity(Integer recommendedCapacity) { + public void setRecommendedCapacity(@javax.annotation.Nullable Integer recommendedCapacity) { this.recommendedCapacity = recommendedCapacity; } - public FavoritedWorld releaseStatus(ReleaseStatus releaseStatus) { - + public FavoritedWorld releaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; return this; } - /** + /** * Get releaseStatus * @return releaseStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ReleaseStatus getReleaseStatus() { return releaseStatus; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { + public void setReleaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; } - public FavoritedWorld tags(List tags) { - + public FavoritedWorld tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -704,48 +644,40 @@ public FavoritedWorld addTagsItem(String tagsItem) { return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public FavoritedWorld thumbnailImageUrl(String thumbnailImageUrl) { - + public FavoritedWorld thumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; return this; } - /** + /** * Get thumbnailImageUrl * @return thumbnailImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getThumbnailImageUrl() { return thumbnailImageUrl; } - - public void setThumbnailImageUrl(String thumbnailImageUrl) { + public void setThumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; } - public FavoritedWorld udonProducts(List udonProducts) { - + public FavoritedWorld udonProducts(@javax.annotation.Nullable List udonProducts) { this.udonProducts = udonProducts; return this; } @@ -758,25 +690,21 @@ public FavoritedWorld addUdonProductsItem(String udonProductsItem) { return this; } - /** + /** * Get udonProducts * @return udonProducts - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getUdonProducts() { return udonProducts; } - - public void setUdonProducts(List udonProducts) { + public void setUdonProducts(@javax.annotation.Nullable List udonProducts) { this.udonProducts = udonProducts; } - public FavoritedWorld unityPackages(List unityPackages) { - + public FavoritedWorld unityPackages(@javax.annotation.Nullable List unityPackages) { this.unityPackages = unityPackages; return this; } @@ -789,48 +717,40 @@ public FavoritedWorld addUnityPackagesItem(UnityPackage unityPackagesItem) { return this; } - /** + /** * * @return unityPackages - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getUnityPackages() { return unityPackages; } - - public void setUnityPackages(List unityPackages) { + public void setUnityPackages(@javax.annotation.Nullable List unityPackages) { this.unityPackages = unityPackages; } - public FavoritedWorld updatedAt(OffsetDateTime updatedAt) { - + public FavoritedWorld updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public FavoritedWorld urlList(List urlList) { - + public FavoritedWorld urlList(@javax.annotation.Nullable List urlList) { this.urlList = urlList; return this; } @@ -843,67 +763,56 @@ public FavoritedWorld addUrlListItem(String urlListItem) { return this; } - /** + /** * Get urlList * @return urlList - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getUrlList() { return urlList; } - - public void setUrlList(List urlList) { + public void setUrlList(@javax.annotation.Nullable List urlList) { this.urlList = urlList; } - public FavoritedWorld version(Integer version) { - + public FavoritedWorld version(@javax.annotation.Nullable Integer version) { this.version = version; return this; } - /** + /** * Get version * minimum: 1 * @return version - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nullable Integer version) { this.version = version; } - public FavoritedWorld visits(Integer visits) { - + public FavoritedWorld visits(@javax.annotation.Nullable Integer visits) { this.visits = visits; return this; } - /** + /** * Get visits * minimum: 0 * @return visits - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "9988675", value = "") - public Integer getVisits() { return visits; } - - public void setVisits(Integer visits) { + public void setVisits(@javax.annotation.Nullable Integer visits) { this.visits = visits; } @@ -1009,10 +918,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -1021,147 +927,110 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authorId"); - openapiFields.add("authorName"); - openapiFields.add("capacity"); - openapiFields.add("created_at"); - openapiFields.add("defaultContentSettings"); - openapiFields.add("description"); - openapiFields.add("favoriteGroup"); - openapiFields.add("favoriteId"); - openapiFields.add("favorites"); - openapiFields.add("featured"); - openapiFields.add("heat"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("labsPublicationDate"); - openapiFields.add("name"); - openapiFields.add("occupants"); - openapiFields.add("organization"); - openapiFields.add("popularity"); - openapiFields.add("previewYoutubeId"); - openapiFields.add("publicationDate"); - openapiFields.add("recommendedCapacity"); - openapiFields.add("releaseStatus"); - openapiFields.add("tags"); - openapiFields.add("thumbnailImageUrl"); - openapiFields.add("udonProducts"); - openapiFields.add("unityPackages"); - openapiFields.add("updated_at"); - openapiFields.add("urlList"); - openapiFields.add("version"); - openapiFields.add("visits"); + openapiFields = new HashSet(Arrays.asList("authorId", "authorName", "capacity", "created_at", "defaultContentSettings", "description", "favoriteGroup", "favoriteId", "favorites", "featured", "heat", "id", "imageUrl", "labsPublicationDate", "name", "occupants", "organization", "popularity", "previewYoutubeId", "publicationDate", "recommendedCapacity", "releaseStatus", "tags", "thumbnailImageUrl", "udonProducts", "unityPackages", "updated_at", "urlList", "version", "visits")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("authorName"); - openapiRequiredFields.add("capacity"); - openapiRequiredFields.add("favoriteGroup"); - openapiRequiredFields.add("favoriteId"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("occupants"); - openapiRequiredFields.add("releaseStatus"); - openapiRequiredFields.add("thumbnailImageUrl"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FavoritedWorld - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FavoritedWorld.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FavoritedWorld is not found in the empty JSON string", FavoritedWorld.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("authorName", "capacity", "favoriteGroup", "favoriteId", "id", "imageUrl", "name", "occupants", "releaseStatus", "thumbnailImageUrl")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FavoritedWorld + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FavoritedWorld.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FavoritedWorld is not found in the empty JSON string", FavoritedWorld.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FavoritedWorld.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FavoritedWorld` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FavoritedWorld` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FavoritedWorld.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("authorId") != null && !jsonObj.get("authorId").isJsonNull()) && !jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if (!jsonObj.get("authorName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); } // validate the optional field `defaultContentSettings` if (jsonObj.get("defaultContentSettings") != null && !jsonObj.get("defaultContentSettings").isJsonNull()) { - InstanceContentSettings.validateJsonObject(jsonObj.getAsJsonObject("defaultContentSettings")); + InstanceContentSettings.validateJsonElement(jsonObj.get("defaultContentSettings")); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("favoriteGroup").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `favoriteGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("favoriteGroup").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `favoriteGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("favoriteGroup").toString())); } if (!jsonObj.get("favoriteId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `favoriteId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("favoriteId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `favoriteId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("favoriteId").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if ((jsonObj.get("labsPublicationDate") != null && !jsonObj.get("labsPublicationDate").isJsonNull()) && !jsonObj.get("labsPublicationDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `labsPublicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("labsPublicationDate").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `labsPublicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("labsPublicationDate").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("organization") != null && !jsonObj.get("organization").isJsonNull()) && !jsonObj.get("organization").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `organization` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `organization` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization").toString())); } if ((jsonObj.get("previewYoutubeId") != null && !jsonObj.get("previewYoutubeId").isJsonNull()) && !jsonObj.get("previewYoutubeId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `previewYoutubeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previewYoutubeId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `previewYoutubeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previewYoutubeId").toString())); } if ((jsonObj.get("publicationDate") != null && !jsonObj.get("publicationDate").isJsonNull()) && !jsonObj.get("publicationDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `publicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publicationDate").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `publicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publicationDate").toString())); } + // validate the required field `releaseStatus` + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("thumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("udonProducts") != null && !jsonObj.get("udonProducts").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `udonProducts` to be an array in the JSON string but got `%s`", jsonObj.get("udonProducts").toString())); + if (jsonObj.get("udonProducts") != null && !jsonObj.get("udonProducts").isJsonNull() && !jsonObj.get("udonProducts").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `udonProducts` to be an array in the JSON string but got `%s`", jsonObj.get("udonProducts").toString())); } if (jsonObj.get("unityPackages") != null && !jsonObj.get("unityPackages").isJsonNull()) { JsonArray jsonArrayunityPackages = jsonObj.getAsJsonArray("unityPackages"); if (jsonArrayunityPackages != null) { // ensure the json data is an array if (!jsonObj.get("unityPackages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); } // validate the optional field `unityPackages` (array) for (int i = 0; i < jsonArrayunityPackages.size(); i++) { - UnityPackage.validateJsonObject(jsonArrayunityPackages.get(i).getAsJsonObject()); + UnityPackage.validateJsonElement(jsonArrayunityPackages.get(i)); }; } } // ensure the optional json data is an array if present - if (jsonObj.get("urlList") != null && !jsonObj.get("urlList").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `urlList` to be an array in the JSON string but got `%s`", jsonObj.get("urlList").toString())); + if (jsonObj.get("urlList") != null && !jsonObj.get("urlList").isJsonNull() && !jsonObj.get("urlList").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `urlList` to be an array in the JSON string but got `%s`", jsonObj.get("urlList").toString())); } } @@ -1185,31 +1054,31 @@ public void write(JsonWriter out, FavoritedWorld value) throws IOException { @Override public FavoritedWorld read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FavoritedWorld given an JSON string - * - * @param jsonString JSON string - * @return An instance of FavoritedWorld - * @throws IOException if the JSON string is invalid with respect to FavoritedWorld - */ + /** + * Create an instance of FavoritedWorld given an JSON string + * + * @param jsonString JSON string + * @return An instance of FavoritedWorld + * @throws IOException if the JSON string is invalid with respect to FavoritedWorld + */ public static FavoritedWorld fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FavoritedWorld.class); } - /** - * Convert an instance of FavoritedWorld to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FavoritedWorld to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Feedback.java b/src/main/java/io/github/vrchatapi/model/Feedback.java index 53d252b7..315c8d3e 100644 --- a/src/main/java/io/github/vrchatapi/model/Feedback.java +++ b/src/main/java/io/github/vrchatapi/model/Feedback.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,363 +50,327 @@ /** * Feedback */ -@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 Feedback { public static final String SERIALIZED_NAME_COMMENTER_ID = "commenterId"; @SerializedName(SERIALIZED_NAME_COMMENTER_ID) + @javax.annotation.Nonnull private String commenterId; public static final String SERIALIZED_NAME_COMMENTER_NAME = "commenterName"; @SerializedName(SERIALIZED_NAME_COMMENTER_NAME) + @javax.annotation.Nonnull private String commenterName; public static final String SERIALIZED_NAME_CONTENT_AUTHOR_ID = "contentAuthorId"; @SerializedName(SERIALIZED_NAME_CONTENT_AUTHOR_ID) + @javax.annotation.Nonnull private String contentAuthorId; public static final String SERIALIZED_NAME_CONTENT_AUTHOR_NAME = "contentAuthorName"; @SerializedName(SERIALIZED_NAME_CONTENT_AUTHOR_NAME) + @javax.annotation.Nullable private String contentAuthorName; public static final String SERIALIZED_NAME_CONTENT_ID = "contentId"; @SerializedName(SERIALIZED_NAME_CONTENT_ID) + @javax.annotation.Nonnull private String contentId; public static final String SERIALIZED_NAME_CONTENT_NAME = "contentName"; @SerializedName(SERIALIZED_NAME_CONTENT_NAME) + @javax.annotation.Nullable private String contentName; public static final String SERIALIZED_NAME_CONTENT_TYPE = "contentType"; @SerializedName(SERIALIZED_NAME_CONTENT_TYPE) + @javax.annotation.Nonnull private String contentType; public static final String SERIALIZED_NAME_CONTENT_VERSION = "contentVersion"; @SerializedName(SERIALIZED_NAME_CONTENT_VERSION) + @javax.annotation.Nullable private Integer contentVersion; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nonnull private String reason; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private String type; public Feedback() { } - public Feedback commenterId(String commenterId) { - + public Feedback commenterId(@javax.annotation.Nonnull String commenterId) { this.commenterId = commenterId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return commenterId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getCommenterId() { return commenterId; } - - public void setCommenterId(String commenterId) { + public void setCommenterId(@javax.annotation.Nonnull String commenterId) { this.commenterId = commenterId; } - public Feedback commenterName(String commenterName) { - + public Feedback commenterName(@javax.annotation.Nonnull String commenterName) { this.commenterName = commenterName; return this; } - /** + /** * Get commenterName * @return commenterName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getCommenterName() { return commenterName; } - - public void setCommenterName(String commenterName) { + public void setCommenterName(@javax.annotation.Nonnull String commenterName) { this.commenterName = commenterName; } - public Feedback contentAuthorId(String contentAuthorId) { - + public Feedback contentAuthorId(@javax.annotation.Nonnull String contentAuthorId) { this.contentAuthorId = contentAuthorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return contentAuthorId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getContentAuthorId() { return contentAuthorId; } - - public void setContentAuthorId(String contentAuthorId) { + public void setContentAuthorId(@javax.annotation.Nonnull String contentAuthorId) { this.contentAuthorId = contentAuthorId; } - public Feedback contentAuthorName(String contentAuthorName) { - + public Feedback contentAuthorName(@javax.annotation.Nullable String contentAuthorName) { this.contentAuthorName = contentAuthorName; return this; } - /** + /** * Get contentAuthorName * @return contentAuthorName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getContentAuthorName() { return contentAuthorName; } - - public void setContentAuthorName(String contentAuthorName) { + public void setContentAuthorName(@javax.annotation.Nullable String contentAuthorName) { this.contentAuthorName = contentAuthorName; } - public Feedback contentId(String contentId) { - + public Feedback contentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; return this; } - /** + /** * Get contentId * @return contentId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getContentId() { return contentId; } - - public void setContentId(String contentId) { + public void setContentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; } - public Feedback contentName(String contentName) { - + public Feedback contentName(@javax.annotation.Nullable String contentName) { this.contentName = contentName; return this; } - /** + /** * Get contentName * @return contentName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getContentName() { return contentName; } - - public void setContentName(String contentName) { + public void setContentName(@javax.annotation.Nullable String contentName) { this.contentName = contentName; } - public Feedback contentType(String contentType) { - + public Feedback contentType(@javax.annotation.Nonnull String contentType) { this.contentType = contentType; return this; } - /** + /** * Get contentType * @return contentType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getContentType() { return contentType; } - - public void setContentType(String contentType) { + public void setContentType(@javax.annotation.Nonnull String contentType) { this.contentType = contentType; } - public Feedback contentVersion(Integer contentVersion) { - + public Feedback contentVersion(@javax.annotation.Nullable Integer contentVersion) { this.contentVersion = contentVersion; return this; } - /** + /** * Get contentVersion * @return contentVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public Integer getContentVersion() { return contentVersion; } - - public void setContentVersion(Integer contentVersion) { + public void setContentVersion(@javax.annotation.Nullable Integer contentVersion) { this.contentVersion = contentVersion; } - public Feedback description(String description) { - + public Feedback description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public Feedback id(String id) { - + public Feedback id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "feedback_8cffb23a-f961-444e-b496-0196d1c90adb", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Feedback reason(String reason) { - + public Feedback reason(@javax.annotation.Nonnull String reason) { this.reason = reason; return this; } - /** + /** * Get reason * @return reason - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getReason() { return reason; } - - public void setReason(String reason) { + public void setReason(@javax.annotation.Nonnull String reason) { this.reason = reason; } - public Feedback tags(List tags) { - + public Feedback tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public Feedback addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public Feedback type(String type) { - + public Feedback type(@javax.annotation.Nonnull String type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getType() { return type; } - - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } @@ -478,10 +442,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -490,101 +451,78 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("commenterId"); - openapiFields.add("commenterName"); - openapiFields.add("contentAuthorId"); - openapiFields.add("contentAuthorName"); - openapiFields.add("contentId"); - openapiFields.add("contentName"); - openapiFields.add("contentType"); - openapiFields.add("contentVersion"); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("reason"); - openapiFields.add("tags"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("commenterId", "commenterName", "contentAuthorId", "contentAuthorName", "contentId", "contentName", "contentType", "contentVersion", "description", "id", "reason", "tags", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("commenterId"); - openapiRequiredFields.add("commenterName"); - openapiRequiredFields.add("contentAuthorId"); - openapiRequiredFields.add("contentAuthorName"); - openapiRequiredFields.add("contentId"); - openapiRequiredFields.add("contentType"); - openapiRequiredFields.add("contentVersion"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("reason"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Feedback - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Feedback.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Feedback is not found in the empty JSON string", Feedback.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("commenterId", "commenterName", "contentAuthorId", "contentAuthorName", "contentId", "contentType", "contentVersion", "id", "reason", "tags", "type")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Feedback + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Feedback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Feedback is not found in the empty JSON string", Feedback.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Feedback.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Feedback` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Feedback` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Feedback.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("commenterId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `commenterId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commenterId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commenterId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commenterId").toString())); } if (!jsonObj.get("commenterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `commenterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commenterName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `commenterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commenterName").toString())); } if (!jsonObj.get("contentAuthorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentAuthorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentAuthorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentAuthorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentAuthorId").toString())); } - if (!jsonObj.get("contentAuthorName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentAuthorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentAuthorName").toString())); + if ((jsonObj.get("contentAuthorName") != null && !jsonObj.get("contentAuthorName").isJsonNull()) && !jsonObj.get("contentAuthorName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentAuthorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentAuthorName").toString())); } if (!jsonObj.get("contentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); } if ((jsonObj.get("contentName") != null && !jsonObj.get("contentName").isJsonNull()) && !jsonObj.get("contentName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentName").toString())); } if (!jsonObj.get("contentType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentType").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } @@ -608,31 +546,31 @@ public void write(JsonWriter out, Feedback value) throws IOException { @Override public Feedback read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Feedback given an JSON string - * - * @param jsonString JSON string - * @return An instance of Feedback - * @throws IOException if the JSON string is invalid with respect to Feedback - */ + /** + * Create an instance of Feedback given an JSON string + * + * @param jsonString JSON string + * @return An instance of Feedback + * @throws IOException if the JSON string is invalid with respect to Feedback + */ public static Feedback fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Feedback.class); } - /** - * Convert an instance of Feedback to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Feedback to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FileAnalysis.java b/src/main/java/io/github/vrchatapi/model/FileAnalysis.java index 6521a86b..84c84b6f 100644 --- a/src/main/java/io/github/vrchatapi/model/FileAnalysis.java +++ b/src/main/java/io/github/vrchatapi/model/FileAnalysis.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.FileAnalysisAvatarStats; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,196 +49,175 @@ /** * FileAnalysis */ -@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 FileAnalysis { public static final String SERIALIZED_NAME_AVATAR_STATS = "avatarStats"; @SerializedName(SERIALIZED_NAME_AVATAR_STATS) + @javax.annotation.Nonnull private FileAnalysisAvatarStats avatarStats; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_ENCRYPTION_KEY = "encryptionKey"; @SerializedName(SERIALIZED_NAME_ENCRYPTION_KEY) + @javax.annotation.Nullable private String encryptionKey; public static final String SERIALIZED_NAME_FILE_SIZE = "fileSize"; @SerializedName(SERIALIZED_NAME_FILE_SIZE) + @javax.annotation.Nonnull private Integer fileSize; public static final String SERIALIZED_NAME_PERFORMANCE_RATING = "performanceRating"; @SerializedName(SERIALIZED_NAME_PERFORMANCE_RATING) + @javax.annotation.Nullable private String performanceRating; public static final String SERIALIZED_NAME_SUCCESS = "success"; @SerializedName(SERIALIZED_NAME_SUCCESS) + @javax.annotation.Nonnull private Boolean success; public static final String SERIALIZED_NAME_UNCOMPRESSED_SIZE = "uncompressedSize"; @SerializedName(SERIALIZED_NAME_UNCOMPRESSED_SIZE) + @javax.annotation.Nonnull private Integer uncompressedSize; public FileAnalysis() { } - public FileAnalysis avatarStats(FileAnalysisAvatarStats avatarStats) { - + public FileAnalysis avatarStats(@javax.annotation.Nonnull FileAnalysisAvatarStats avatarStats) { this.avatarStats = avatarStats; return this; } - /** + /** * Get avatarStats * @return avatarStats - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FileAnalysisAvatarStats getAvatarStats() { return avatarStats; } - - public void setAvatarStats(FileAnalysisAvatarStats avatarStats) { + public void setAvatarStats(@javax.annotation.Nonnull FileAnalysisAvatarStats avatarStats) { this.avatarStats = avatarStats; } - public FileAnalysis createdAt(OffsetDateTime createdAt) { - + public FileAnalysis createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public FileAnalysis encryptionKey(String encryptionKey) { - + public FileAnalysis encryptionKey(@javax.annotation.Nullable String encryptionKey) { this.encryptionKey = encryptionKey; return this; } - /** + /** * Get encryptionKey * @return encryptionKey - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getEncryptionKey() { return encryptionKey; } - - public void setEncryptionKey(String encryptionKey) { + public void setEncryptionKey(@javax.annotation.Nullable String encryptionKey) { this.encryptionKey = encryptionKey; } - public FileAnalysis fileSize(Integer fileSize) { - + public FileAnalysis fileSize(@javax.annotation.Nonnull Integer fileSize) { this.fileSize = fileSize; return this; } - /** + /** * Get fileSize * @return fileSize - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getFileSize() { return fileSize; } - - public void setFileSize(Integer fileSize) { + public void setFileSize(@javax.annotation.Nonnull Integer fileSize) { this.fileSize = fileSize; } - public FileAnalysis performanceRating(String performanceRating) { - + public FileAnalysis performanceRating(@javax.annotation.Nullable String performanceRating) { this.performanceRating = performanceRating; return this; } - /** + /** * Get performanceRating * @return performanceRating - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPerformanceRating() { return performanceRating; } - - public void setPerformanceRating(String performanceRating) { + public void setPerformanceRating(@javax.annotation.Nullable String performanceRating) { this.performanceRating = performanceRating; } - public FileAnalysis success(Boolean success) { - + public FileAnalysis success(@javax.annotation.Nonnull Boolean success) { this.success = success; return this; } - /** + /** * Get success * @return success - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getSuccess() { return success; } - - public void setSuccess(Boolean success) { + public void setSuccess(@javax.annotation.Nonnull Boolean success) { this.success = success; } - public FileAnalysis uncompressedSize(Integer uncompressedSize) { - + public FileAnalysis uncompressedSize(@javax.annotation.Nonnull Integer uncompressedSize) { this.uncompressedSize = uncompressedSize; return this; } - /** + /** * Get uncompressedSize * @return uncompressedSize - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getUncompressedSize() { return uncompressedSize; } - - public void setUncompressedSize(Integer uncompressedSize) { + public void setUncompressedSize(@javax.annotation.Nonnull Integer uncompressedSize) { this.uncompressedSize = uncompressedSize; } @@ -287,10 +266,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -299,57 +275,47 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatarStats"); - openapiFields.add("created_at"); - openapiFields.add("encryptionKey"); - openapiFields.add("fileSize"); - openapiFields.add("performanceRating"); - openapiFields.add("success"); - openapiFields.add("uncompressedSize"); + openapiFields = new HashSet(Arrays.asList("avatarStats", "created_at", "encryptionKey", "fileSize", "performanceRating", "success", "uncompressedSize")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("avatarStats"); - openapiRequiredFields.add("fileSize"); - openapiRequiredFields.add("success"); - openapiRequiredFields.add("uncompressedSize"); + openapiRequiredFields = new HashSet(Arrays.asList("avatarStats", "fileSize", "success", "uncompressedSize")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FileAnalysis - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FileAnalysis.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FileAnalysis is not found in the empty JSON string", FileAnalysis.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FileAnalysis + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FileAnalysis.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FileAnalysis is not found in the empty JSON string", FileAnalysis.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FileAnalysis.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileAnalysis` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FileAnalysis` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FileAnalysis.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `avatarStats` - FileAnalysisAvatarStats.validateJsonObject(jsonObj.getAsJsonObject("avatarStats")); + FileAnalysisAvatarStats.validateJsonElement(jsonObj.get("avatarStats")); if ((jsonObj.get("encryptionKey") != null && !jsonObj.get("encryptionKey").isJsonNull()) && !jsonObj.get("encryptionKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `encryptionKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("encryptionKey").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `encryptionKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("encryptionKey").toString())); } if ((jsonObj.get("performanceRating") != null && !jsonObj.get("performanceRating").isJsonNull()) && !jsonObj.get("performanceRating").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `performanceRating` to be a primitive type in the JSON string but got `%s`", jsonObj.get("performanceRating").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `performanceRating` to be a primitive type in the JSON string but got `%s`", jsonObj.get("performanceRating").toString())); } } @@ -373,31 +339,31 @@ public void write(JsonWriter out, FileAnalysis value) throws IOException { @Override public FileAnalysis read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FileAnalysis given an JSON string - * - * @param jsonString JSON string - * @return An instance of FileAnalysis - * @throws IOException if the JSON string is invalid with respect to FileAnalysis - */ + /** + * Create an instance of FileAnalysis given an JSON string + * + * @param jsonString JSON string + * @return An instance of FileAnalysis + * @throws IOException if the JSON string is invalid with respect to FileAnalysis + */ public static FileAnalysis fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FileAnalysis.class); } - /** - * Convert an instance of FileAnalysis to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FileAnalysis to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FileAnalysisAvatarStats.java b/src/main/java/io/github/vrchatapi/model/FileAnalysisAvatarStats.java index 69024266..20e6cfdf 100644 --- a/src/main/java/io/github/vrchatapi/model/FileAnalysisAvatarStats.java +++ b/src/main/java/io/github/vrchatapi/model/FileAnalysisAvatarStats.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,1200 +50,1071 @@ /** * FileAnalysisAvatarStats */ -@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 FileAnalysisAvatarStats { public static final String SERIALIZED_NAME_ANIMATOR_COUNT = "animatorCount"; @SerializedName(SERIALIZED_NAME_ANIMATOR_COUNT) + @javax.annotation.Nonnull private Integer animatorCount; public static final String SERIALIZED_NAME_AUDIO_SOURCE_COUNT = "audioSourceCount"; @SerializedName(SERIALIZED_NAME_AUDIO_SOURCE_COUNT) + @javax.annotation.Nonnull private Integer audioSourceCount; public static final String SERIALIZED_NAME_BLEND_SHAPE_COUNT = "blendShapeCount"; @SerializedName(SERIALIZED_NAME_BLEND_SHAPE_COUNT) + @javax.annotation.Nonnull private Integer blendShapeCount; public static final String SERIALIZED_NAME_BONE_COUNT = "boneCount"; @SerializedName(SERIALIZED_NAME_BONE_COUNT) + @javax.annotation.Nonnull private Integer boneCount; public static final String SERIALIZED_NAME_BOUNDS = "bounds"; @SerializedName(SERIALIZED_NAME_BOUNDS) + @javax.annotation.Nonnull private List bounds = new ArrayList<>(); public static final String SERIALIZED_NAME_CAMERA_COUNT = "cameraCount"; @SerializedName(SERIALIZED_NAME_CAMERA_COUNT) + @javax.annotation.Nullable private Integer cameraCount; public static final String SERIALIZED_NAME_CLOTH_COUNT = "clothCount"; @SerializedName(SERIALIZED_NAME_CLOTH_COUNT) + @javax.annotation.Nonnull private Integer clothCount; public static final String SERIALIZED_NAME_CONSTRAINT_COUNT = "constraintCount"; @SerializedName(SERIALIZED_NAME_CONSTRAINT_COUNT) + @javax.annotation.Nonnull private Integer constraintCount; public static final String SERIALIZED_NAME_CONSTRAINT_DEPTH = "constraintDepth"; @SerializedName(SERIALIZED_NAME_CONSTRAINT_DEPTH) + @javax.annotation.Nonnull private Integer constraintDepth; public static final String SERIALIZED_NAME_CONTACT_COUNT = "contactCount"; @SerializedName(SERIALIZED_NAME_CONTACT_COUNT) + @javax.annotation.Nonnull private Integer contactCount; public static final String SERIALIZED_NAME_CUSTOM_EXPRESSIONS = "customExpressions"; @SerializedName(SERIALIZED_NAME_CUSTOM_EXPRESSIONS) + @javax.annotation.Nonnull private Boolean customExpressions; public static final String SERIALIZED_NAME_CUSTOMIZE_ANIMATION_LAYERS = "customizeAnimationLayers"; @SerializedName(SERIALIZED_NAME_CUSTOMIZE_ANIMATION_LAYERS) + @javax.annotation.Nonnull private Boolean customizeAnimationLayers; public static final String SERIALIZED_NAME_ENABLE_EYE_LOOK = "enableEyeLook"; @SerializedName(SERIALIZED_NAME_ENABLE_EYE_LOOK) + @javax.annotation.Nonnull private Boolean enableEyeLook; public static final String SERIALIZED_NAME_LIGHT_COUNT = "lightCount"; @SerializedName(SERIALIZED_NAME_LIGHT_COUNT) + @javax.annotation.Nonnull private Integer lightCount; public static final String SERIALIZED_NAME_LINE_RENDERER_COUNT = "lineRendererCount"; @SerializedName(SERIALIZED_NAME_LINE_RENDERER_COUNT) + @javax.annotation.Nonnull private Integer lineRendererCount; public static final String SERIALIZED_NAME_LIP_SYNC = "lipSync"; @SerializedName(SERIALIZED_NAME_LIP_SYNC) + @javax.annotation.Nonnull private Integer lipSync; public static final String SERIALIZED_NAME_MATERIAL_COUNT = "materialCount"; @SerializedName(SERIALIZED_NAME_MATERIAL_COUNT) + @javax.annotation.Nonnull private Integer materialCount; public static final String SERIALIZED_NAME_MATERIAL_SLOTS_USED = "materialSlotsUsed"; @SerializedName(SERIALIZED_NAME_MATERIAL_SLOTS_USED) + @javax.annotation.Nonnull private Integer materialSlotsUsed; public static final String SERIALIZED_NAME_MESH_COUNT = "meshCount"; @SerializedName(SERIALIZED_NAME_MESH_COUNT) + @javax.annotation.Nonnull private Integer meshCount; public static final String SERIALIZED_NAME_MESH_INDICES = "meshIndices"; @SerializedName(SERIALIZED_NAME_MESH_INDICES) + @javax.annotation.Nonnull private Integer meshIndices; public static final String SERIALIZED_NAME_MESH_PARTICLE_MAX_POLYGONS = "meshParticleMaxPolygons"; @SerializedName(SERIALIZED_NAME_MESH_PARTICLE_MAX_POLYGONS) + @javax.annotation.Nonnull private Integer meshParticleMaxPolygons; public static final String SERIALIZED_NAME_MESH_POLYGONS = "meshPolygons"; @SerializedName(SERIALIZED_NAME_MESH_POLYGONS) + @javax.annotation.Nonnull private Integer meshPolygons; public static final String SERIALIZED_NAME_MESH_VERTICES = "meshVertices"; @SerializedName(SERIALIZED_NAME_MESH_VERTICES) + @javax.annotation.Nonnull private Integer meshVertices; public static final String SERIALIZED_NAME_PARTICLE_COLLISION_ENABLED = "particleCollisionEnabled"; @SerializedName(SERIALIZED_NAME_PARTICLE_COLLISION_ENABLED) + @javax.annotation.Nonnull private Boolean particleCollisionEnabled; public static final String SERIALIZED_NAME_PARTICLE_SYSTEM_COUNT = "particleSystemCount"; @SerializedName(SERIALIZED_NAME_PARTICLE_SYSTEM_COUNT) + @javax.annotation.Nonnull private Integer particleSystemCount; public static final String SERIALIZED_NAME_PARTICLE_TRAILS_ENABLED = "particleTrailsEnabled"; @SerializedName(SERIALIZED_NAME_PARTICLE_TRAILS_ENABLED) + @javax.annotation.Nonnull private Boolean particleTrailsEnabled; public static final String SERIALIZED_NAME_PHYS_BONE_COLLIDER_COUNT = "physBoneColliderCount"; @SerializedName(SERIALIZED_NAME_PHYS_BONE_COLLIDER_COUNT) + @javax.annotation.Nonnull private Integer physBoneColliderCount; public static final String SERIALIZED_NAME_PHYS_BONE_COLLISION_CHECK_COUNT = "physBoneCollisionCheckCount"; @SerializedName(SERIALIZED_NAME_PHYS_BONE_COLLISION_CHECK_COUNT) + @javax.annotation.Nonnull private Integer physBoneCollisionCheckCount; public static final String SERIALIZED_NAME_PHYS_BONE_COMPONENT_COUNT = "physBoneComponentCount"; @SerializedName(SERIALIZED_NAME_PHYS_BONE_COMPONENT_COUNT) + @javax.annotation.Nonnull private Integer physBoneComponentCount; public static final String SERIALIZED_NAME_PHYS_BONE_TRANSFORM_COUNT = "physBoneTransformCount"; @SerializedName(SERIALIZED_NAME_PHYS_BONE_TRANSFORM_COUNT) + @javax.annotation.Nonnull private Integer physBoneTransformCount; public static final String SERIALIZED_NAME_PHYSICS_COLLIDERS = "physicsColliders"; @SerializedName(SERIALIZED_NAME_PHYSICS_COLLIDERS) + @javax.annotation.Nonnull private Integer physicsColliders; public static final String SERIALIZED_NAME_PHYSICS_RIGIDBODIES = "physicsRigidbodies"; @SerializedName(SERIALIZED_NAME_PHYSICS_RIGIDBODIES) + @javax.annotation.Nonnull private Integer physicsRigidbodies; public static final String SERIALIZED_NAME_SKINNED_MESH_COUNT = "skinnedMeshCount"; @SerializedName(SERIALIZED_NAME_SKINNED_MESH_COUNT) + @javax.annotation.Nonnull private Integer skinnedMeshCount; public static final String SERIALIZED_NAME_SKINNED_MESH_INDICES = "skinnedMeshIndices"; @SerializedName(SERIALIZED_NAME_SKINNED_MESH_INDICES) + @javax.annotation.Nonnull private Integer skinnedMeshIndices; public static final String SERIALIZED_NAME_SKINNED_MESH_POLYGONS = "skinnedMeshPolygons"; @SerializedName(SERIALIZED_NAME_SKINNED_MESH_POLYGONS) + @javax.annotation.Nonnull private Integer skinnedMeshPolygons; public static final String SERIALIZED_NAME_SKINNED_MESH_VERTICES = "skinnedMeshVertices"; @SerializedName(SERIALIZED_NAME_SKINNED_MESH_VERTICES) + @javax.annotation.Nonnull private Integer skinnedMeshVertices; public static final String SERIALIZED_NAME_TOTAL_CLOTH_VERTICES = "totalClothVertices"; @SerializedName(SERIALIZED_NAME_TOTAL_CLOTH_VERTICES) + @javax.annotation.Nonnull private Integer totalClothVertices; public static final String SERIALIZED_NAME_TOTAL_INDICES = "totalIndices"; @SerializedName(SERIALIZED_NAME_TOTAL_INDICES) + @javax.annotation.Nonnull private Integer totalIndices; public static final String SERIALIZED_NAME_TOTAL_MAX_PARTICLES = "totalMaxParticles"; @SerializedName(SERIALIZED_NAME_TOTAL_MAX_PARTICLES) + @javax.annotation.Nonnull private Integer totalMaxParticles; public static final String SERIALIZED_NAME_TOTAL_POLYGONS = "totalPolygons"; @SerializedName(SERIALIZED_NAME_TOTAL_POLYGONS) + @javax.annotation.Nonnull private Integer totalPolygons; public static final String SERIALIZED_NAME_TOTAL_TEXTURE_USAGE = "totalTextureUsage"; @SerializedName(SERIALIZED_NAME_TOTAL_TEXTURE_USAGE) + @javax.annotation.Nonnull private Integer totalTextureUsage; public static final String SERIALIZED_NAME_TOTAL_VERTICES = "totalVertices"; @SerializedName(SERIALIZED_NAME_TOTAL_VERTICES) + @javax.annotation.Nonnull private Integer totalVertices; public static final String SERIALIZED_NAME_TRAIL_RENDERER_COUNT = "trailRendererCount"; @SerializedName(SERIALIZED_NAME_TRAIL_RENDERER_COUNT) + @javax.annotation.Nonnull private Integer trailRendererCount; public static final String SERIALIZED_NAME_WRITE_DEFAULTS_USED = "writeDefaultsUsed"; @SerializedName(SERIALIZED_NAME_WRITE_DEFAULTS_USED) + @javax.annotation.Nonnull private Boolean writeDefaultsUsed; public FileAnalysisAvatarStats() { } - public FileAnalysisAvatarStats animatorCount(Integer animatorCount) { - + public FileAnalysisAvatarStats animatorCount(@javax.annotation.Nonnull Integer animatorCount) { this.animatorCount = animatorCount; return this; } - /** + /** * Get animatorCount * @return animatorCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getAnimatorCount() { return animatorCount; } - - public void setAnimatorCount(Integer animatorCount) { + public void setAnimatorCount(@javax.annotation.Nonnull Integer animatorCount) { this.animatorCount = animatorCount; } - public FileAnalysisAvatarStats audioSourceCount(Integer audioSourceCount) { - + public FileAnalysisAvatarStats audioSourceCount(@javax.annotation.Nonnull Integer audioSourceCount) { this.audioSourceCount = audioSourceCount; return this; } - /** + /** * Get audioSourceCount * @return audioSourceCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getAudioSourceCount() { return audioSourceCount; } - - public void setAudioSourceCount(Integer audioSourceCount) { + public void setAudioSourceCount(@javax.annotation.Nonnull Integer audioSourceCount) { this.audioSourceCount = audioSourceCount; } - public FileAnalysisAvatarStats blendShapeCount(Integer blendShapeCount) { - + public FileAnalysisAvatarStats blendShapeCount(@javax.annotation.Nonnull Integer blendShapeCount) { this.blendShapeCount = blendShapeCount; return this; } - /** + /** * Get blendShapeCount * @return blendShapeCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getBlendShapeCount() { return blendShapeCount; } - - public void setBlendShapeCount(Integer blendShapeCount) { + public void setBlendShapeCount(@javax.annotation.Nonnull Integer blendShapeCount) { this.blendShapeCount = blendShapeCount; } - public FileAnalysisAvatarStats boneCount(Integer boneCount) { - + public FileAnalysisAvatarStats boneCount(@javax.annotation.Nonnull Integer boneCount) { this.boneCount = boneCount; return this; } - /** + /** * Get boneCount * @return boneCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getBoneCount() { return boneCount; } - - public void setBoneCount(Integer boneCount) { + public void setBoneCount(@javax.annotation.Nonnull Integer boneCount) { this.boneCount = boneCount; } - public FileAnalysisAvatarStats bounds(List bounds) { - + public FileAnalysisAvatarStats bounds(@javax.annotation.Nonnull List bounds) { this.bounds = bounds; return this; } public FileAnalysisAvatarStats addBoundsItem(BigDecimal boundsItem) { + if (this.bounds == null) { + this.bounds = new ArrayList<>(); + } this.bounds.add(boundsItem); return this; } - /** + /** * Get bounds * @return bounds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getBounds() { return bounds; } - - public void setBounds(List bounds) { + public void setBounds(@javax.annotation.Nonnull List bounds) { this.bounds = bounds; } - public FileAnalysisAvatarStats cameraCount(Integer cameraCount) { - + public FileAnalysisAvatarStats cameraCount(@javax.annotation.Nullable Integer cameraCount) { this.cameraCount = cameraCount; return this; } - /** + /** * Get cameraCount * @return cameraCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getCameraCount() { return cameraCount; } - - public void setCameraCount(Integer cameraCount) { + public void setCameraCount(@javax.annotation.Nullable Integer cameraCount) { this.cameraCount = cameraCount; } - public FileAnalysisAvatarStats clothCount(Integer clothCount) { - + public FileAnalysisAvatarStats clothCount(@javax.annotation.Nonnull Integer clothCount) { this.clothCount = clothCount; return this; } - /** + /** * Get clothCount * @return clothCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getClothCount() { return clothCount; } - - public void setClothCount(Integer clothCount) { + public void setClothCount(@javax.annotation.Nonnull Integer clothCount) { this.clothCount = clothCount; } - public FileAnalysisAvatarStats constraintCount(Integer constraintCount) { - + public FileAnalysisAvatarStats constraintCount(@javax.annotation.Nonnull Integer constraintCount) { this.constraintCount = constraintCount; return this; } - /** + /** * Get constraintCount * @return constraintCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getConstraintCount() { return constraintCount; } - - public void setConstraintCount(Integer constraintCount) { + public void setConstraintCount(@javax.annotation.Nonnull Integer constraintCount) { this.constraintCount = constraintCount; } - public FileAnalysisAvatarStats constraintDepth(Integer constraintDepth) { - + public FileAnalysisAvatarStats constraintDepth(@javax.annotation.Nonnull Integer constraintDepth) { this.constraintDepth = constraintDepth; return this; } - /** + /** * Get constraintDepth * @return constraintDepth - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getConstraintDepth() { return constraintDepth; } - - public void setConstraintDepth(Integer constraintDepth) { + public void setConstraintDepth(@javax.annotation.Nonnull Integer constraintDepth) { this.constraintDepth = constraintDepth; } - public FileAnalysisAvatarStats contactCount(Integer contactCount) { - + public FileAnalysisAvatarStats contactCount(@javax.annotation.Nonnull Integer contactCount) { this.contactCount = contactCount; return this; } - /** + /** * Get contactCount * @return contactCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getContactCount() { return contactCount; } - - public void setContactCount(Integer contactCount) { + public void setContactCount(@javax.annotation.Nonnull Integer contactCount) { this.contactCount = contactCount; } - public FileAnalysisAvatarStats customExpressions(Boolean customExpressions) { - + public FileAnalysisAvatarStats customExpressions(@javax.annotation.Nonnull Boolean customExpressions) { this.customExpressions = customExpressions; return this; } - /** + /** * Get customExpressions * @return customExpressions - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getCustomExpressions() { return customExpressions; } - - public void setCustomExpressions(Boolean customExpressions) { + public void setCustomExpressions(@javax.annotation.Nonnull Boolean customExpressions) { this.customExpressions = customExpressions; } - public FileAnalysisAvatarStats customizeAnimationLayers(Boolean customizeAnimationLayers) { - + public FileAnalysisAvatarStats customizeAnimationLayers(@javax.annotation.Nonnull Boolean customizeAnimationLayers) { this.customizeAnimationLayers = customizeAnimationLayers; return this; } - /** + /** * Get customizeAnimationLayers * @return customizeAnimationLayers - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getCustomizeAnimationLayers() { return customizeAnimationLayers; } - - public void setCustomizeAnimationLayers(Boolean customizeAnimationLayers) { + public void setCustomizeAnimationLayers(@javax.annotation.Nonnull Boolean customizeAnimationLayers) { this.customizeAnimationLayers = customizeAnimationLayers; } - public FileAnalysisAvatarStats enableEyeLook(Boolean enableEyeLook) { - + public FileAnalysisAvatarStats enableEyeLook(@javax.annotation.Nonnull Boolean enableEyeLook) { this.enableEyeLook = enableEyeLook; return this; } - /** + /** * Get enableEyeLook * @return enableEyeLook - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getEnableEyeLook() { return enableEyeLook; } - - public void setEnableEyeLook(Boolean enableEyeLook) { + public void setEnableEyeLook(@javax.annotation.Nonnull Boolean enableEyeLook) { this.enableEyeLook = enableEyeLook; } - public FileAnalysisAvatarStats lightCount(Integer lightCount) { - + public FileAnalysisAvatarStats lightCount(@javax.annotation.Nonnull Integer lightCount) { this.lightCount = lightCount; return this; } - /** + /** * Get lightCount * @return lightCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getLightCount() { return lightCount; } - - public void setLightCount(Integer lightCount) { + public void setLightCount(@javax.annotation.Nonnull Integer lightCount) { this.lightCount = lightCount; } - public FileAnalysisAvatarStats lineRendererCount(Integer lineRendererCount) { - + public FileAnalysisAvatarStats lineRendererCount(@javax.annotation.Nonnull Integer lineRendererCount) { this.lineRendererCount = lineRendererCount; return this; } - /** + /** * Get lineRendererCount * @return lineRendererCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getLineRendererCount() { return lineRendererCount; } - - public void setLineRendererCount(Integer lineRendererCount) { + public void setLineRendererCount(@javax.annotation.Nonnull Integer lineRendererCount) { this.lineRendererCount = lineRendererCount; } - public FileAnalysisAvatarStats lipSync(Integer lipSync) { - + public FileAnalysisAvatarStats lipSync(@javax.annotation.Nonnull Integer lipSync) { this.lipSync = lipSync; return this; } - /** + /** * Get lipSync * @return lipSync - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getLipSync() { return lipSync; } - - public void setLipSync(Integer lipSync) { + public void setLipSync(@javax.annotation.Nonnull Integer lipSync) { this.lipSync = lipSync; } - public FileAnalysisAvatarStats materialCount(Integer materialCount) { - + public FileAnalysisAvatarStats materialCount(@javax.annotation.Nonnull Integer materialCount) { this.materialCount = materialCount; return this; } - /** + /** * Get materialCount * @return materialCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getMaterialCount() { return materialCount; } - - public void setMaterialCount(Integer materialCount) { + public void setMaterialCount(@javax.annotation.Nonnull Integer materialCount) { this.materialCount = materialCount; } - public FileAnalysisAvatarStats materialSlotsUsed(Integer materialSlotsUsed) { - + public FileAnalysisAvatarStats materialSlotsUsed(@javax.annotation.Nonnull Integer materialSlotsUsed) { this.materialSlotsUsed = materialSlotsUsed; return this; } - /** + /** * Get materialSlotsUsed * @return materialSlotsUsed - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getMaterialSlotsUsed() { return materialSlotsUsed; } - - public void setMaterialSlotsUsed(Integer materialSlotsUsed) { + public void setMaterialSlotsUsed(@javax.annotation.Nonnull Integer materialSlotsUsed) { this.materialSlotsUsed = materialSlotsUsed; } - public FileAnalysisAvatarStats meshCount(Integer meshCount) { - + public FileAnalysisAvatarStats meshCount(@javax.annotation.Nonnull Integer meshCount) { this.meshCount = meshCount; return this; } - /** + /** * Get meshCount * @return meshCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getMeshCount() { return meshCount; } - - public void setMeshCount(Integer meshCount) { + public void setMeshCount(@javax.annotation.Nonnull Integer meshCount) { this.meshCount = meshCount; } - public FileAnalysisAvatarStats meshIndices(Integer meshIndices) { - + public FileAnalysisAvatarStats meshIndices(@javax.annotation.Nonnull Integer meshIndices) { this.meshIndices = meshIndices; return this; } - /** + /** * Get meshIndices * @return meshIndices - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getMeshIndices() { return meshIndices; } - - public void setMeshIndices(Integer meshIndices) { + public void setMeshIndices(@javax.annotation.Nonnull Integer meshIndices) { this.meshIndices = meshIndices; } - public FileAnalysisAvatarStats meshParticleMaxPolygons(Integer meshParticleMaxPolygons) { - + public FileAnalysisAvatarStats meshParticleMaxPolygons(@javax.annotation.Nonnull Integer meshParticleMaxPolygons) { this.meshParticleMaxPolygons = meshParticleMaxPolygons; return this; } - /** + /** * Get meshParticleMaxPolygons * @return meshParticleMaxPolygons - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getMeshParticleMaxPolygons() { return meshParticleMaxPolygons; } - - public void setMeshParticleMaxPolygons(Integer meshParticleMaxPolygons) { + public void setMeshParticleMaxPolygons(@javax.annotation.Nonnull Integer meshParticleMaxPolygons) { this.meshParticleMaxPolygons = meshParticleMaxPolygons; } - public FileAnalysisAvatarStats meshPolygons(Integer meshPolygons) { - + public FileAnalysisAvatarStats meshPolygons(@javax.annotation.Nonnull Integer meshPolygons) { this.meshPolygons = meshPolygons; return this; } - /** + /** * Get meshPolygons * @return meshPolygons - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getMeshPolygons() { return meshPolygons; } - - public void setMeshPolygons(Integer meshPolygons) { + public void setMeshPolygons(@javax.annotation.Nonnull Integer meshPolygons) { this.meshPolygons = meshPolygons; } - public FileAnalysisAvatarStats meshVertices(Integer meshVertices) { - + public FileAnalysisAvatarStats meshVertices(@javax.annotation.Nonnull Integer meshVertices) { this.meshVertices = meshVertices; return this; } - /** + /** * Get meshVertices * @return meshVertices - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getMeshVertices() { return meshVertices; } - - public void setMeshVertices(Integer meshVertices) { + public void setMeshVertices(@javax.annotation.Nonnull Integer meshVertices) { this.meshVertices = meshVertices; } - public FileAnalysisAvatarStats particleCollisionEnabled(Boolean particleCollisionEnabled) { - + public FileAnalysisAvatarStats particleCollisionEnabled(@javax.annotation.Nonnull Boolean particleCollisionEnabled) { this.particleCollisionEnabled = particleCollisionEnabled; return this; } - /** + /** * Get particleCollisionEnabled * @return particleCollisionEnabled - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getParticleCollisionEnabled() { return particleCollisionEnabled; } - - public void setParticleCollisionEnabled(Boolean particleCollisionEnabled) { + public void setParticleCollisionEnabled(@javax.annotation.Nonnull Boolean particleCollisionEnabled) { this.particleCollisionEnabled = particleCollisionEnabled; } - public FileAnalysisAvatarStats particleSystemCount(Integer particleSystemCount) { - + public FileAnalysisAvatarStats particleSystemCount(@javax.annotation.Nonnull Integer particleSystemCount) { this.particleSystemCount = particleSystemCount; return this; } - /** + /** * Get particleSystemCount * @return particleSystemCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getParticleSystemCount() { return particleSystemCount; } - - public void setParticleSystemCount(Integer particleSystemCount) { + public void setParticleSystemCount(@javax.annotation.Nonnull Integer particleSystemCount) { this.particleSystemCount = particleSystemCount; } - public FileAnalysisAvatarStats particleTrailsEnabled(Boolean particleTrailsEnabled) { - + public FileAnalysisAvatarStats particleTrailsEnabled(@javax.annotation.Nonnull Boolean particleTrailsEnabled) { this.particleTrailsEnabled = particleTrailsEnabled; return this; } - /** + /** * Get particleTrailsEnabled * @return particleTrailsEnabled - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getParticleTrailsEnabled() { return particleTrailsEnabled; } - - public void setParticleTrailsEnabled(Boolean particleTrailsEnabled) { + public void setParticleTrailsEnabled(@javax.annotation.Nonnull Boolean particleTrailsEnabled) { this.particleTrailsEnabled = particleTrailsEnabled; } - public FileAnalysisAvatarStats physBoneColliderCount(Integer physBoneColliderCount) { - + public FileAnalysisAvatarStats physBoneColliderCount(@javax.annotation.Nonnull Integer physBoneColliderCount) { this.physBoneColliderCount = physBoneColliderCount; return this; } - /** + /** * Get physBoneColliderCount * @return physBoneColliderCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPhysBoneColliderCount() { return physBoneColliderCount; } - - public void setPhysBoneColliderCount(Integer physBoneColliderCount) { + public void setPhysBoneColliderCount(@javax.annotation.Nonnull Integer physBoneColliderCount) { this.physBoneColliderCount = physBoneColliderCount; } - public FileAnalysisAvatarStats physBoneCollisionCheckCount(Integer physBoneCollisionCheckCount) { - + public FileAnalysisAvatarStats physBoneCollisionCheckCount(@javax.annotation.Nonnull Integer physBoneCollisionCheckCount) { this.physBoneCollisionCheckCount = physBoneCollisionCheckCount; return this; } - /** + /** * Get physBoneCollisionCheckCount * @return physBoneCollisionCheckCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPhysBoneCollisionCheckCount() { return physBoneCollisionCheckCount; } - - public void setPhysBoneCollisionCheckCount(Integer physBoneCollisionCheckCount) { + public void setPhysBoneCollisionCheckCount(@javax.annotation.Nonnull Integer physBoneCollisionCheckCount) { this.physBoneCollisionCheckCount = physBoneCollisionCheckCount; } - public FileAnalysisAvatarStats physBoneComponentCount(Integer physBoneComponentCount) { - + public FileAnalysisAvatarStats physBoneComponentCount(@javax.annotation.Nonnull Integer physBoneComponentCount) { this.physBoneComponentCount = physBoneComponentCount; return this; } - /** + /** * Get physBoneComponentCount * @return physBoneComponentCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPhysBoneComponentCount() { return physBoneComponentCount; } - - public void setPhysBoneComponentCount(Integer physBoneComponentCount) { + public void setPhysBoneComponentCount(@javax.annotation.Nonnull Integer physBoneComponentCount) { this.physBoneComponentCount = physBoneComponentCount; } - public FileAnalysisAvatarStats physBoneTransformCount(Integer physBoneTransformCount) { - + public FileAnalysisAvatarStats physBoneTransformCount(@javax.annotation.Nonnull Integer physBoneTransformCount) { this.physBoneTransformCount = physBoneTransformCount; return this; } - /** + /** * Get physBoneTransformCount * @return physBoneTransformCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPhysBoneTransformCount() { return physBoneTransformCount; } - - public void setPhysBoneTransformCount(Integer physBoneTransformCount) { + public void setPhysBoneTransformCount(@javax.annotation.Nonnull Integer physBoneTransformCount) { this.physBoneTransformCount = physBoneTransformCount; } - public FileAnalysisAvatarStats physicsColliders(Integer physicsColliders) { - + public FileAnalysisAvatarStats physicsColliders(@javax.annotation.Nonnull Integer physicsColliders) { this.physicsColliders = physicsColliders; return this; } - /** + /** * Get physicsColliders * @return physicsColliders - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPhysicsColliders() { return physicsColliders; } - - public void setPhysicsColliders(Integer physicsColliders) { + public void setPhysicsColliders(@javax.annotation.Nonnull Integer physicsColliders) { this.physicsColliders = physicsColliders; } - public FileAnalysisAvatarStats physicsRigidbodies(Integer physicsRigidbodies) { - + public FileAnalysisAvatarStats physicsRigidbodies(@javax.annotation.Nonnull Integer physicsRigidbodies) { this.physicsRigidbodies = physicsRigidbodies; return this; } - /** + /** * Get physicsRigidbodies * @return physicsRigidbodies - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPhysicsRigidbodies() { return physicsRigidbodies; } - - public void setPhysicsRigidbodies(Integer physicsRigidbodies) { + public void setPhysicsRigidbodies(@javax.annotation.Nonnull Integer physicsRigidbodies) { this.physicsRigidbodies = physicsRigidbodies; } - public FileAnalysisAvatarStats skinnedMeshCount(Integer skinnedMeshCount) { - + public FileAnalysisAvatarStats skinnedMeshCount(@javax.annotation.Nonnull Integer skinnedMeshCount) { this.skinnedMeshCount = skinnedMeshCount; return this; } - /** + /** * Get skinnedMeshCount * @return skinnedMeshCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getSkinnedMeshCount() { return skinnedMeshCount; } - - public void setSkinnedMeshCount(Integer skinnedMeshCount) { + public void setSkinnedMeshCount(@javax.annotation.Nonnull Integer skinnedMeshCount) { this.skinnedMeshCount = skinnedMeshCount; } - public FileAnalysisAvatarStats skinnedMeshIndices(Integer skinnedMeshIndices) { - + public FileAnalysisAvatarStats skinnedMeshIndices(@javax.annotation.Nonnull Integer skinnedMeshIndices) { this.skinnedMeshIndices = skinnedMeshIndices; return this; } - /** + /** * Get skinnedMeshIndices * @return skinnedMeshIndices - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getSkinnedMeshIndices() { return skinnedMeshIndices; } - - public void setSkinnedMeshIndices(Integer skinnedMeshIndices) { + public void setSkinnedMeshIndices(@javax.annotation.Nonnull Integer skinnedMeshIndices) { this.skinnedMeshIndices = skinnedMeshIndices; } - public FileAnalysisAvatarStats skinnedMeshPolygons(Integer skinnedMeshPolygons) { - + public FileAnalysisAvatarStats skinnedMeshPolygons(@javax.annotation.Nonnull Integer skinnedMeshPolygons) { this.skinnedMeshPolygons = skinnedMeshPolygons; return this; } - /** + /** * Get skinnedMeshPolygons * @return skinnedMeshPolygons - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getSkinnedMeshPolygons() { return skinnedMeshPolygons; } - - public void setSkinnedMeshPolygons(Integer skinnedMeshPolygons) { + public void setSkinnedMeshPolygons(@javax.annotation.Nonnull Integer skinnedMeshPolygons) { this.skinnedMeshPolygons = skinnedMeshPolygons; } - public FileAnalysisAvatarStats skinnedMeshVertices(Integer skinnedMeshVertices) { - + public FileAnalysisAvatarStats skinnedMeshVertices(@javax.annotation.Nonnull Integer skinnedMeshVertices) { this.skinnedMeshVertices = skinnedMeshVertices; return this; } - /** + /** * Get skinnedMeshVertices * @return skinnedMeshVertices - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getSkinnedMeshVertices() { return skinnedMeshVertices; } - - public void setSkinnedMeshVertices(Integer skinnedMeshVertices) { + public void setSkinnedMeshVertices(@javax.annotation.Nonnull Integer skinnedMeshVertices) { this.skinnedMeshVertices = skinnedMeshVertices; } - public FileAnalysisAvatarStats totalClothVertices(Integer totalClothVertices) { - + public FileAnalysisAvatarStats totalClothVertices(@javax.annotation.Nonnull Integer totalClothVertices) { this.totalClothVertices = totalClothVertices; return this; } - /** + /** * Get totalClothVertices * @return totalClothVertices - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTotalClothVertices() { return totalClothVertices; } - - public void setTotalClothVertices(Integer totalClothVertices) { + public void setTotalClothVertices(@javax.annotation.Nonnull Integer totalClothVertices) { this.totalClothVertices = totalClothVertices; } - public FileAnalysisAvatarStats totalIndices(Integer totalIndices) { - + public FileAnalysisAvatarStats totalIndices(@javax.annotation.Nonnull Integer totalIndices) { this.totalIndices = totalIndices; return this; } - /** + /** * Get totalIndices * @return totalIndices - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTotalIndices() { return totalIndices; } - - public void setTotalIndices(Integer totalIndices) { + public void setTotalIndices(@javax.annotation.Nonnull Integer totalIndices) { this.totalIndices = totalIndices; } - public FileAnalysisAvatarStats totalMaxParticles(Integer totalMaxParticles) { - + public FileAnalysisAvatarStats totalMaxParticles(@javax.annotation.Nonnull Integer totalMaxParticles) { this.totalMaxParticles = totalMaxParticles; return this; } - /** + /** * Get totalMaxParticles * @return totalMaxParticles - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTotalMaxParticles() { return totalMaxParticles; } - - public void setTotalMaxParticles(Integer totalMaxParticles) { + public void setTotalMaxParticles(@javax.annotation.Nonnull Integer totalMaxParticles) { this.totalMaxParticles = totalMaxParticles; } - public FileAnalysisAvatarStats totalPolygons(Integer totalPolygons) { - + public FileAnalysisAvatarStats totalPolygons(@javax.annotation.Nonnull Integer totalPolygons) { this.totalPolygons = totalPolygons; return this; } - /** + /** * Get totalPolygons * @return totalPolygons - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTotalPolygons() { return totalPolygons; } - - public void setTotalPolygons(Integer totalPolygons) { + public void setTotalPolygons(@javax.annotation.Nonnull Integer totalPolygons) { this.totalPolygons = totalPolygons; } - public FileAnalysisAvatarStats totalTextureUsage(Integer totalTextureUsage) { - + public FileAnalysisAvatarStats totalTextureUsage(@javax.annotation.Nonnull Integer totalTextureUsage) { this.totalTextureUsage = totalTextureUsage; return this; } - /** + /** * Get totalTextureUsage * @return totalTextureUsage - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTotalTextureUsage() { return totalTextureUsage; } - - public void setTotalTextureUsage(Integer totalTextureUsage) { + public void setTotalTextureUsage(@javax.annotation.Nonnull Integer totalTextureUsage) { this.totalTextureUsage = totalTextureUsage; } - public FileAnalysisAvatarStats totalVertices(Integer totalVertices) { - + public FileAnalysisAvatarStats totalVertices(@javax.annotation.Nonnull Integer totalVertices) { this.totalVertices = totalVertices; return this; } - /** + /** * Get totalVertices * @return totalVertices - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTotalVertices() { return totalVertices; } - - public void setTotalVertices(Integer totalVertices) { + public void setTotalVertices(@javax.annotation.Nonnull Integer totalVertices) { this.totalVertices = totalVertices; } - public FileAnalysisAvatarStats trailRendererCount(Integer trailRendererCount) { - + public FileAnalysisAvatarStats trailRendererCount(@javax.annotation.Nonnull Integer trailRendererCount) { this.trailRendererCount = trailRendererCount; return this; } - /** + /** * Get trailRendererCount * @return trailRendererCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTrailRendererCount() { return trailRendererCount; } - - public void setTrailRendererCount(Integer trailRendererCount) { + public void setTrailRendererCount(@javax.annotation.Nonnull Integer trailRendererCount) { this.trailRendererCount = trailRendererCount; } - public FileAnalysisAvatarStats writeDefaultsUsed(Boolean writeDefaultsUsed) { - + public FileAnalysisAvatarStats writeDefaultsUsed(@javax.annotation.Nonnull Boolean writeDefaultsUsed) { this.writeDefaultsUsed = writeDefaultsUsed; return this; } - /** + /** * Get writeDefaultsUsed * @return writeDefaultsUsed - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getWriteDefaultsUsed() { return writeDefaultsUsed; } - - public void setWriteDefaultsUsed(Boolean writeDefaultsUsed) { + public void setWriteDefaultsUsed(@javax.annotation.Nonnull Boolean writeDefaultsUsed) { this.writeDefaultsUsed = writeDefaultsUsed; } @@ -1366,10 +1237,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -1378,131 +1246,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("animatorCount"); - openapiFields.add("audioSourceCount"); - openapiFields.add("blendShapeCount"); - openapiFields.add("boneCount"); - openapiFields.add("bounds"); - openapiFields.add("cameraCount"); - openapiFields.add("clothCount"); - openapiFields.add("constraintCount"); - openapiFields.add("constraintDepth"); - openapiFields.add("contactCount"); - openapiFields.add("customExpressions"); - openapiFields.add("customizeAnimationLayers"); - openapiFields.add("enableEyeLook"); - openapiFields.add("lightCount"); - openapiFields.add("lineRendererCount"); - openapiFields.add("lipSync"); - openapiFields.add("materialCount"); - openapiFields.add("materialSlotsUsed"); - openapiFields.add("meshCount"); - openapiFields.add("meshIndices"); - openapiFields.add("meshParticleMaxPolygons"); - openapiFields.add("meshPolygons"); - openapiFields.add("meshVertices"); - openapiFields.add("particleCollisionEnabled"); - openapiFields.add("particleSystemCount"); - openapiFields.add("particleTrailsEnabled"); - openapiFields.add("physBoneColliderCount"); - openapiFields.add("physBoneCollisionCheckCount"); - openapiFields.add("physBoneComponentCount"); - openapiFields.add("physBoneTransformCount"); - openapiFields.add("physicsColliders"); - openapiFields.add("physicsRigidbodies"); - openapiFields.add("skinnedMeshCount"); - openapiFields.add("skinnedMeshIndices"); - openapiFields.add("skinnedMeshPolygons"); - openapiFields.add("skinnedMeshVertices"); - openapiFields.add("totalClothVertices"); - openapiFields.add("totalIndices"); - openapiFields.add("totalMaxParticles"); - openapiFields.add("totalPolygons"); - openapiFields.add("totalTextureUsage"); - openapiFields.add("totalVertices"); - openapiFields.add("trailRendererCount"); - openapiFields.add("writeDefaultsUsed"); + openapiFields = new HashSet(Arrays.asList("animatorCount", "audioSourceCount", "blendShapeCount", "boneCount", "bounds", "cameraCount", "clothCount", "constraintCount", "constraintDepth", "contactCount", "customExpressions", "customizeAnimationLayers", "enableEyeLook", "lightCount", "lineRendererCount", "lipSync", "materialCount", "materialSlotsUsed", "meshCount", "meshIndices", "meshParticleMaxPolygons", "meshPolygons", "meshVertices", "particleCollisionEnabled", "particleSystemCount", "particleTrailsEnabled", "physBoneColliderCount", "physBoneCollisionCheckCount", "physBoneComponentCount", "physBoneTransformCount", "physicsColliders", "physicsRigidbodies", "skinnedMeshCount", "skinnedMeshIndices", "skinnedMeshPolygons", "skinnedMeshVertices", "totalClothVertices", "totalIndices", "totalMaxParticles", "totalPolygons", "totalTextureUsage", "totalVertices", "trailRendererCount", "writeDefaultsUsed")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("animatorCount"); - openapiRequiredFields.add("audioSourceCount"); - openapiRequiredFields.add("blendShapeCount"); - openapiRequiredFields.add("boneCount"); - openapiRequiredFields.add("bounds"); - openapiRequiredFields.add("clothCount"); - openapiRequiredFields.add("constraintCount"); - openapiRequiredFields.add("constraintDepth"); - openapiRequiredFields.add("contactCount"); - openapiRequiredFields.add("customExpressions"); - openapiRequiredFields.add("customizeAnimationLayers"); - openapiRequiredFields.add("enableEyeLook"); - openapiRequiredFields.add("lightCount"); - openapiRequiredFields.add("lineRendererCount"); - openapiRequiredFields.add("lipSync"); - openapiRequiredFields.add("materialCount"); - openapiRequiredFields.add("materialSlotsUsed"); - openapiRequiredFields.add("meshCount"); - openapiRequiredFields.add("meshIndices"); - openapiRequiredFields.add("meshParticleMaxPolygons"); - openapiRequiredFields.add("meshPolygons"); - openapiRequiredFields.add("meshVertices"); - openapiRequiredFields.add("particleCollisionEnabled"); - openapiRequiredFields.add("particleSystemCount"); - openapiRequiredFields.add("particleTrailsEnabled"); - openapiRequiredFields.add("physBoneColliderCount"); - openapiRequiredFields.add("physBoneCollisionCheckCount"); - openapiRequiredFields.add("physBoneComponentCount"); - openapiRequiredFields.add("physBoneTransformCount"); - openapiRequiredFields.add("physicsColliders"); - openapiRequiredFields.add("physicsRigidbodies"); - openapiRequiredFields.add("skinnedMeshCount"); - openapiRequiredFields.add("skinnedMeshIndices"); - openapiRequiredFields.add("skinnedMeshPolygons"); - openapiRequiredFields.add("skinnedMeshVertices"); - openapiRequiredFields.add("totalClothVertices"); - openapiRequiredFields.add("totalIndices"); - openapiRequiredFields.add("totalMaxParticles"); - openapiRequiredFields.add("totalPolygons"); - openapiRequiredFields.add("totalTextureUsage"); - openapiRequiredFields.add("totalVertices"); - openapiRequiredFields.add("trailRendererCount"); - openapiRequiredFields.add("writeDefaultsUsed"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FileAnalysisAvatarStats - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FileAnalysisAvatarStats.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FileAnalysisAvatarStats is not found in the empty JSON string", FileAnalysisAvatarStats.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("animatorCount", "audioSourceCount", "blendShapeCount", "boneCount", "bounds", "clothCount", "constraintCount", "constraintDepth", "contactCount", "customExpressions", "customizeAnimationLayers", "enableEyeLook", "lightCount", "lineRendererCount", "lipSync", "materialCount", "materialSlotsUsed", "meshCount", "meshIndices", "meshParticleMaxPolygons", "meshPolygons", "meshVertices", "particleCollisionEnabled", "particleSystemCount", "particleTrailsEnabled", "physBoneColliderCount", "physBoneCollisionCheckCount", "physBoneComponentCount", "physBoneTransformCount", "physicsColliders", "physicsRigidbodies", "skinnedMeshCount", "skinnedMeshIndices", "skinnedMeshPolygons", "skinnedMeshVertices", "totalClothVertices", "totalIndices", "totalMaxParticles", "totalPolygons", "totalTextureUsage", "totalVertices", "trailRendererCount", "writeDefaultsUsed")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FileAnalysisAvatarStats + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FileAnalysisAvatarStats.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FileAnalysisAvatarStats is not found in the empty JSON string", FileAnalysisAvatarStats.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FileAnalysisAvatarStats.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileAnalysisAvatarStats` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FileAnalysisAvatarStats` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FileAnalysisAvatarStats.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("bounds") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("bounds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `bounds` to be an array in the JSON string but got `%s`", jsonObj.get("bounds").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bounds` to be an array in the JSON string but got `%s`", jsonObj.get("bounds").toString())); } } @@ -1526,31 +1308,31 @@ public void write(JsonWriter out, FileAnalysisAvatarStats value) throws IOExcept @Override public FileAnalysisAvatarStats read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FileAnalysisAvatarStats given an JSON string - * - * @param jsonString JSON string - * @return An instance of FileAnalysisAvatarStats - * @throws IOException if the JSON string is invalid with respect to FileAnalysisAvatarStats - */ + /** + * Create an instance of FileAnalysisAvatarStats given an JSON string + * + * @param jsonString JSON string + * @return An instance of FileAnalysisAvatarStats + * @throws IOException if the JSON string is invalid with respect to FileAnalysisAvatarStats + */ public static FileAnalysisAvatarStats fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FileAnalysisAvatarStats.class); } - /** - * Convert an instance of FileAnalysisAvatarStats to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FileAnalysisAvatarStats to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FileData.java b/src/main/java/io/github/vrchatapi/model/FileData.java index ed31e599..25c14e07 100644 --- a/src/main/java/io/github/vrchatapi/model/FileData.java +++ b/src/main/java/io/github/vrchatapi/model/FileData.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.FileStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,8 +48,7 @@ /** * */ -@ApiModel(description = "") -@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 FileData { /** * Gets or Sets category @@ -98,197 +97,181 @@ public CategoryEnum read(final JsonReader jsonReader) throws IOException { return CategoryEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CategoryEnum.fromValue(value); + } } public static final String SERIALIZED_NAME_CATEGORY = "category"; @SerializedName(SERIALIZED_NAME_CATEGORY) + @javax.annotation.Nonnull private CategoryEnum category = CategoryEnum.QUEUED; public static final String SERIALIZED_NAME_FILE_NAME = "fileName"; @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nonnull private String fileName; public static final String SERIALIZED_NAME_MD5 = "md5"; @SerializedName(SERIALIZED_NAME_MD5) + @javax.annotation.Nullable private String md5; public static final String SERIALIZED_NAME_SIZE_IN_BYTES = "sizeInBytes"; @SerializedName(SERIALIZED_NAME_SIZE_IN_BYTES) + @javax.annotation.Nonnull private Integer sizeInBytes; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private FileStatus status = FileStatus.WAITING; public static final String SERIALIZED_NAME_UPLOAD_ID = "uploadId"; @SerializedName(SERIALIZED_NAME_UPLOAD_ID) + @javax.annotation.Nonnull private String uploadId = ""; public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull private String url; public FileData() { } - public FileData category(CategoryEnum category) { - + public FileData category(@javax.annotation.Nonnull CategoryEnum category) { this.category = category; return this; } - /** + /** * Get category * @return category - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public CategoryEnum getCategory() { return category; } - - public void setCategory(CategoryEnum category) { + public void setCategory(@javax.annotation.Nonnull CategoryEnum category) { this.category = category; } - public FileData fileName(String fileName) { - + public FileData fileName(@javax.annotation.Nonnull String fileName) { this.fileName = fileName; return this; } - /** + /** * Get fileName * @return fileName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getFileName() { return fileName; } - - public void setFileName(String fileName) { + public void setFileName(@javax.annotation.Nonnull String fileName) { this.fileName = fileName; } - public FileData md5(String md5) { - + public FileData md5(@javax.annotation.Nullable String md5) { this.md5 = md5; return this; } - /** + /** * Get md5 * @return md5 - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getMd5() { return md5; } - - public void setMd5(String md5) { + public void setMd5(@javax.annotation.Nullable String md5) { this.md5 = md5; } - public FileData sizeInBytes(Integer sizeInBytes) { - + public FileData sizeInBytes(@javax.annotation.Nonnull Integer sizeInBytes) { this.sizeInBytes = sizeInBytes; return this; } - /** + /** * Get sizeInBytes * minimum: 0 * @return sizeInBytes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getSizeInBytes() { return sizeInBytes; } - - public void setSizeInBytes(Integer sizeInBytes) { + public void setSizeInBytes(@javax.annotation.Nonnull Integer sizeInBytes) { this.sizeInBytes = sizeInBytes; } - public FileData status(FileStatus status) { - + public FileData status(@javax.annotation.Nonnull FileStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FileStatus getStatus() { return status; } - - public void setStatus(FileStatus status) { + public void setStatus(@javax.annotation.Nonnull FileStatus status) { this.status = status; } - public FileData uploadId(String uploadId) { - + public FileData uploadId(@javax.annotation.Nonnull String uploadId) { this.uploadId = uploadId; return this; } - /** + /** * Get uploadId * @return uploadId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getUploadId() { return uploadId; } - - public void setUploadId(String uploadId) { + public void setUploadId(@javax.annotation.Nonnull String uploadId) { this.uploadId = uploadId; } - public FileData url(String url) { - + public FileData url(@javax.annotation.Nonnull String url) { this.url = url; return this; } - /** + /** * Get url * @return url - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getUrl() { return url; } - - public void setUrl(String url) { + public void setUrl(@javax.annotation.Nonnull String url) { this.url = url; } @@ -337,10 +320,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -349,66 +329,58 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("category"); - openapiFields.add("fileName"); - openapiFields.add("md5"); - openapiFields.add("sizeInBytes"); - openapiFields.add("status"); - openapiFields.add("uploadId"); - openapiFields.add("url"); + openapiFields = new HashSet(Arrays.asList("category", "fileName", "md5", "sizeInBytes", "status", "uploadId", "url")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("category"); - openapiRequiredFields.add("fileName"); - openapiRequiredFields.add("sizeInBytes"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("uploadId"); - openapiRequiredFields.add("url"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FileData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FileData.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FileData is not found in the empty JSON string", FileData.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("category", "fileName", "sizeInBytes", "status", "uploadId", "url")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FileData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FileData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FileData is not found in the empty JSON string", FileData.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FileData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileData` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FileData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FileData.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("category").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); } + // validate the required field `category` + CategoryEnum.validateJsonElement(jsonObj.get("category")); if (!jsonObj.get("fileName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileName").toString())); } if ((jsonObj.get("md5") != null && !jsonObj.get("md5").isJsonNull()) && !jsonObj.get("md5").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `md5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `md5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5").toString())); } + // validate the required field `status` + FileStatus.validateJsonElement(jsonObj.get("status")); if (!jsonObj.get("uploadId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `uploadId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uploadId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `uploadId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uploadId").toString())); } if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -432,31 +404,31 @@ public void write(JsonWriter out, FileData value) throws IOException { @Override public FileData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FileData given an JSON string - * - * @param jsonString JSON string - * @return An instance of FileData - * @throws IOException if the JSON string is invalid with respect to FileData - */ + /** + * Create an instance of FileData given an JSON string + * + * @param jsonString JSON string + * @return An instance of FileData + * @throws IOException if the JSON string is invalid with respect to FileData + */ public static FileData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FileData.class); } - /** - * Convert an instance of FileData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FileData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FileStatus.java b/src/main/java/io/github/vrchatapi/model/FileStatus.java index 4e9b1ae0..2f5a4ae6 100644 --- a/src/main/java/io/github/vrchatapi/model/FileStatus.java +++ b/src/main/java/io/github/vrchatapi/model/FileStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -72,5 +72,10 @@ public FileStatus read(final JsonReader jsonReader) throws IOException { return FileStatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FileStatus.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/FileUploadURL.java b/src/main/java/io/github/vrchatapi/model/FileUploadURL.java index 02ee5ed2..0966bc90 100644 --- a/src/main/java/io/github/vrchatapi/model/FileUploadURL.java +++ b/src/main/java/io/github/vrchatapi/model/FileUploadURL.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,35 +47,31 @@ /** * */ -@ApiModel(description = "") -@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 FileUploadURL { public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) + @javax.annotation.Nonnull private String url; public FileUploadURL() { } - public FileUploadURL url(String url) { - + public FileUploadURL url(@javax.annotation.Nonnull String url) { this.url = url; return this; } - /** + /** * * @return url - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getUrl() { return url; } - - public void setUrl(String url) { + public void setUrl(@javax.annotation.Nonnull String url) { this.url = url; } @@ -112,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,43 +117,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("url"); + openapiFields = new HashSet(Arrays.asList("url")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("url"); + openapiRequiredFields = new HashSet(Arrays.asList("url")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FileUploadURL - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FileUploadURL.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FileUploadURL is not found in the empty JSON string", FileUploadURL.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FileUploadURL + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FileUploadURL.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FileUploadURL is not found in the empty JSON string", FileUploadURL.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FileUploadURL.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileUploadURL` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FileUploadURL` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FileUploadURL.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -184,31 +176,31 @@ public void write(JsonWriter out, FileUploadURL value) throws IOException { @Override public FileUploadURL read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FileUploadURL given an JSON string - * - * @param jsonString JSON string - * @return An instance of FileUploadURL - * @throws IOException if the JSON string is invalid with respect to FileUploadURL - */ + /** + * Create an instance of FileUploadURL given an JSON string + * + * @param jsonString JSON string + * @return An instance of FileUploadURL + * @throws IOException if the JSON string is invalid with respect to FileUploadURL + */ public static FileUploadURL fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FileUploadURL.class); } - /** - * Convert an instance of FileUploadURL to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FileUploadURL to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FileVersion.java b/src/main/java/io/github/vrchatapi/model/FileVersion.java index 377c8b7c..3c6057a1 100644 --- a/src/main/java/io/github/vrchatapi/model/FileVersion.java +++ b/src/main/java/io/github/vrchatapi/model/FileVersion.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,10 +20,9 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.FileData; import io.github.vrchatapi.model.FileStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,198 +50,176 @@ /** * */ -@ApiModel(description = "") -@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 FileVersion { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DELETED = "deleted"; @SerializedName(SERIALIZED_NAME_DELETED) + @javax.annotation.Nullable private Boolean deleted = true; public static final String SERIALIZED_NAME_DELTA = "delta"; @SerializedName(SERIALIZED_NAME_DELTA) + @javax.annotation.Nullable private FileData delta; public static final String SERIALIZED_NAME_FILE = "file"; @SerializedName(SERIALIZED_NAME_FILE) + @javax.annotation.Nullable private FileData _file; public static final String SERIALIZED_NAME_SIGNATURE = "signature"; @SerializedName(SERIALIZED_NAME_SIGNATURE) + @javax.annotation.Nullable private FileData signature; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private FileStatus status = FileStatus.WAITING; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nonnull private Integer version = 0; public FileVersion() { } - public FileVersion createdAt(OffsetDateTime createdAt) { - + public FileVersion createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public FileVersion deleted(Boolean deleted) { - + public FileVersion deleted(@javax.annotation.Nullable Boolean deleted) { this.deleted = deleted; return this; } - /** + /** * Usually only present if `true` * @return deleted - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Usually only present if `true`") - public Boolean getDeleted() { return deleted; } - - public void setDeleted(Boolean deleted) { + public void setDeleted(@javax.annotation.Nullable Boolean deleted) { this.deleted = deleted; } - public FileVersion delta(FileData delta) { - + public FileVersion delta(@javax.annotation.Nullable FileData delta) { this.delta = delta; return this; } - /** + /** * Get delta * @return delta - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public FileData getDelta() { return delta; } - - public void setDelta(FileData delta) { + public void setDelta(@javax.annotation.Nullable FileData delta) { this.delta = delta; } - public FileVersion _file(FileData _file) { - + public FileVersion _file(@javax.annotation.Nullable FileData _file) { this._file = _file; return this; } - /** + /** * Get _file * @return _file - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public FileData getFile() { return _file; } - - public void setFile(FileData _file) { + public void setFile(@javax.annotation.Nullable FileData _file) { this._file = _file; } - public FileVersion signature(FileData signature) { - + public FileVersion signature(@javax.annotation.Nullable FileData signature) { this.signature = signature; return this; } - /** + /** * Get signature * @return signature - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public FileData getSignature() { return signature; } - - public void setSignature(FileData signature) { + public void setSignature(@javax.annotation.Nullable FileData signature) { this.signature = signature; } - public FileVersion status(FileStatus status) { - + public FileVersion status(@javax.annotation.Nonnull FileStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public FileStatus getStatus() { return status; } - - public void setStatus(FileStatus status) { + public void setStatus(@javax.annotation.Nonnull FileStatus status) { this.status = status; } - public FileVersion version(Integer version) { - + public FileVersion version(@javax.annotation.Nonnull Integer version) { this.version = version; return this; } - /** + /** * Incremental version counter, can only be increased. * minimum: 0 * @return version - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Incremental version counter, can only be increased.") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nonnull Integer version) { this.version = version; } @@ -290,10 +268,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -302,61 +277,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("deleted"); - openapiFields.add("delta"); - openapiFields.add("file"); - openapiFields.add("signature"); - openapiFields.add("status"); - openapiFields.add("version"); + openapiFields = new HashSet(Arrays.asList("created_at", "deleted", "delta", "file", "signature", "status", "version")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("version"); + openapiRequiredFields = new HashSet(Arrays.asList("created_at", "status", "version")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FileVersion - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FileVersion.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FileVersion is not found in the empty JSON string", FileVersion.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FileVersion + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FileVersion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FileVersion is not found in the empty JSON string", FileVersion.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FileVersion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileVersion` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FileVersion` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FileVersion.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `delta` if (jsonObj.get("delta") != null && !jsonObj.get("delta").isJsonNull()) { - FileData.validateJsonObject(jsonObj.getAsJsonObject("delta")); + FileData.validateJsonElement(jsonObj.get("delta")); } // validate the optional field `file` if (jsonObj.get("file") != null && !jsonObj.get("file").isJsonNull()) { - FileData.validateJsonObject(jsonObj.getAsJsonObject("file")); + FileData.validateJsonElement(jsonObj.get("file")); } // validate the optional field `signature` if (jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) { - FileData.validateJsonObject(jsonObj.getAsJsonObject("signature")); + FileData.validateJsonElement(jsonObj.get("signature")); } + // validate the required field `status` + FileStatus.validateJsonElement(jsonObj.get("status")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -379,31 +347,31 @@ public void write(JsonWriter out, FileVersion value) throws IOException { @Override public FileVersion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FileVersion given an JSON string - * - * @param jsonString JSON string - * @return An instance of FileVersion - * @throws IOException if the JSON string is invalid with respect to FileVersion - */ + /** + * Create an instance of FileVersion given an JSON string + * + * @param jsonString JSON string + * @return An instance of FileVersion + * @throws IOException if the JSON string is invalid with respect to FileVersion + */ public static FileVersion fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FileVersion.class); } - /** - * Convert an instance of FileVersion to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FileVersion to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FileVersionUploadStatus.java b/src/main/java/io/github/vrchatapi/model/FileVersionUploadStatus.java index 64e96b73..1ce41093 100644 --- a/src/main/java/io/github/vrchatapi/model/FileVersionUploadStatus.java +++ b/src/main/java/io/github/vrchatapi/model/FileVersionUploadStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,182 +49,169 @@ /** * */ -@ApiModel(description = "") -@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 FileVersionUploadStatus { public static final String SERIALIZED_NAME_ETAGS = "etags"; @SerializedName(SERIALIZED_NAME_ETAGS) + @javax.annotation.Nonnull private List etags = new ArrayList<>(); public static final String SERIALIZED_NAME_FILE_NAME = "fileName"; @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nonnull private String fileName; public static final String SERIALIZED_NAME_MAX_PARTS = "maxParts"; @SerializedName(SERIALIZED_NAME_MAX_PARTS) + @javax.annotation.Nonnull private Integer maxParts; public static final String SERIALIZED_NAME_NEXT_PART_NUMBER = "nextPartNumber"; @SerializedName(SERIALIZED_NAME_NEXT_PART_NUMBER) + @javax.annotation.Nonnull private Integer nextPartNumber; public static final String SERIALIZED_NAME_PARTS = "parts"; @SerializedName(SERIALIZED_NAME_PARTS) + @javax.annotation.Nonnull private List parts = new ArrayList<>(); public static final String SERIALIZED_NAME_UPLOAD_ID = "uploadId"; @SerializedName(SERIALIZED_NAME_UPLOAD_ID) + @javax.annotation.Nonnull private String uploadId; public FileVersionUploadStatus() { } - public FileVersionUploadStatus etags(List etags) { - + public FileVersionUploadStatus etags(@javax.annotation.Nonnull List etags) { this.etags = etags; return this; } public FileVersionUploadStatus addEtagsItem(Object etagsItem) { + if (this.etags == null) { + this.etags = new ArrayList<>(); + } this.etags.add(etagsItem); return this; } - /** + /** * Unknown * @return etags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - public List getEtags() { return etags; } - - public void setEtags(List etags) { + public void setEtags(@javax.annotation.Nonnull List etags) { this.etags = etags; } - public FileVersionUploadStatus fileName(String fileName) { - + public FileVersionUploadStatus fileName(@javax.annotation.Nonnull String fileName) { this.fileName = fileName; return this; } - /** + /** * Get fileName * @return fileName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Avatar-MyAvatar-Un.file_00000000-0000-0000-0000-000000000000.1.unitypackage", required = true, value = "") - public String getFileName() { return fileName; } - - public void setFileName(String fileName) { + public void setFileName(@javax.annotation.Nonnull String fileName) { this.fileName = fileName; } - public FileVersionUploadStatus maxParts(Integer maxParts) { - + public FileVersionUploadStatus maxParts(@javax.annotation.Nonnull Integer maxParts) { this.maxParts = maxParts; return this; } - /** + /** * Get maxParts * minimum: 1 * @return maxParts - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "1000", required = true, value = "") - public Integer getMaxParts() { return maxParts; } - - public void setMaxParts(Integer maxParts) { + public void setMaxParts(@javax.annotation.Nonnull Integer maxParts) { this.maxParts = maxParts; } - public FileVersionUploadStatus nextPartNumber(Integer nextPartNumber) { - + public FileVersionUploadStatus nextPartNumber(@javax.annotation.Nonnull Integer nextPartNumber) { this.nextPartNumber = nextPartNumber; return this; } - /** + /** * Get nextPartNumber * minimum: 0 * @return nextPartNumber - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "0", required = true, value = "") - public Integer getNextPartNumber() { return nextPartNumber; } - - public void setNextPartNumber(Integer nextPartNumber) { + public void setNextPartNumber(@javax.annotation.Nonnull Integer nextPartNumber) { this.nextPartNumber = nextPartNumber; } - public FileVersionUploadStatus parts(List parts) { - + public FileVersionUploadStatus parts(@javax.annotation.Nonnull List parts) { this.parts = parts; return this; } public FileVersionUploadStatus addPartsItem(Object partsItem) { + if (this.parts == null) { + this.parts = new ArrayList<>(); + } this.parts.add(partsItem); return this; } - /** + /** * Get parts * @return parts - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getParts() { return parts; } - - public void setParts(List parts) { + public void setParts(@javax.annotation.Nonnull List parts) { this.parts = parts; } - public FileVersionUploadStatus uploadId(String uploadId) { - + public FileVersionUploadStatus uploadId(@javax.annotation.Nonnull String uploadId) { this.uploadId = uploadId; return this; } - /** + /** * Get uploadId * @return uploadId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxx", required = true, value = "") - public String getUploadId() { return uploadId; } - - public void setUploadId(String uploadId) { + public void setUploadId(@javax.annotation.Nonnull String uploadId) { this.uploadId = uploadId; } @@ -271,10 +258,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -283,68 +267,57 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("etags"); - openapiFields.add("fileName"); - openapiFields.add("maxParts"); - openapiFields.add("nextPartNumber"); - openapiFields.add("parts"); - openapiFields.add("uploadId"); + openapiFields = new HashSet(Arrays.asList("etags", "fileName", "maxParts", "nextPartNumber", "parts", "uploadId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("etags"); - openapiRequiredFields.add("fileName"); - openapiRequiredFields.add("maxParts"); - openapiRequiredFields.add("nextPartNumber"); - openapiRequiredFields.add("parts"); - openapiRequiredFields.add("uploadId"); + openapiRequiredFields = new HashSet(Arrays.asList("etags", "fileName", "maxParts", "nextPartNumber", "parts", "uploadId")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FileVersionUploadStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FileVersionUploadStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FileVersionUploadStatus is not found in the empty JSON string", FileVersionUploadStatus.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FileVersionUploadStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FileVersionUploadStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FileVersionUploadStatus is not found in the empty JSON string", FileVersionUploadStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FileVersionUploadStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileVersionUploadStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FileVersionUploadStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FileVersionUploadStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("etags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("etags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `etags` to be an array in the JSON string but got `%s`", jsonObj.get("etags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `etags` to be an array in the JSON string but got `%s`", jsonObj.get("etags").toString())); } if (!jsonObj.get("fileName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileName").toString())); } // ensure the required json array is present if (jsonObj.get("parts") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("parts").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `parts` to be an array in the JSON string but got `%s`", jsonObj.get("parts").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parts` to be an array in the JSON string but got `%s`", jsonObj.get("parts").toString())); } if (!jsonObj.get("uploadId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `uploadId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uploadId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `uploadId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uploadId").toString())); } } @@ -368,31 +341,31 @@ public void write(JsonWriter out, FileVersionUploadStatus value) throws IOExcept @Override public FileVersionUploadStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FileVersionUploadStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of FileVersionUploadStatus - * @throws IOException if the JSON string is invalid with respect to FileVersionUploadStatus - */ + /** + * Create an instance of FileVersionUploadStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of FileVersionUploadStatus + * @throws IOException if the JSON string is invalid with respect to FileVersionUploadStatus + */ public static FileVersionUploadStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FileVersionUploadStatus.class); } - /** - * Convert an instance of FileVersionUploadStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FileVersionUploadStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FinishFileDataUploadRequest.java b/src/main/java/io/github/vrchatapi/model/FinishFileDataUploadRequest.java index cea75d9b..8034ac9a 100644 --- a/src/main/java/io/github/vrchatapi/model/FinishFileDataUploadRequest.java +++ b/src/main/java/io/github/vrchatapi/model/FinishFileDataUploadRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.Set; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,26 +49,29 @@ /** * */ -@ApiModel(description = "") -@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 FinishFileDataUploadRequest { public static final String SERIALIZED_NAME_ETAGS = "etags"; @SerializedName(SERIALIZED_NAME_ETAGS) - private Set etags = null; + @javax.annotation.Nullable + private Set etags = new LinkedHashSet<>(); public static final String SERIALIZED_NAME_MAX_PARTS = "maxParts"; + @Deprecated @SerializedName(SERIALIZED_NAME_MAX_PARTS) + @javax.annotation.Nonnull private String maxParts = "0"; public static final String SERIALIZED_NAME_NEXT_PART_NUMBER = "nextPartNumber"; + @Deprecated @SerializedName(SERIALIZED_NAME_NEXT_PART_NUMBER) + @javax.annotation.Nonnull private String nextPartNumber = "0"; public FinishFileDataUploadRequest() { } - public FinishFileDataUploadRequest etags(Set etags) { - + public FinishFileDataUploadRequest etags(@javax.annotation.Nullable Set etags) { this.etags = etags; return this; } @@ -81,69 +84,62 @@ public FinishFileDataUploadRequest addEtagsItem(String etagsItem) { return this; } - /** + /** * Array of ETags uploaded. * @return etags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Array of ETags uploaded.") - public Set getEtags() { return etags; } - - public void setEtags(Set etags) { + public void setEtags(@javax.annotation.Nullable Set etags) { this.etags = etags; } - public FinishFileDataUploadRequest maxParts(String maxParts) { - + @Deprecated + public FinishFileDataUploadRequest maxParts(@javax.annotation.Nonnull String maxParts) { this.maxParts = maxParts; return this; } - /** + /** * Always a zero in string form, despite how many parts uploaded. * @return maxParts * @deprecated - **/ + */ @Deprecated @javax.annotation.Nonnull - @ApiModelProperty(example = "0", required = true, value = "Always a zero in string form, despite how many parts uploaded.") - public String getMaxParts() { return maxParts; } - - public void setMaxParts(String maxParts) { + @Deprecated + public void setMaxParts(@javax.annotation.Nonnull String maxParts) { this.maxParts = maxParts; } - public FinishFileDataUploadRequest nextPartNumber(String nextPartNumber) { - + @Deprecated + public FinishFileDataUploadRequest nextPartNumber(@javax.annotation.Nonnull String nextPartNumber) { this.nextPartNumber = nextPartNumber; return this; } - /** + /** * Always a zero in string form, despite how many parts uploaded. * @return nextPartNumber * @deprecated - **/ + */ @Deprecated @javax.annotation.Nonnull - @ApiModelProperty(example = "0", required = true, value = "Always a zero in string form, despite how many parts uploaded.") - public String getNextPartNumber() { return nextPartNumber; } - - public void setNextPartNumber(String nextPartNumber) { + @Deprecated + public void setNextPartNumber(@javax.annotation.Nonnull String nextPartNumber) { this.nextPartNumber = nextPartNumber; } @@ -184,10 +180,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -196,53 +189,49 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("etags"); - openapiFields.add("maxParts"); - openapiFields.add("nextPartNumber"); + openapiFields = new HashSet(Arrays.asList("etags", "maxParts", "nextPartNumber")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("maxParts"); - openapiRequiredFields.add("nextPartNumber"); + openapiRequiredFields = new HashSet(Arrays.asList("maxParts", "nextPartNumber")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FinishFileDataUploadRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FinishFileDataUploadRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FinishFileDataUploadRequest is not found in the empty JSON string", FinishFileDataUploadRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FinishFileDataUploadRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FinishFileDataUploadRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FinishFileDataUploadRequest is not found in the empty JSON string", FinishFileDataUploadRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FinishFileDataUploadRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FinishFileDataUploadRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FinishFileDataUploadRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FinishFileDataUploadRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("etags") != null && !jsonObj.get("etags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `etags` to be an array in the JSON string but got `%s`", jsonObj.get("etags").toString())); + if (jsonObj.get("etags") != null && !jsonObj.get("etags").isJsonNull() && !jsonObj.get("etags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `etags` to be an array in the JSON string but got `%s`", jsonObj.get("etags").toString())); } if (!jsonObj.get("maxParts").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maxParts` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maxParts").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `maxParts` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maxParts").toString())); } if (!jsonObj.get("nextPartNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nextPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPartNumber").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `nextPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPartNumber").toString())); } } @@ -266,31 +255,31 @@ public void write(JsonWriter out, FinishFileDataUploadRequest value) throws IOEx @Override public FinishFileDataUploadRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FinishFileDataUploadRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FinishFileDataUploadRequest - * @throws IOException if the JSON string is invalid with respect to FinishFileDataUploadRequest - */ + /** + * Create an instance of FinishFileDataUploadRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FinishFileDataUploadRequest + * @throws IOException if the JSON string is invalid with respect to FinishFileDataUploadRequest + */ public static FinishFileDataUploadRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FinishFileDataUploadRequest.class); } - /** - * Convert an instance of FinishFileDataUploadRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FinishFileDataUploadRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FollowCalendarEventRequest.java b/src/main/java/io/github/vrchatapi/model/FollowCalendarEventRequest.java index e8bd71fe..12d896ab 100644 --- a/src/main/java/io/github/vrchatapi/model/FollowCalendarEventRequest.java +++ b/src/main/java/io/github/vrchatapi/model/FollowCalendarEventRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * FollowCalendarEventRequest */ -@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 FollowCalendarEventRequest { public static final String SERIALIZED_NAME_IS_FOLLOWING = "isFollowing"; @SerializedName(SERIALIZED_NAME_IS_FOLLOWING) + @javax.annotation.Nonnull private Boolean isFollowing; public FollowCalendarEventRequest() { } - public FollowCalendarEventRequest isFollowing(Boolean isFollowing) { - + public FollowCalendarEventRequest isFollowing(@javax.annotation.Nonnull Boolean isFollowing) { this.isFollowing = isFollowing; return this; } - /** + /** * Get isFollowing * @return isFollowing - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "true", required = true, value = "") - public Boolean getIsFollowing() { return isFollowing; } - - public void setIsFollowing(Boolean isFollowing) { + public void setIsFollowing(@javax.annotation.Nonnull Boolean isFollowing) { this.isFollowing = isFollowing; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("isFollowing"); + openapiFields = new HashSet(Arrays.asList("isFollowing")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("isFollowing"); + openapiRequiredFields = new HashSet(Arrays.asList("isFollowing")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FollowCalendarEventRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FollowCalendarEventRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FollowCalendarEventRequest is not found in the empty JSON string", FollowCalendarEventRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FollowCalendarEventRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FollowCalendarEventRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FollowCalendarEventRequest is not found in the empty JSON string", FollowCalendarEventRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FollowCalendarEventRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FollowCalendarEventRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FollowCalendarEventRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FollowCalendarEventRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -180,31 +173,31 @@ public void write(JsonWriter out, FollowCalendarEventRequest value) throws IOExc @Override public FollowCalendarEventRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FollowCalendarEventRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of FollowCalendarEventRequest - * @throws IOException if the JSON string is invalid with respect to FollowCalendarEventRequest - */ + /** + * Create an instance of FollowCalendarEventRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FollowCalendarEventRequest + * @throws IOException if the JSON string is invalid with respect to FollowCalendarEventRequest + */ public static FollowCalendarEventRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FollowCalendarEventRequest.class); } - /** - * Convert an instance of FollowCalendarEventRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FollowCalendarEventRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/FriendStatus.java b/src/main/java/io/github/vrchatapi/model/FriendStatus.java index 60489143..3fc7faff 100644 --- a/src/main/java/io/github/vrchatapi/model/FriendStatus.java +++ b/src/main/java/io/github/vrchatapi/model/FriendStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,88 +47,79 @@ /** * FriendStatus */ -@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 FriendStatus { public static final String SERIALIZED_NAME_INCOMING_REQUEST = "incomingRequest"; @SerializedName(SERIALIZED_NAME_INCOMING_REQUEST) + @javax.annotation.Nonnull private Boolean incomingRequest = false; public static final String SERIALIZED_NAME_IS_FRIEND = "isFriend"; @SerializedName(SERIALIZED_NAME_IS_FRIEND) + @javax.annotation.Nonnull private Boolean isFriend = false; public static final String SERIALIZED_NAME_OUTGOING_REQUEST = "outgoingRequest"; @SerializedName(SERIALIZED_NAME_OUTGOING_REQUEST) + @javax.annotation.Nonnull private Boolean outgoingRequest = false; public FriendStatus() { } - public FriendStatus incomingRequest(Boolean incomingRequest) { - + public FriendStatus incomingRequest(@javax.annotation.Nonnull Boolean incomingRequest) { this.incomingRequest = incomingRequest; return this; } - /** + /** * Get incomingRequest * @return incomingRequest - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIncomingRequest() { return incomingRequest; } - - public void setIncomingRequest(Boolean incomingRequest) { + public void setIncomingRequest(@javax.annotation.Nonnull Boolean incomingRequest) { this.incomingRequest = incomingRequest; } - public FriendStatus isFriend(Boolean isFriend) { - + public FriendStatus isFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; return this; } - /** + /** * Get isFriend * @return isFriend - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsFriend() { return isFriend; } - - public void setIsFriend(Boolean isFriend) { + public void setIsFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; } - public FriendStatus outgoingRequest(Boolean outgoingRequest) { - + public FriendStatus outgoingRequest(@javax.annotation.Nonnull Boolean outgoingRequest) { this.outgoingRequest = outgoingRequest; return this; } - /** + /** * Get outgoingRequest * @return outgoingRequest - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getOutgoingRequest() { return outgoingRequest; } - - public void setOutgoingRequest(Boolean outgoingRequest) { + public void setOutgoingRequest(@javax.annotation.Nonnull Boolean outgoingRequest) { this.outgoingRequest = outgoingRequest; } @@ -169,10 +160,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -181,45 +169,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("incomingRequest"); - openapiFields.add("isFriend"); - openapiFields.add("outgoingRequest"); + openapiFields = new HashSet(Arrays.asList("incomingRequest", "isFriend", "outgoingRequest")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("incomingRequest"); - openapiRequiredFields.add("isFriend"); - openapiRequiredFields.add("outgoingRequest"); + openapiRequiredFields = new HashSet(Arrays.asList("incomingRequest", "isFriend", "outgoingRequest")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FriendStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FriendStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FriendStatus is not found in the empty JSON string", FriendStatus.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FriendStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FriendStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in FriendStatus is not found in the empty JSON string", FriendStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FriendStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FriendStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `FriendStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FriendStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -242,31 +225,31 @@ public void write(JsonWriter out, FriendStatus value) throws IOException { @Override public FriendStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of FriendStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of FriendStatus - * @throws IOException if the JSON string is invalid with respect to FriendStatus - */ + /** + * Create an instance of FriendStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of FriendStatus + * @throws IOException if the JSON string is invalid with respect to FriendStatus + */ public static FriendStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, FriendStatus.class); } - /** - * Convert an instance of FriendStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of FriendStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GetGroupPosts200Response.java b/src/main/java/io/github/vrchatapi/model/GetGroupPosts200Response.java index 7c372926..4d33e1b4 100644 --- a/src/main/java/io/github/vrchatapi/model/GetGroupPosts200Response.java +++ b/src/main/java/io/github/vrchatapi/model/GetGroupPosts200Response.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupPost; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,17 +50,17 @@ /** * GetGroupPosts200Response */ -@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 GetGroupPosts200Response { public static final String SERIALIZED_NAME_POSTS = "posts"; @SerializedName(SERIALIZED_NAME_POSTS) - private List posts = null; + @javax.annotation.Nullable + private List posts = new ArrayList<>(); public GetGroupPosts200Response() { } - public GetGroupPosts200Response posts(List posts) { - + public GetGroupPosts200Response posts(@javax.annotation.Nullable List posts) { this.posts = posts; return this; } @@ -73,19 +73,16 @@ public GetGroupPosts200Response addPostsItem(GroupPost postsItem) { return this; } - /** + /** * Get posts * @return posts - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getPosts() { return posts; } - - public void setPosts(List posts) { + public void setPosts(@javax.annotation.Nullable List posts) { this.posts = posts; } @@ -122,10 +119,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -134,44 +128,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("posts"); + openapiFields = new HashSet(Arrays.asList("posts")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GetGroupPosts200Response - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GetGroupPosts200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetGroupPosts200Response is not found in the empty JSON string", GetGroupPosts200Response.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetGroupPosts200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetGroupPosts200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetGroupPosts200Response is not found in the empty JSON string", GetGroupPosts200Response.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GetGroupPosts200Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetGroupPosts200Response` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GetGroupPosts200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("posts") != null && !jsonObj.get("posts").isJsonNull()) { JsonArray jsonArrayposts = jsonObj.getAsJsonArray("posts"); if (jsonArrayposts != null) { // ensure the json data is an array if (!jsonObj.get("posts").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `posts` to be an array in the JSON string but got `%s`", jsonObj.get("posts").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `posts` to be an array in the JSON string but got `%s`", jsonObj.get("posts").toString())); } // validate the optional field `posts` (array) for (int i = 0; i < jsonArrayposts.size(); i++) { - GroupPost.validateJsonObject(jsonArrayposts.get(i).getAsJsonObject()); + GroupPost.validateJsonElement(jsonArrayposts.get(i)); }; } } @@ -197,31 +191,31 @@ public void write(JsonWriter out, GetGroupPosts200Response value) throws IOExcep @Override public GetGroupPosts200Response read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GetGroupPosts200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetGroupPosts200Response - * @throws IOException if the JSON string is invalid with respect to GetGroupPosts200Response - */ + /** + * Create an instance of GetGroupPosts200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetGroupPosts200Response + * @throws IOException if the JSON string is invalid with respect to GetGroupPosts200Response + */ public static GetGroupPosts200Response fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GetGroupPosts200Response.class); } - /** - * Convert an instance of GetGroupPosts200Response to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GetGroupPosts200Response to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GetUserGroupInstances200Response.java b/src/main/java/io/github/vrchatapi/model/GetUserGroupInstances200Response.java index 535e38f8..217280a5 100644 --- a/src/main/java/io/github/vrchatapi/model/GetUserGroupInstances200Response.java +++ b/src/main/java/io/github/vrchatapi/model/GetUserGroupInstances200Response.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,18 +13,16 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.Instance; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,44 +51,41 @@ /** * GetUserGroupInstances200Response */ -@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 GetUserGroupInstances200Response { public static final String SERIALIZED_NAME_FETCHED_AT = "fetchedAt"; @SerializedName(SERIALIZED_NAME_FETCHED_AT) + @javax.annotation.Nullable private OffsetDateTime fetchedAt; public static final String SERIALIZED_NAME_INSTANCES = "instances"; @SerializedName(SERIALIZED_NAME_INSTANCES) - private List instances = null; + @javax.annotation.Nullable + private List instances = new ArrayList<>(); public GetUserGroupInstances200Response() { } - public GetUserGroupInstances200Response fetchedAt(OffsetDateTime fetchedAt) { - + public GetUserGroupInstances200Response fetchedAt(@javax.annotation.Nullable OffsetDateTime fetchedAt) { this.fetchedAt = fetchedAt; return this; } - /** + /** * Get fetchedAt * @return fetchedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getFetchedAt() { return fetchedAt; } - - public void setFetchedAt(OffsetDateTime fetchedAt) { + public void setFetchedAt(@javax.annotation.Nullable OffsetDateTime fetchedAt) { this.fetchedAt = fetchedAt; } - public GetUserGroupInstances200Response instances(List instances) { - + public GetUserGroupInstances200Response instances(@javax.annotation.Nullable List instances) { this.instances = instances; return this; } @@ -101,19 +98,16 @@ public GetUserGroupInstances200Response addInstancesItem(Instance instancesItem) return this; } - /** + /** * Get instances * @return instances - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getInstances() { return instances; } - - public void setInstances(List instances) { + public void setInstances(@javax.annotation.Nullable List instances) { this.instances = instances; } @@ -152,10 +146,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -164,45 +155,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fetchedAt"); - openapiFields.add("instances"); + openapiFields = new HashSet(Arrays.asList("fetchedAt", "instances")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GetUserGroupInstances200Response - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GetUserGroupInstances200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetUserGroupInstances200Response is not found in the empty JSON string", GetUserGroupInstances200Response.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetUserGroupInstances200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetUserGroupInstances200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GetUserGroupInstances200Response is not found in the empty JSON string", GetUserGroupInstances200Response.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GetUserGroupInstances200Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetUserGroupInstances200Response` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GetUserGroupInstances200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("instances") != null && !jsonObj.get("instances").isJsonNull()) { JsonArray jsonArrayinstances = jsonObj.getAsJsonArray("instances"); if (jsonArrayinstances != null) { // ensure the json data is an array if (!jsonObj.get("instances").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `instances` to be an array in the JSON string but got `%s`", jsonObj.get("instances").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `instances` to be an array in the JSON string but got `%s`", jsonObj.get("instances").toString())); } // validate the optional field `instances` (array) for (int i = 0; i < jsonArrayinstances.size(); i++) { - Instance.validateJsonObject(jsonArrayinstances.get(i).getAsJsonObject()); + Instance.validateJsonElement(jsonArrayinstances.get(i)); }; } } @@ -228,31 +218,31 @@ public void write(JsonWriter out, GetUserGroupInstances200Response value) throws @Override public GetUserGroupInstances200Response read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GetUserGroupInstances200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetUserGroupInstances200Response - * @throws IOException if the JSON string is invalid with respect to GetUserGroupInstances200Response - */ + /** + * Create an instance of GetUserGroupInstances200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetUserGroupInstances200Response + * @throws IOException if the JSON string is invalid with respect to GetUserGroupInstances200Response + */ public static GetUserGroupInstances200Response fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GetUserGroupInstances200Response.class); } - /** - * Convert an instance of GetUserGroupInstances200Response to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GetUserGroupInstances200Response to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Group.java b/src/main/java/io/github/vrchatapi/model/Group.java index ef5be59d..27c0a793 100644 --- a/src/main/java/io/github/vrchatapi/model/Group.java +++ b/src/main/java/io/github/vrchatapi/model/Group.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,12 +24,11 @@ import io.github.vrchatapi.model.GroupMyMember; import io.github.vrchatapi.model.GroupPrivacy; import io.github.vrchatapi.model.GroupRole; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -44,13 +42,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -58,237 +58,253 @@ /** * Group */ -@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 Group { public static final String SERIALIZED_NAME_AGE_VERIFICATION_BETA_CODE = "ageVerificationBetaCode"; @SerializedName(SERIALIZED_NAME_AGE_VERIFICATION_BETA_CODE) + @javax.annotation.Nullable private String ageVerificationBetaCode; public static final String SERIALIZED_NAME_AGE_VERIFICATION_BETA_SLOTS = "ageVerificationBetaSlots"; @SerializedName(SERIALIZED_NAME_AGE_VERIFICATION_BETA_SLOTS) + @javax.annotation.Nullable private BigDecimal ageVerificationBetaSlots; public static final String SERIALIZED_NAME_AGE_VERIFICATION_SLOTS_AVAILABLE = "ageVerificationSlotsAvailable"; @SerializedName(SERIALIZED_NAME_AGE_VERIFICATION_SLOTS_AVAILABLE) + @javax.annotation.Nullable private Boolean ageVerificationSlotsAvailable; public static final String SERIALIZED_NAME_ALLOW_GROUP_JOIN_PROMPT = "allowGroupJoinPrompt"; @SerializedName(SERIALIZED_NAME_ALLOW_GROUP_JOIN_PROMPT) + @javax.annotation.Nullable private Boolean allowGroupJoinPrompt; public static final String SERIALIZED_NAME_BADGES = "badges"; @SerializedName(SERIALIZED_NAME_BADGES) - private List badges = null; + @javax.annotation.Nullable + private List badges = new ArrayList<>(); public static final String SERIALIZED_NAME_BANNER_ID = "bannerId"; @SerializedName(SERIALIZED_NAME_BANNER_ID) + @javax.annotation.Nullable private String bannerId; public static final String SERIALIZED_NAME_BANNER_URL = "bannerUrl"; @SerializedName(SERIALIZED_NAME_BANNER_URL) + @javax.annotation.Nullable private String bannerUrl; public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_DISCRIMINATOR = "discriminator"; @SerializedName(SERIALIZED_NAME_DISCRIMINATOR) + @javax.annotation.Nullable private String discriminator; public static final String SERIALIZED_NAME_GALLERIES = "galleries"; @SerializedName(SERIALIZED_NAME_GALLERIES) - private List galleries = null; + @javax.annotation.Nullable + private List galleries = new ArrayList<>(); public static final String SERIALIZED_NAME_ICON_ID = "iconId"; @SerializedName(SERIALIZED_NAME_ICON_ID) + @javax.annotation.Nullable private String iconId; public static final String SERIALIZED_NAME_ICON_URL = "iconUrl"; @SerializedName(SERIALIZED_NAME_ICON_URL) + @javax.annotation.Nullable private String iconUrl; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IS_VERIFIED = "isVerified"; @SerializedName(SERIALIZED_NAME_IS_VERIFIED) + @javax.annotation.Nullable private Boolean isVerified = false; public static final String SERIALIZED_NAME_JOIN_STATE = "joinState"; @SerializedName(SERIALIZED_NAME_JOIN_STATE) + @javax.annotation.Nullable private GroupJoinState joinState = GroupJoinState.OPEN; public static final String SERIALIZED_NAME_LANGUAGES = "languages"; @SerializedName(SERIALIZED_NAME_LANGUAGES) - private List languages = null; + @javax.annotation.Nullable + private List languages = new ArrayList<>(); public static final String SERIALIZED_NAME_LAST_POST_CREATED_AT = "lastPostCreatedAt"; @SerializedName(SERIALIZED_NAME_LAST_POST_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime lastPostCreatedAt; public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) - private List links = null; + @javax.annotation.Nullable + private List links = new ArrayList<>(); public static final String SERIALIZED_NAME_MEMBER_COUNT = "memberCount"; @SerializedName(SERIALIZED_NAME_MEMBER_COUNT) + @javax.annotation.Nullable private Integer memberCount; public static final String SERIALIZED_NAME_MEMBER_COUNT_SYNCED_AT = "memberCountSyncedAt"; @SerializedName(SERIALIZED_NAME_MEMBER_COUNT_SYNCED_AT) + @javax.annotation.Nullable private OffsetDateTime memberCountSyncedAt; public static final String SERIALIZED_NAME_MEMBERSHIP_STATUS = "membershipStatus"; @SerializedName(SERIALIZED_NAME_MEMBERSHIP_STATUS) + @javax.annotation.Nullable private GroupMemberStatus membershipStatus = GroupMemberStatus.INACTIVE; public static final String SERIALIZED_NAME_MY_MEMBER = "myMember"; @SerializedName(SERIALIZED_NAME_MY_MEMBER) + @javax.annotation.Nullable private GroupMyMember myMember; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_ONLINE_MEMBER_COUNT = "onlineMemberCount"; @SerializedName(SERIALIZED_NAME_ONLINE_MEMBER_COUNT) + @javax.annotation.Nullable private Integer onlineMemberCount; public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable private String ownerId; public static final String SERIALIZED_NAME_PRIVACY = "privacy"; @SerializedName(SERIALIZED_NAME_PRIVACY) + @javax.annotation.Nullable private GroupPrivacy privacy = GroupPrivacy.DEFAULT; public static final String SERIALIZED_NAME_ROLES = "roles"; @SerializedName(SERIALIZED_NAME_ROLES) - private List roles = null; + @javax.annotation.Nullable + private List roles; public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) + @javax.annotation.Nullable private String rules; public static final String SERIALIZED_NAME_SHORT_CODE = "shortCode"; @SerializedName(SERIALIZED_NAME_SHORT_CODE) + @javax.annotation.Nullable private String shortCode; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TRANSFER_TARGET_ID = "transferTargetId"; @SerializedName(SERIALIZED_NAME_TRANSFER_TARGET_ID) + @javax.annotation.Nullable private String transferTargetId; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public Group() { } - public Group ageVerificationBetaCode(String ageVerificationBetaCode) { - + public Group ageVerificationBetaCode(@javax.annotation.Nullable String ageVerificationBetaCode) { this.ageVerificationBetaCode = ageVerificationBetaCode; return this; } - /** + /** * Get ageVerificationBetaCode * @return ageVerificationBetaCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "abc1234", value = "") - public String getAgeVerificationBetaCode() { return ageVerificationBetaCode; } - - public void setAgeVerificationBetaCode(String ageVerificationBetaCode) { + public void setAgeVerificationBetaCode(@javax.annotation.Nullable String ageVerificationBetaCode) { this.ageVerificationBetaCode = ageVerificationBetaCode; } - public Group ageVerificationBetaSlots(BigDecimal ageVerificationBetaSlots) { - + public Group ageVerificationBetaSlots(@javax.annotation.Nullable BigDecimal ageVerificationBetaSlots) { this.ageVerificationBetaSlots = ageVerificationBetaSlots; return this; } - /** + /** * Get ageVerificationBetaSlots * @return ageVerificationBetaSlots - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "500", value = "") - public BigDecimal getAgeVerificationBetaSlots() { return ageVerificationBetaSlots; } - - public void setAgeVerificationBetaSlots(BigDecimal ageVerificationBetaSlots) { + public void setAgeVerificationBetaSlots(@javax.annotation.Nullable BigDecimal ageVerificationBetaSlots) { this.ageVerificationBetaSlots = ageVerificationBetaSlots; } - public Group ageVerificationSlotsAvailable(Boolean ageVerificationSlotsAvailable) { - + public Group ageVerificationSlotsAvailable(@javax.annotation.Nullable Boolean ageVerificationSlotsAvailable) { this.ageVerificationSlotsAvailable = ageVerificationSlotsAvailable; return this; } - /** + /** * Get ageVerificationSlotsAvailable * @return ageVerificationSlotsAvailable - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getAgeVerificationSlotsAvailable() { return ageVerificationSlotsAvailable; } - - public void setAgeVerificationSlotsAvailable(Boolean ageVerificationSlotsAvailable) { + public void setAgeVerificationSlotsAvailable(@javax.annotation.Nullable Boolean ageVerificationSlotsAvailable) { this.ageVerificationSlotsAvailable = ageVerificationSlotsAvailable; } - public Group allowGroupJoinPrompt(Boolean allowGroupJoinPrompt) { - + public Group allowGroupJoinPrompt(@javax.annotation.Nullable Boolean allowGroupJoinPrompt) { this.allowGroupJoinPrompt = allowGroupJoinPrompt; return this; } - /** + /** * Get allowGroupJoinPrompt * @return allowGroupJoinPrompt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getAllowGroupJoinPrompt() { return allowGroupJoinPrompt; } - - public void setAllowGroupJoinPrompt(Boolean allowGroupJoinPrompt) { + public void setAllowGroupJoinPrompt(@javax.annotation.Nullable Boolean allowGroupJoinPrompt) { this.allowGroupJoinPrompt = allowGroupJoinPrompt; } - public Group badges(List badges) { - + public Group badges(@javax.annotation.Nullable List badges) { this.badges = badges; return this; } @@ -301,140 +317,116 @@ public Group addBadgesItem(String badgesItem) { return this; } - /** + /** * Get badges * @return badges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getBadges() { return badges; } - - public void setBadges(List badges) { + public void setBadges(@javax.annotation.Nullable List badges) { this.badges = badges; } - public Group bannerId(String bannerId) { - + public Group bannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; return this; } - /** + /** * Get bannerId * @return bannerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBannerId() { return bannerId; } - - public void setBannerId(String bannerId) { + public void setBannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; } - public Group bannerUrl(String bannerUrl) { - + public Group bannerUrl(@javax.annotation.Nullable String bannerUrl) { this.bannerUrl = bannerUrl; return this; } - /** + /** * Get bannerUrl * @return bannerUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBannerUrl() { return bannerUrl; } - - public void setBannerUrl(String bannerUrl) { + public void setBannerUrl(@javax.annotation.Nullable String bannerUrl) { this.bannerUrl = bannerUrl; } - public Group createdAt(OffsetDateTime createdAt) { - + public Group createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public Group description(String description) { - + public Group description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public Group discriminator(String discriminator) { - + public Group discriminator(@javax.annotation.Nullable String discriminator) { this.discriminator = discriminator; return this; } - /** + /** * Get discriminator * @return discriminator - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "0000", value = "") - public String getDiscriminator() { return discriminator; } - - public void setDiscriminator(String discriminator) { + public void setDiscriminator(@javax.annotation.Nullable String discriminator) { this.discriminator = discriminator; } - public Group galleries(List galleries) { - + public Group galleries(@javax.annotation.Nullable List galleries) { this.galleries = galleries; return this; } @@ -447,140 +439,116 @@ public Group addGalleriesItem(GroupGallery galleriesItem) { return this; } - /** + /** * Get galleries * @return galleries - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getGalleries() { return galleries; } - - public void setGalleries(List galleries) { + public void setGalleries(@javax.annotation.Nullable List galleries) { this.galleries = galleries; } - public Group iconId(String iconId) { - + public Group iconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; return this; } - /** + /** * Get iconId * @return iconId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIconId() { return iconId; } - - public void setIconId(String iconId) { + public void setIconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; } - public Group iconUrl(String iconUrl) { - + public Group iconUrl(@javax.annotation.Nullable String iconUrl) { this.iconUrl = iconUrl; return this; } - /** + /** * Get iconUrl * @return iconUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIconUrl() { return iconUrl; } - - public void setIconUrl(String iconUrl) { + public void setIconUrl(@javax.annotation.Nullable String iconUrl) { this.iconUrl = iconUrl; } - public Group id(String id) { - + public Group id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public Group isVerified(Boolean isVerified) { - + public Group isVerified(@javax.annotation.Nullable Boolean isVerified) { this.isVerified = isVerified; return this; } - /** + /** * Get isVerified * @return isVerified - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsVerified() { return isVerified; } - - public void setIsVerified(Boolean isVerified) { + public void setIsVerified(@javax.annotation.Nullable Boolean isVerified) { this.isVerified = isVerified; } - public Group joinState(GroupJoinState joinState) { - + public Group joinState(@javax.annotation.Nullable GroupJoinState joinState) { this.joinState = joinState; return this; } - /** + /** * Get joinState * @return joinState - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupJoinState getJoinState() { return joinState; } - - public void setJoinState(GroupJoinState joinState) { + public void setJoinState(@javax.annotation.Nullable GroupJoinState joinState) { this.joinState = joinState; } - public Group languages(List languages) { - + public Group languages(@javax.annotation.Nullable List languages) { this.languages = languages; return this; } @@ -593,48 +561,40 @@ public Group addLanguagesItem(String languagesItem) { return this; } - /** + /** * Get languages * @return languages - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getLanguages() { return languages; } - - public void setLanguages(List languages) { + public void setLanguages(@javax.annotation.Nullable List languages) { this.languages = languages; } - public Group lastPostCreatedAt(OffsetDateTime lastPostCreatedAt) { - + public Group lastPostCreatedAt(@javax.annotation.Nullable OffsetDateTime lastPostCreatedAt) { this.lastPostCreatedAt = lastPostCreatedAt; return this; } - /** + /** * Get lastPostCreatedAt * @return lastPostCreatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getLastPostCreatedAt() { return lastPostCreatedAt; } - - public void setLastPostCreatedAt(OffsetDateTime lastPostCreatedAt) { + public void setLastPostCreatedAt(@javax.annotation.Nullable OffsetDateTime lastPostCreatedAt) { this.lastPostCreatedAt = lastPostCreatedAt; } - public Group links(List links) { - + public Group links(@javax.annotation.Nullable List links) { this.links = links; return this; } @@ -647,209 +607,173 @@ public Group addLinksItem(String linksItem) { return this; } - /** + /** * Get links * @return links - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getLinks() { return links; } - - public void setLinks(List links) { + public void setLinks(@javax.annotation.Nullable List links) { this.links = links; } - public Group memberCount(Integer memberCount) { - + public Group memberCount(@javax.annotation.Nullable Integer memberCount) { this.memberCount = memberCount; return this; } - /** + /** * Get memberCount * @return memberCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getMemberCount() { return memberCount; } - - public void setMemberCount(Integer memberCount) { + public void setMemberCount(@javax.annotation.Nullable Integer memberCount) { this.memberCount = memberCount; } - public Group memberCountSyncedAt(OffsetDateTime memberCountSyncedAt) { - + public Group memberCountSyncedAt(@javax.annotation.Nullable OffsetDateTime memberCountSyncedAt) { this.memberCountSyncedAt = memberCountSyncedAt; return this; } - /** + /** * Get memberCountSyncedAt * @return memberCountSyncedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getMemberCountSyncedAt() { return memberCountSyncedAt; } - - public void setMemberCountSyncedAt(OffsetDateTime memberCountSyncedAt) { + public void setMemberCountSyncedAt(@javax.annotation.Nullable OffsetDateTime memberCountSyncedAt) { this.memberCountSyncedAt = memberCountSyncedAt; } - public Group membershipStatus(GroupMemberStatus membershipStatus) { - + public Group membershipStatus(@javax.annotation.Nullable GroupMemberStatus membershipStatus) { this.membershipStatus = membershipStatus; return this; } - /** + /** * Get membershipStatus * @return membershipStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupMemberStatus getMembershipStatus() { return membershipStatus; } - - public void setMembershipStatus(GroupMemberStatus membershipStatus) { + public void setMembershipStatus(@javax.annotation.Nullable GroupMemberStatus membershipStatus) { this.membershipStatus = membershipStatus; } - public Group myMember(GroupMyMember myMember) { - + public Group myMember(@javax.annotation.Nullable GroupMyMember myMember) { this.myMember = myMember; return this; } - /** + /** * Get myMember * @return myMember - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupMyMember getMyMember() { return myMember; } - - public void setMyMember(GroupMyMember myMember) { + public void setMyMember(@javax.annotation.Nullable GroupMyMember myMember) { this.myMember = myMember; } - public Group name(String name) { - + public Group name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public Group onlineMemberCount(Integer onlineMemberCount) { - + public Group onlineMemberCount(@javax.annotation.Nullable Integer onlineMemberCount) { this.onlineMemberCount = onlineMemberCount; return this; } - /** + /** * Get onlineMemberCount * @return onlineMemberCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getOnlineMemberCount() { return onlineMemberCount; } - - public void setOnlineMemberCount(Integer onlineMemberCount) { + public void setOnlineMemberCount(@javax.annotation.Nullable Integer onlineMemberCount) { this.onlineMemberCount = onlineMemberCount; } - public Group ownerId(String ownerId) { - + public Group ownerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return ownerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getOwnerId() { return ownerId; } - - public void setOwnerId(String ownerId) { + public void setOwnerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; } - public Group privacy(GroupPrivacy privacy) { - + public Group privacy(@javax.annotation.Nullable GroupPrivacy privacy) { this.privacy = privacy; return this; } - /** + /** * Get privacy * @return privacy - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupPrivacy getPrivacy() { return privacy; } - - public void setPrivacy(GroupPrivacy privacy) { + public void setPrivacy(@javax.annotation.Nullable GroupPrivacy privacy) { this.privacy = privacy; } - public Group roles(List roles) { - + public Group roles(@javax.annotation.Nullable List roles) { this.roles = roles; return this; } @@ -862,71 +786,59 @@ public Group addRolesItem(GroupRole rolesItem) { return this; } - /** + /** * Only returned if ?includeRoles=true is specified. * @return roles - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only returned if ?includeRoles=true is specified.") - public List getRoles() { return roles; } - - public void setRoles(List roles) { + public void setRoles(@javax.annotation.Nullable List roles) { this.roles = roles; } - public Group rules(String rules) { - + public Group rules(@javax.annotation.Nullable String rules) { this.rules = rules; return this; } - /** + /** * Get rules * @return rules - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getRules() { return rules; } - - public void setRules(String rules) { + public void setRules(@javax.annotation.Nullable String rules) { this.rules = rules; } - public Group shortCode(String shortCode) { - + public Group shortCode(@javax.annotation.Nullable String shortCode) { this.shortCode = shortCode; return this; } - /** + /** * Get shortCode * @return shortCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "VRCHAT", value = "") - public String getShortCode() { return shortCode; } - - public void setShortCode(String shortCode) { + public void setShortCode(@javax.annotation.Nullable String shortCode) { this.shortCode = shortCode; } - public Group tags(List tags) { - + public Group tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -939,65 +851,54 @@ public Group addTagsItem(String tagsItem) { return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public Group transferTargetId(String transferTargetId) { - + public Group transferTargetId(@javax.annotation.Nullable String transferTargetId) { this.transferTargetId = transferTargetId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return transferTargetId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getTransferTargetId() { return transferTargetId; } - - public void setTransferTargetId(String transferTargetId) { + public void setTransferTargetId(@javax.annotation.Nullable String transferTargetId) { this.transferTargetId = transferTargetId; } - public Group updatedAt(OffsetDateTime updatedAt) { - + public Group updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -1109,10 +1010,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -1121,151 +1019,131 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ageVerificationBetaCode"); - openapiFields.add("ageVerificationBetaSlots"); - openapiFields.add("ageVerificationSlotsAvailable"); - openapiFields.add("allowGroupJoinPrompt"); - openapiFields.add("badges"); - openapiFields.add("bannerId"); - openapiFields.add("bannerUrl"); - openapiFields.add("createdAt"); - openapiFields.add("description"); - openapiFields.add("discriminator"); - openapiFields.add("galleries"); - openapiFields.add("iconId"); - openapiFields.add("iconUrl"); - openapiFields.add("id"); - openapiFields.add("isVerified"); - openapiFields.add("joinState"); - openapiFields.add("languages"); - openapiFields.add("lastPostCreatedAt"); - openapiFields.add("links"); - openapiFields.add("memberCount"); - openapiFields.add("memberCountSyncedAt"); - openapiFields.add("membershipStatus"); - openapiFields.add("myMember"); - openapiFields.add("name"); - openapiFields.add("onlineMemberCount"); - openapiFields.add("ownerId"); - openapiFields.add("privacy"); - openapiFields.add("roles"); - openapiFields.add("rules"); - openapiFields.add("shortCode"); - openapiFields.add("tags"); - openapiFields.add("transferTargetId"); - openapiFields.add("updatedAt"); + openapiFields = new HashSet(Arrays.asList("ageVerificationBetaCode", "ageVerificationBetaSlots", "ageVerificationSlotsAvailable", "allowGroupJoinPrompt", "badges", "bannerId", "bannerUrl", "createdAt", "description", "discriminator", "galleries", "iconId", "iconUrl", "id", "isVerified", "joinState", "languages", "lastPostCreatedAt", "links", "memberCount", "memberCountSyncedAt", "membershipStatus", "myMember", "name", "onlineMemberCount", "ownerId", "privacy", "roles", "rules", "shortCode", "tags", "transferTargetId", "updatedAt")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Group - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Group.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Group is not found in the empty JSON string", Group.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Group + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Group.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Group is not found in the empty JSON string", Group.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Group.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Group` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Group` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("ageVerificationBetaCode") != null && !jsonObj.get("ageVerificationBetaCode").isJsonNull()) && !jsonObj.get("ageVerificationBetaCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ageVerificationBetaCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ageVerificationBetaCode").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ageVerificationBetaCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ageVerificationBetaCode").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("badges") != null && !jsonObj.get("badges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `badges` to be an array in the JSON string but got `%s`", jsonObj.get("badges").toString())); + if (jsonObj.get("badges") != null && !jsonObj.get("badges").isJsonNull() && !jsonObj.get("badges").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badges` to be an array in the JSON string but got `%s`", jsonObj.get("badges").toString())); } if ((jsonObj.get("bannerId") != null && !jsonObj.get("bannerId").isJsonNull()) && !jsonObj.get("bannerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); } if ((jsonObj.get("bannerUrl") != null && !jsonObj.get("bannerUrl").isJsonNull()) && !jsonObj.get("bannerUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bannerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerUrl").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("discriminator") != null && !jsonObj.get("discriminator").isJsonNull()) && !jsonObj.get("discriminator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `discriminator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discriminator").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `discriminator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discriminator").toString())); } if (jsonObj.get("galleries") != null && !jsonObj.get("galleries").isJsonNull()) { JsonArray jsonArraygalleries = jsonObj.getAsJsonArray("galleries"); if (jsonArraygalleries != null) { // ensure the json data is an array if (!jsonObj.get("galleries").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `galleries` to be an array in the JSON string but got `%s`", jsonObj.get("galleries").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `galleries` to be an array in the JSON string but got `%s`", jsonObj.get("galleries").toString())); } // validate the optional field `galleries` (array) for (int i = 0; i < jsonArraygalleries.size(); i++) { - GroupGallery.validateJsonObject(jsonArraygalleries.get(i).getAsJsonObject()); + GroupGallery.validateJsonElement(jsonArraygalleries.get(i)); }; } } if ((jsonObj.get("iconId") != null && !jsonObj.get("iconId").isJsonNull()) && !jsonObj.get("iconId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); } if ((jsonObj.get("iconUrl") != null && !jsonObj.get("iconUrl").isJsonNull()) && !jsonObj.get("iconUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + // validate the optional field `joinState` + if (jsonObj.get("joinState") != null && !jsonObj.get("joinState").isJsonNull()) { + GroupJoinState.validateJsonElement(jsonObj.get("joinState")); } // ensure the optional json data is an array if present - if (jsonObj.get("languages") != null && !jsonObj.get("languages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `languages` to be an array in the JSON string but got `%s`", jsonObj.get("languages").toString())); + if (jsonObj.get("languages") != null && !jsonObj.get("languages").isJsonNull() && !jsonObj.get("languages").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `languages` to be an array in the JSON string but got `%s`", jsonObj.get("languages").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull() && !jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + // validate the optional field `membershipStatus` + if (jsonObj.get("membershipStatus") != null && !jsonObj.get("membershipStatus").isJsonNull()) { + GroupMemberStatus.validateJsonElement(jsonObj.get("membershipStatus")); } // validate the optional field `myMember` if (jsonObj.get("myMember") != null && !jsonObj.get("myMember").isJsonNull()) { - GroupMyMember.validateJsonObject(jsonObj.getAsJsonObject("myMember")); + GroupMyMember.validateJsonElement(jsonObj.get("myMember")); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + } + // validate the optional field `privacy` + if (jsonObj.get("privacy") != null && !jsonObj.get("privacy").isJsonNull()) { + GroupPrivacy.validateJsonElement(jsonObj.get("privacy")); } if (jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonNull()) { JsonArray jsonArrayroles = jsonObj.getAsJsonArray("roles"); if (jsonArrayroles != null) { // ensure the json data is an array if (!jsonObj.get("roles").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); } // validate the optional field `roles` (array) for (int i = 0; i < jsonArrayroles.size(); i++) { - GroupRole.validateJsonObject(jsonArrayroles.get(i).getAsJsonObject()); + GroupRole.validateJsonElement(jsonArrayroles.get(i)); }; } } if ((jsonObj.get("rules") != null && !jsonObj.get("rules").isJsonNull()) && !jsonObj.get("rules").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `rules` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rules").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `rules` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rules").toString())); } if ((jsonObj.get("shortCode") != null && !jsonObj.get("shortCode").isJsonNull()) && !jsonObj.get("shortCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("transferTargetId") != null && !jsonObj.get("transferTargetId").isJsonNull()) && !jsonObj.get("transferTargetId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTargetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTargetId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTargetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTargetId").toString())); } } @@ -1289,31 +1167,31 @@ public void write(JsonWriter out, Group value) throws IOException { @Override public Group read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Group given an JSON string - * - * @param jsonString JSON string - * @return An instance of Group - * @throws IOException if the JSON string is invalid with respect to Group - */ + /** + * Create an instance of Group given an JSON string + * + * @param jsonString JSON string + * @return An instance of Group + * @throws IOException if the JSON string is invalid with respect to Group + */ public static Group fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Group.class); } - /** - * Convert an instance of Group to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Group to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupAccessType.java b/src/main/java/io/github/vrchatapi/model/GroupAccessType.java index 799f66ff..836deed1 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupAccessType.java +++ b/src/main/java/io/github/vrchatapi/model/GroupAccessType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -71,5 +70,10 @@ public GroupAccessType read(final JsonReader jsonReader) throws IOException { return GroupAccessType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupAccessType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/GroupAnnouncement.java b/src/main/java/io/github/vrchatapi/model/GroupAnnouncement.java index df2c5e60..870f8f94 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupAnnouncement.java +++ b/src/main/java/io/github/vrchatapi/model/GroupAnnouncement.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,250 +49,223 @@ /** * GroupAnnouncement */ -@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 GroupAnnouncement { public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable private String authorId; public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nullable private String groupId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nullable private String imageId; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) + @javax.annotation.Nullable private String text; public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nullable private String title; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public GroupAnnouncement() { } - public GroupAnnouncement authorId(String authorId) { - + public GroupAnnouncement authorId(@javax.annotation.Nullable String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nullable String authorId) { this.authorId = authorId; } - public GroupAnnouncement createdAt(OffsetDateTime createdAt) { - + public GroupAnnouncement createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public GroupAnnouncement groupId(String groupId) { - + public GroupAnnouncement groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } - public GroupAnnouncement id(String id) { - + public GroupAnnouncement id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "gpos_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public GroupAnnouncement imageId(String imageId) { - + public GroupAnnouncement imageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; } - public GroupAnnouncement imageUrl(String imageUrl) { - + public GroupAnnouncement imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public GroupAnnouncement text(String text) { - + public GroupAnnouncement text(@javax.annotation.Nullable String text) { this.text = text; return this; } - /** + /** * Get text * @return text - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getText() { return text; } - - public void setText(String text) { + public void setText(@javax.annotation.Nullable String text) { this.text = text; } - public GroupAnnouncement title(String title) { - + public GroupAnnouncement title(@javax.annotation.Nullable String title) { this.title = title; return this; } - /** + /** * Get title * @return title - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getTitle() { return title; } - - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public GroupAnnouncement updatedAt(OffsetDateTime updatedAt) { - + public GroupAnnouncement updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -356,10 +329,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -368,61 +338,53 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authorId"); - openapiFields.add("createdAt"); - openapiFields.add("groupId"); - openapiFields.add("id"); - openapiFields.add("imageId"); - openapiFields.add("imageUrl"); - openapiFields.add("text"); - openapiFields.add("title"); - openapiFields.add("updatedAt"); + openapiFields = new HashSet(Arrays.asList("authorId", "createdAt", "groupId", "id", "imageId", "imageUrl", "text", "title", "updatedAt")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupAnnouncement - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupAnnouncement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupAnnouncement is not found in the empty JSON string", GroupAnnouncement.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupAnnouncement + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupAnnouncement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupAnnouncement is not found in the empty JSON string", GroupAnnouncement.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupAnnouncement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupAnnouncement` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupAnnouncement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("authorId") != null && !jsonObj.get("authorId").isJsonNull()) && !jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if ((jsonObj.get("groupId") != null && !jsonObj.get("groupId").isJsonNull()) && !jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } } @@ -446,31 +408,31 @@ public void write(JsonWriter out, GroupAnnouncement value) throws IOException { @Override public GroupAnnouncement read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupAnnouncement given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupAnnouncement - * @throws IOException if the JSON string is invalid with respect to GroupAnnouncement - */ + /** + * Create an instance of GroupAnnouncement given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupAnnouncement + * @throws IOException if the JSON string is invalid with respect to GroupAnnouncement + */ public static GroupAnnouncement fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupAnnouncement.class); } - /** - * Convert an instance of GroupAnnouncement to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupAnnouncement to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupAuditLogEntry.java b/src/main/java/io/github/vrchatapi/model/GroupAuditLogEntry.java index c8dcbe43..caa053aa 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupAuditLogEntry.java +++ b/src/main/java/io/github/vrchatapi/model/GroupAuditLogEntry.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,250 +48,223 @@ /** * GroupAuditLogEntry */ -@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 GroupAuditLogEntry { public static final String SERIALIZED_NAME_ACTOR_DISPLAY_NAME = "actorDisplayName"; @SerializedName(SERIALIZED_NAME_ACTOR_DISPLAY_NAME) + @javax.annotation.Nullable private String actorDisplayName; public static final String SERIALIZED_NAME_ACTOR_ID = "actorId"; @SerializedName(SERIALIZED_NAME_ACTOR_ID) + @javax.annotation.Nullable private String actorId; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable private Object data; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nullable private String eventType = "group.update"; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nullable private String groupId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_TARGET_ID = "targetId"; @SerializedName(SERIALIZED_NAME_TARGET_ID) + @javax.annotation.Nullable private String targetId; public GroupAuditLogEntry() { } - public GroupAuditLogEntry actorDisplayName(String actorDisplayName) { - + public GroupAuditLogEntry actorDisplayName(@javax.annotation.Nullable String actorDisplayName) { this.actorDisplayName = actorDisplayName; return this; } - /** + /** * Get actorDisplayName * @return actorDisplayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getActorDisplayName() { return actorDisplayName; } - - public void setActorDisplayName(String actorDisplayName) { + public void setActorDisplayName(@javax.annotation.Nullable String actorDisplayName) { this.actorDisplayName = actorDisplayName; } - public GroupAuditLogEntry actorId(String actorId) { - + public GroupAuditLogEntry actorId(@javax.annotation.Nullable String actorId) { this.actorId = actorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return actorId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getActorId() { return actorId; } - - public void setActorId(String actorId) { + public void setActorId(@javax.annotation.Nullable String actorId) { this.actorId = actorId; } - public GroupAuditLogEntry createdAt(OffsetDateTime createdAt) { - + public GroupAuditLogEntry createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public GroupAuditLogEntry data(Object data) { - + public GroupAuditLogEntry data(@javax.annotation.Nullable Object data) { this.data = data; return this; } - /** + /** * The data associated with the event. The format of this data is dependent on the event type. * @return data - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "{\"description\":{\"new\":\"My exciting new group. It's pretty nifty!\",\"old\":\"My exciting new group. It's pretty nifty!\"},\"joinState\":{\"new\":\"request\",\"old\":\"closed\"}}", value = "The data associated with the event. The format of this data is dependent on the event type.") - public Object getData() { return data; } - - public void setData(Object data) { + public void setData(@javax.annotation.Nullable Object data) { this.data = data; } - public GroupAuditLogEntry description(String description) { - + public GroupAuditLogEntry description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * A human-readable description of the event. * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Group role updated", value = "A human-readable description of the event.") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public GroupAuditLogEntry eventType(String eventType) { - + public GroupAuditLogEntry eventType(@javax.annotation.Nullable String eventType) { this.eventType = eventType; return this; } - /** + /** * The type of event that occurred. This is a string that is prefixed with the type of object that the event occurred on. For example, a group role update event would be prefixed with `group.role`. * @return eventType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "group.role.update", value = "The type of event that occurred. This is a string that is prefixed with the type of object that the event occurred on. For example, a group role update event would be prefixed with `group.role`.") - public String getEventType() { return eventType; } - - public void setEventType(String eventType) { + public void setEventType(@javax.annotation.Nullable String eventType) { this.eventType = eventType; } - public GroupAuditLogEntry groupId(String groupId) { - + public GroupAuditLogEntry groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } - public GroupAuditLogEntry id(String id) { - + public GroupAuditLogEntry id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "gaud_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public GroupAuditLogEntry targetId(String targetId) { - + public GroupAuditLogEntry targetId(@javax.annotation.Nullable String targetId) { this.targetId = targetId; return this; } - /** + /** * Typically a UserID, GroupID, GroupRoleID, or Location, but could be other types of IDs. * @return targetId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Typically a UserID, GroupID, GroupRoleID, or Location, but could be other types of IDs.") - public String getTargetId() { return targetId; } - - public void setTargetId(String targetId) { + public void setTargetId(@javax.annotation.Nullable String targetId) { this.targetId = targetId; } @@ -344,10 +317,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -356,61 +326,53 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("actorDisplayName"); - openapiFields.add("actorId"); - openapiFields.add("created_at"); - openapiFields.add("data"); - openapiFields.add("description"); - openapiFields.add("eventType"); - openapiFields.add("groupId"); - openapiFields.add("id"); - openapiFields.add("targetId"); + openapiFields = new HashSet(Arrays.asList("actorDisplayName", "actorId", "created_at", "data", "description", "eventType", "groupId", "id", "targetId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupAuditLogEntry - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupAuditLogEntry.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupAuditLogEntry is not found in the empty JSON string", GroupAuditLogEntry.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupAuditLogEntry + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupAuditLogEntry.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupAuditLogEntry is not found in the empty JSON string", GroupAuditLogEntry.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupAuditLogEntry.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupAuditLogEntry` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupAuditLogEntry` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("actorDisplayName") != null && !jsonObj.get("actorDisplayName").isJsonNull()) && !jsonObj.get("actorDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `actorDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("actorDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `actorDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("actorDisplayName").toString())); } if ((jsonObj.get("actorId") != null && !jsonObj.get("actorId").isJsonNull()) && !jsonObj.get("actorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `actorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("actorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `actorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("actorId").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("groupId") != null && !jsonObj.get("groupId").isJsonNull()) && !jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("targetId") != null && !jsonObj.get("targetId").isJsonNull()) && !jsonObj.get("targetId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `targetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `targetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetId").toString())); } } @@ -434,31 +396,31 @@ public void write(JsonWriter out, GroupAuditLogEntry value) throws IOException { @Override public GroupAuditLogEntry read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupAuditLogEntry given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupAuditLogEntry - * @throws IOException if the JSON string is invalid with respect to GroupAuditLogEntry - */ + /** + * Create an instance of GroupAuditLogEntry given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupAuditLogEntry + * @throws IOException if the JSON string is invalid with respect to GroupAuditLogEntry + */ public static GroupAuditLogEntry fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupAuditLogEntry.class); } - /** - * Convert an instance of GroupAuditLogEntry to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupAuditLogEntry to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupGallery.java b/src/main/java/io/github/vrchatapi/model/GroupGallery.java index bfcfc500..8c6c1f41 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupGallery.java +++ b/src/main/java/io/github/vrchatapi/model/GroupGallery.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,168 +51,157 @@ /** * GroupGallery */ -@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 GroupGallery { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_MEMBERS_ONLY = "membersOnly"; @SerializedName(SERIALIZED_NAME_MEMBERS_ONLY) + @javax.annotation.Nullable private Boolean membersOnly = false; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_ROLE_IDS_TO_AUTO_APPROVE = "roleIdsToAutoApprove"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_AUTO_APPROVE) - private List roleIdsToAutoApprove = null; + @javax.annotation.Nullable + private List roleIdsToAutoApprove; public static final String SERIALIZED_NAME_ROLE_IDS_TO_MANAGE = "roleIdsToManage"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_MANAGE) - private List roleIdsToManage = null; + @javax.annotation.Nullable + private List roleIdsToManage; public static final String SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT = "roleIdsToSubmit"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT) - private List roleIdsToSubmit = null; + @javax.annotation.Nullable + private List roleIdsToSubmit; public static final String SERIALIZED_NAME_ROLE_IDS_TO_VIEW = "roleIdsToView"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_VIEW) - private List roleIdsToView = null; + @javax.annotation.Nullable + private List roleIdsToView; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public GroupGallery() { } - public GroupGallery createdAt(OffsetDateTime createdAt) { - + public GroupGallery createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public GroupGallery description(String description) { - + public GroupGallery description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Description of the gallery. * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Example Description", value = "Description of the gallery.") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public GroupGallery id(String id) { - + public GroupGallery id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "ggal_a03a4b55-4ca6-4490-9519-40ba6351a233", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public GroupGallery membersOnly(Boolean membersOnly) { - + public GroupGallery membersOnly(@javax.annotation.Nullable Boolean membersOnly) { this.membersOnly = membersOnly; return this; } - /** + /** * Whether the gallery is members only. * @return membersOnly - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "Whether the gallery is members only.") - public Boolean getMembersOnly() { return membersOnly; } - - public void setMembersOnly(Boolean membersOnly) { + public void setMembersOnly(@javax.annotation.Nullable Boolean membersOnly) { this.membersOnly = membersOnly; } - public GroupGallery name(String name) { - + public GroupGallery name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Name of the gallery. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Example Gallery", value = "Name of the gallery.") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public GroupGallery roleIdsToAutoApprove(List roleIdsToAutoApprove) { - + public GroupGallery roleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { this.roleIdsToAutoApprove = roleIdsToAutoApprove; return this; } @@ -225,25 +214,21 @@ public GroupGallery addRoleIdsToAutoApproveItem(String roleIdsToAutoApproveItem) return this; } - /** + /** * * @return roleIdsToAutoApprove - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToAutoApprove() { return roleIdsToAutoApprove; } - - public void setRoleIdsToAutoApprove(List roleIdsToAutoApprove) { + public void setRoleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { this.roleIdsToAutoApprove = roleIdsToAutoApprove; } - public GroupGallery roleIdsToManage(List roleIdsToManage) { - + public GroupGallery roleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { this.roleIdsToManage = roleIdsToManage; return this; } @@ -256,25 +241,21 @@ public GroupGallery addRoleIdsToManageItem(String roleIdsToManageItem) { return this; } - /** + /** * * @return roleIdsToManage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToManage() { return roleIdsToManage; } - - public void setRoleIdsToManage(List roleIdsToManage) { + public void setRoleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { this.roleIdsToManage = roleIdsToManage; } - public GroupGallery roleIdsToSubmit(List roleIdsToSubmit) { - + public GroupGallery roleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { this.roleIdsToSubmit = roleIdsToSubmit; return this; } @@ -287,25 +268,21 @@ public GroupGallery addRoleIdsToSubmitItem(String roleIdsToSubmitItem) { return this; } - /** + /** * * @return roleIdsToSubmit - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToSubmit() { return roleIdsToSubmit; } - - public void setRoleIdsToSubmit(List roleIdsToSubmit) { + public void setRoleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { this.roleIdsToSubmit = roleIdsToSubmit; } - public GroupGallery roleIdsToView(List roleIdsToView) { - + public GroupGallery roleIdsToView(@javax.annotation.Nullable List roleIdsToView) { this.roleIdsToView = roleIdsToView; return this; } @@ -318,42 +295,35 @@ public GroupGallery addRoleIdsToViewItem(String roleIdsToViewItem) { return this; } - /** + /** * * @return roleIdsToView - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToView() { return roleIdsToView; } - - public void setRoleIdsToView(List roleIdsToView) { + public void setRoleIdsToView(@javax.annotation.Nullable List roleIdsToView) { this.roleIdsToView = roleIdsToView; } - public GroupGallery updatedAt(OffsetDateTime updatedAt) { - + public GroupGallery updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -419,10 +389,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -431,66 +398,57 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("membersOnly"); - openapiFields.add("name"); - openapiFields.add("roleIdsToAutoApprove"); - openapiFields.add("roleIdsToManage"); - openapiFields.add("roleIdsToSubmit"); - openapiFields.add("roleIdsToView"); - openapiFields.add("updatedAt"); + openapiFields = new HashSet(Arrays.asList("createdAt", "description", "id", "membersOnly", "name", "roleIdsToAutoApprove", "roleIdsToManage", "roleIdsToSubmit", "roleIdsToView", "updatedAt")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupGallery - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupGallery.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupGallery is not found in the empty JSON string", GroupGallery.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupGallery + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupGallery.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupGallery is not found in the empty JSON string", GroupGallery.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupGallery.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupGallery` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupGallery` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToAutoApprove") != null && !jsonObj.get("roleIdsToAutoApprove").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToAutoApprove` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToAutoApprove").toString())); + if (jsonObj.get("roleIdsToAutoApprove") != null && !jsonObj.get("roleIdsToAutoApprove").isJsonNull() && !jsonObj.get("roleIdsToAutoApprove").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToAutoApprove` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToAutoApprove").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToManage") != null && !jsonObj.get("roleIdsToManage").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToManage` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToManage").toString())); + if (jsonObj.get("roleIdsToManage") != null && !jsonObj.get("roleIdsToManage").isJsonNull() && !jsonObj.get("roleIdsToManage").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToManage` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToManage").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToSubmit") != null && !jsonObj.get("roleIdsToSubmit").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToSubmit` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToSubmit").toString())); + if (jsonObj.get("roleIdsToSubmit") != null && !jsonObj.get("roleIdsToSubmit").isJsonNull() && !jsonObj.get("roleIdsToSubmit").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToSubmit` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToSubmit").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToView") != null && !jsonObj.get("roleIdsToView").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToView` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToView").toString())); + if (jsonObj.get("roleIdsToView") != null && !jsonObj.get("roleIdsToView").isJsonNull() && !jsonObj.get("roleIdsToView").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToView` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToView").toString())); } } @@ -514,31 +472,31 @@ public void write(JsonWriter out, GroupGallery value) throws IOException { @Override public GroupGallery read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupGallery given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupGallery - * @throws IOException if the JSON string is invalid with respect to GroupGallery - */ + /** + * Create an instance of GroupGallery given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupGallery + * @throws IOException if the JSON string is invalid with respect to GroupGallery + */ public static GroupGallery fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupGallery.class); } - /** - * Convert an instance of GroupGallery to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupGallery to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrder.java b/src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrder.java index aa9b26eb..77d119e2 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrder.java +++ b/src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrder.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,39 +49,39 @@ /** * GroupGalleryFileOrder */ -@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 GroupGalleryFileOrder { public static final String SERIALIZED_NAME_IDS = "ids"; @SerializedName(SERIALIZED_NAME_IDS) + @javax.annotation.Nonnull private List ids = new ArrayList<>(); public GroupGalleryFileOrder() { } - public GroupGalleryFileOrder ids(List ids) { - + public GroupGalleryFileOrder ids(@javax.annotation.Nonnull List ids) { this.ids = ids; return this; } public GroupGalleryFileOrder addIdsItem(String idsItem) { + if (this.ids == null) { + this.ids = new ArrayList<>(); + } this.ids.add(idsItem); return this; } - /** + /** * Get ids * @return ids - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getIds() { return ids; } - - public void setIds(List ids) { + public void setIds(@javax.annotation.Nonnull List ids) { this.ids = ids; } @@ -118,10 +118,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -130,46 +127,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ids"); + openapiFields = new HashSet(Arrays.asList("ids")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ids"); + openapiRequiredFields = new HashSet(Arrays.asList("ids")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupGalleryFileOrder - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupGalleryFileOrder.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupGalleryFileOrder is not found in the empty JSON string", GroupGalleryFileOrder.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupGalleryFileOrder + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupGalleryFileOrder.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupGalleryFileOrder is not found in the empty JSON string", GroupGalleryFileOrder.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupGalleryFileOrder.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupGalleryFileOrder` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupGalleryFileOrder` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : GroupGalleryFileOrder.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("ids") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("ids").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ids` to be an array in the JSON string but got `%s`", jsonObj.get("ids").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ids` to be an array in the JSON string but got `%s`", jsonObj.get("ids").toString())); } } @@ -193,31 +189,31 @@ public void write(JsonWriter out, GroupGalleryFileOrder value) throws IOExceptio @Override public GroupGalleryFileOrder read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupGalleryFileOrder given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupGalleryFileOrder - * @throws IOException if the JSON string is invalid with respect to GroupGalleryFileOrder - */ + /** + * Create an instance of GroupGalleryFileOrder given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupGalleryFileOrder + * @throws IOException if the JSON string is invalid with respect to GroupGalleryFileOrder + */ public static GroupGalleryFileOrder fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupGalleryFileOrder.class); } - /** - * Convert an instance of GroupGalleryFileOrder to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupGalleryFileOrder to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrderRequest.java b/src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrderRequest.java index 635f7ef7..91064371 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrderRequest.java +++ b/src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrderRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,66 +49,63 @@ /** * GroupGalleryFileOrderRequest */ -@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 GroupGalleryFileOrderRequest { public static final String SERIALIZED_NAME_GALLERY_ID = "galleryId"; @SerializedName(SERIALIZED_NAME_GALLERY_ID) + @javax.annotation.Nonnull private String galleryId; public static final String SERIALIZED_NAME_IDS = "ids"; @SerializedName(SERIALIZED_NAME_IDS) + @javax.annotation.Nonnull private List ids = new ArrayList<>(); public GroupGalleryFileOrderRequest() { } - public GroupGalleryFileOrderRequest galleryId(String galleryId) { - + public GroupGalleryFileOrderRequest galleryId(@javax.annotation.Nonnull String galleryId) { this.galleryId = galleryId; return this; } - /** + /** * Get galleryId * @return galleryId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "ggal_a03a4b55-4ca6-4490-9519-40ba6351a233", required = true, value = "") - public String getGalleryId() { return galleryId; } - - public void setGalleryId(String galleryId) { + public void setGalleryId(@javax.annotation.Nonnull String galleryId) { this.galleryId = galleryId; } - public GroupGalleryFileOrderRequest ids(List ids) { - + public GroupGalleryFileOrderRequest ids(@javax.annotation.Nonnull List ids) { this.ids = ids; return this; } public GroupGalleryFileOrderRequest addIdsItem(String idsItem) { + if (this.ids == null) { + this.ids = new ArrayList<>(); + } this.ids.add(idsItem); return this; } - /** + /** * Get ids * @return ids - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getIds() { return ids; } - - public void setIds(List ids) { + public void setIds(@javax.annotation.Nonnull List ids) { this.ids = ids; } @@ -147,10 +144,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -159,51 +153,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("galleryId"); - openapiFields.add("ids"); + openapiFields = new HashSet(Arrays.asList("galleryId", "ids")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("galleryId"); - openapiRequiredFields.add("ids"); + openapiRequiredFields = new HashSet(Arrays.asList("galleryId", "ids")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupGalleryFileOrderRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupGalleryFileOrderRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupGalleryFileOrderRequest is not found in the empty JSON string", GroupGalleryFileOrderRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupGalleryFileOrderRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupGalleryFileOrderRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupGalleryFileOrderRequest is not found in the empty JSON string", GroupGalleryFileOrderRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupGalleryFileOrderRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupGalleryFileOrderRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupGalleryFileOrderRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : GroupGalleryFileOrderRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("galleryId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `galleryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("galleryId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `galleryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("galleryId").toString())); } // ensure the required json array is present if (jsonObj.get("ids") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("ids").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ids` to be an array in the JSON string but got `%s`", jsonObj.get("ids").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ids` to be an array in the JSON string but got `%s`", jsonObj.get("ids").toString())); } } @@ -227,31 +218,31 @@ public void write(JsonWriter out, GroupGalleryFileOrderRequest value) throws IOE @Override public GroupGalleryFileOrderRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupGalleryFileOrderRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupGalleryFileOrderRequest - * @throws IOException if the JSON string is invalid with respect to GroupGalleryFileOrderRequest - */ + /** + * Create an instance of GroupGalleryFileOrderRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupGalleryFileOrderRequest + * @throws IOException if the JSON string is invalid with respect to GroupGalleryFileOrderRequest + */ public static GroupGalleryFileOrderRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupGalleryFileOrderRequest.class); } - /** - * Convert an instance of GroupGalleryFileOrderRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupGalleryFileOrderRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupGalleryImage.java b/src/main/java/io/github/vrchatapi/model/GroupGalleryImage.java index 47979784..61d30c67 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupGalleryImage.java +++ b/src/main/java/io/github/vrchatapi/model/GroupGalleryImage.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.net.URI; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,277 +49,247 @@ /** * GroupGalleryImage */ -@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 GroupGalleryImage { public static final String SERIALIZED_NAME_APPROVED = "approved"; @SerializedName(SERIALIZED_NAME_APPROVED) + @javax.annotation.Nullable private Boolean approved = false; public static final String SERIALIZED_NAME_APPROVED_AT = "approvedAt"; @SerializedName(SERIALIZED_NAME_APPROVED_AT) + @javax.annotation.Nullable private OffsetDateTime approvedAt; public static final String SERIALIZED_NAME_APPROVED_BY_USER_ID = "approvedByUserId"; @SerializedName(SERIALIZED_NAME_APPROVED_BY_USER_ID) + @javax.annotation.Nullable private String approvedByUserId; public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_FILE_ID = "fileId"; @SerializedName(SERIALIZED_NAME_FILE_ID) + @javax.annotation.Nullable private String fileId; public static final String SERIALIZED_NAME_GALLERY_ID = "galleryId"; @SerializedName(SERIALIZED_NAME_GALLERY_ID) + @javax.annotation.Nullable private String galleryId; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nullable private String groupId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private URI imageUrl; public static final String SERIALIZED_NAME_SUBMITTED_BY_USER_ID = "submittedByUserId"; @SerializedName(SERIALIZED_NAME_SUBMITTED_BY_USER_ID) + @javax.annotation.Nullable private String submittedByUserId; public GroupGalleryImage() { } - public GroupGalleryImage approved(Boolean approved) { - + public GroupGalleryImage approved(@javax.annotation.Nullable Boolean approved) { this.approved = approved; return this; } - /** + /** * Get approved * @return approved - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - public Boolean getApproved() { return approved; } - - public void setApproved(Boolean approved) { + public void setApproved(@javax.annotation.Nullable Boolean approved) { this.approved = approved; } - public GroupGalleryImage approvedAt(OffsetDateTime approvedAt) { - + public GroupGalleryImage approvedAt(@javax.annotation.Nullable OffsetDateTime approvedAt) { this.approvedAt = approvedAt; return this; } - /** + /** * Get approvedAt * @return approvedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getApprovedAt() { return approvedAt; } - - public void setApprovedAt(OffsetDateTime approvedAt) { + public void setApprovedAt(@javax.annotation.Nullable OffsetDateTime approvedAt) { this.approvedAt = approvedAt; } - public GroupGalleryImage approvedByUserId(String approvedByUserId) { - + public GroupGalleryImage approvedByUserId(@javax.annotation.Nullable String approvedByUserId) { this.approvedByUserId = approvedByUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return approvedByUserId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getApprovedByUserId() { return approvedByUserId; } - - public void setApprovedByUserId(String approvedByUserId) { + public void setApprovedByUserId(@javax.annotation.Nullable String approvedByUserId) { this.approvedByUserId = approvedByUserId; } - public GroupGalleryImage createdAt(OffsetDateTime createdAt) { - + public GroupGalleryImage createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public GroupGalleryImage fileId(String fileId) { - + public GroupGalleryImage fileId(@javax.annotation.Nullable String fileId) { this.fileId = fileId; return this; } - /** + /** * Get fileId * @return fileId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getFileId() { return fileId; } - - public void setFileId(String fileId) { + public void setFileId(@javax.annotation.Nullable String fileId) { this.fileId = fileId; } - public GroupGalleryImage galleryId(String galleryId) { - + public GroupGalleryImage galleryId(@javax.annotation.Nullable String galleryId) { this.galleryId = galleryId; return this; } - /** + /** * Get galleryId * @return galleryId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "ggal_a03a4b55-4ca6-4490-9519-40ba6351a233", value = "") - public String getGalleryId() { return galleryId; } - - public void setGalleryId(String galleryId) { + public void setGalleryId(@javax.annotation.Nullable String galleryId) { this.galleryId = galleryId; } - public GroupGalleryImage groupId(String groupId) { - + public GroupGalleryImage groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } - public GroupGalleryImage id(String id) { - + public GroupGalleryImage id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "ggim_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public GroupGalleryImage imageUrl(URI imageUrl) { - + public GroupGalleryImage imageUrl(@javax.annotation.Nullable URI imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/file/file_ce35d830-e20a-4df0-a6d4-5aaef4508044/1/file", value = "") - public URI getImageUrl() { return imageUrl; } - - public void setImageUrl(URI imageUrl) { + public void setImageUrl(@javax.annotation.Nullable URI imageUrl) { this.imageUrl = imageUrl; } - public GroupGalleryImage submittedByUserId(String submittedByUserId) { - + public GroupGalleryImage submittedByUserId(@javax.annotation.Nullable String submittedByUserId) { this.submittedByUserId = submittedByUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return submittedByUserId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getSubmittedByUserId() { return submittedByUserId; } - - public void setSubmittedByUserId(String submittedByUserId) { + public void setSubmittedByUserId(@javax.annotation.Nullable String submittedByUserId) { this.submittedByUserId = submittedByUserId; } @@ -374,10 +344,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -386,62 +353,53 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("approved"); - openapiFields.add("approvedAt"); - openapiFields.add("approvedByUserId"); - openapiFields.add("createdAt"); - openapiFields.add("fileId"); - openapiFields.add("galleryId"); - openapiFields.add("groupId"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("submittedByUserId"); + openapiFields = new HashSet(Arrays.asList("approved", "approvedAt", "approvedByUserId", "createdAt", "fileId", "galleryId", "groupId", "id", "imageUrl", "submittedByUserId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupGalleryImage - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupGalleryImage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupGalleryImage is not found in the empty JSON string", GroupGalleryImage.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupGalleryImage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupGalleryImage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupGalleryImage is not found in the empty JSON string", GroupGalleryImage.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupGalleryImage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupGalleryImage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupGalleryImage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("approvedByUserId") != null && !jsonObj.get("approvedByUserId").isJsonNull()) && !jsonObj.get("approvedByUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `approvedByUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("approvedByUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `approvedByUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("approvedByUserId").toString())); } if ((jsonObj.get("fileId") != null && !jsonObj.get("fileId").isJsonNull()) && !jsonObj.get("fileId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileId").toString())); } if ((jsonObj.get("galleryId") != null && !jsonObj.get("galleryId").isJsonNull()) && !jsonObj.get("galleryId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `galleryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("galleryId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `galleryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("galleryId").toString())); } if ((jsonObj.get("groupId") != null && !jsonObj.get("groupId").isJsonNull()) && !jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if ((jsonObj.get("submittedByUserId") != null && !jsonObj.get("submittedByUserId").isJsonNull()) && !jsonObj.get("submittedByUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `submittedByUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("submittedByUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `submittedByUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("submittedByUserId").toString())); } } @@ -465,31 +423,31 @@ public void write(JsonWriter out, GroupGalleryImage value) throws IOException { @Override public GroupGalleryImage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupGalleryImage given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupGalleryImage - * @throws IOException if the JSON string is invalid with respect to GroupGalleryImage - */ + /** + * Create an instance of GroupGalleryImage given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupGalleryImage + * @throws IOException if the JSON string is invalid with respect to GroupGalleryImage + */ public static GroupGalleryImage fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupGalleryImage.class); } - /** - * Convert an instance of GroupGalleryImage to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupGalleryImage to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupInstance.java b/src/main/java/io/github/vrchatapi/model/GroupInstance.java index 8a854b81..c4971b23 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupInstance.java +++ b/src/main/java/io/github/vrchatapi/model/GroupInstance.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.World; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,116 +48,104 @@ /** * GroupInstance */ -@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 GroupInstance { public static final String SERIALIZED_NAME_INSTANCE_ID = "instanceId"; @SerializedName(SERIALIZED_NAME_INSTANCE_ID) + @javax.annotation.Nonnull private String instanceId; public static final String SERIALIZED_NAME_LOCATION = "location"; @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nonnull private String location; public static final String SERIALIZED_NAME_MEMBER_COUNT = "memberCount"; @SerializedName(SERIALIZED_NAME_MEMBER_COUNT) + @javax.annotation.Nonnull private Integer memberCount; public static final String SERIALIZED_NAME_WORLD = "world"; @SerializedName(SERIALIZED_NAME_WORLD) + @javax.annotation.Nonnull private World world; public GroupInstance() { } - public GroupInstance instanceId(String instanceId) { - + public GroupInstance instanceId(@javax.annotation.Nonnull String instanceId) { this.instanceId = instanceId; return this; } - /** + /** * InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. * @return instanceId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)", required = true, value = "InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance.") - public String getInstanceId() { return instanceId; } - - public void setInstanceId(String instanceId) { + public void setInstanceId(@javax.annotation.Nonnull String instanceId) { this.instanceId = instanceId; } - public GroupInstance location(String location) { - + public GroupInstance location(@javax.annotation.Nonnull String location) { this.location = location; return this; } - /** + /** * Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list. * @return location - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd:12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)", required = true, value = "Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list.") - public String getLocation() { return location; } - - public void setLocation(String location) { + public void setLocation(@javax.annotation.Nonnull String location) { this.location = location; } - public GroupInstance memberCount(Integer memberCount) { - + public GroupInstance memberCount(@javax.annotation.Nonnull Integer memberCount) { this.memberCount = memberCount; return this; } - /** + /** * Get memberCount * minimum: 0 * @return memberCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "6", required = true, value = "") - public Integer getMemberCount() { return memberCount; } - - public void setMemberCount(Integer memberCount) { + public void setMemberCount(@javax.annotation.Nonnull Integer memberCount) { this.memberCount = memberCount; } - public GroupInstance world(World world) { - + public GroupInstance world(@javax.annotation.Nonnull World world) { this.world = world; return this; } - /** + /** * Get world * @return world - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public World getWorld() { return world; } - - public void setWorld(World world) { + public void setWorld(@javax.annotation.Nonnull World world) { this.world = world; } @@ -200,10 +188,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -212,55 +197,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("instanceId"); - openapiFields.add("location"); - openapiFields.add("memberCount"); - openapiFields.add("world"); + openapiFields = new HashSet(Arrays.asList("instanceId", "location", "memberCount", "world")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("instanceId"); - openapiRequiredFields.add("location"); - openapiRequiredFields.add("memberCount"); - openapiRequiredFields.add("world"); + openapiRequiredFields = new HashSet(Arrays.asList("instanceId", "location", "memberCount", "world")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupInstance - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupInstance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupInstance is not found in the empty JSON string", GroupInstance.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupInstance + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupInstance.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupInstance is not found in the empty JSON string", GroupInstance.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupInstance.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupInstance` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupInstance` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : GroupInstance.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("instanceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `instanceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `instanceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceId").toString())); } if (!jsonObj.get("location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); } // validate the required field `world` - World.validateJsonObject(jsonObj.getAsJsonObject("world")); + World.validateJsonElement(jsonObj.get("world")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -283,31 +261,31 @@ public void write(JsonWriter out, GroupInstance value) throws IOException { @Override public GroupInstance read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupInstance given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupInstance - * @throws IOException if the JSON string is invalid with respect to GroupInstance - */ + /** + * Create an instance of GroupInstance given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupInstance + * @throws IOException if the JSON string is invalid with respect to GroupInstance + */ public static GroupInstance fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupInstance.class); } - /** - * Convert an instance of GroupInstance to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupInstance to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupJoinRequestAction.java b/src/main/java/io/github/vrchatapi/model/GroupJoinRequestAction.java index a309f4c6..7681e3d0 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupJoinRequestAction.java +++ b/src/main/java/io/github/vrchatapi/model/GroupJoinRequestAction.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +68,10 @@ public GroupJoinRequestAction read(final JsonReader jsonReader) throws IOExcepti return GroupJoinRequestAction.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupJoinRequestAction.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/GroupJoinState.java b/src/main/java/io/github/vrchatapi/model/GroupJoinState.java index 7a18a107..2e322e21 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupJoinState.java +++ b/src/main/java/io/github/vrchatapi/model/GroupJoinState.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -72,5 +72,10 @@ public GroupJoinState read(final JsonReader jsonReader) throws IOException { return GroupJoinState.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupJoinState.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/GroupMember.java b/src/main/java/io/github/vrchatapi/model/GroupMember.java index 7020a6e6..afbdafbc 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupMember.java +++ b/src/main/java/io/github/vrchatapi/model/GroupMember.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,11 +20,10 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupMemberLimitedUser; import io.github.vrchatapi.model.GroupMemberStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -39,13 +37,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -53,531 +53,479 @@ /** * May be null when attempting to retrieve group membership for a user who is not part of the group */ -@ApiModel(description = "May be null when attempting to retrieve group membership for a user who is not part of the group") -@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 GroupMember { public static final String SERIALIZED_NAME_ACCEPTED_BY_DISPLAY_NAME = "acceptedByDisplayName"; @SerializedName(SERIALIZED_NAME_ACCEPTED_BY_DISPLAY_NAME) + @javax.annotation.Nullable private String acceptedByDisplayName; public static final String SERIALIZED_NAME_ACCEPTED_BY_ID = "acceptedById"; @SerializedName(SERIALIZED_NAME_ACCEPTED_BY_ID) + @javax.annotation.Nullable private String acceptedById; public static final String SERIALIZED_NAME_BANNED_AT = "bannedAt"; @SerializedName(SERIALIZED_NAME_BANNED_AT) + @javax.annotation.Nullable private OffsetDateTime bannedAt; public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nonnull private String groupId; public static final String SERIALIZED_NAME_HAS_JOINED_FROM_PURCHASE = "hasJoinedFromPurchase"; @SerializedName(SERIALIZED_NAME_HAS_JOINED_FROM_PURCHASE) + @javax.annotation.Nullable private Boolean hasJoinedFromPurchase; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IS_REPRESENTING = "isRepresenting"; @SerializedName(SERIALIZED_NAME_IS_REPRESENTING) + @javax.annotation.Nonnull private Boolean isRepresenting = false; public static final String SERIALIZED_NAME_IS_SUBSCRIBED_TO_ANNOUNCEMENTS = "isSubscribedToAnnouncements"; @SerializedName(SERIALIZED_NAME_IS_SUBSCRIBED_TO_ANNOUNCEMENTS) + @javax.annotation.Nonnull private Boolean isSubscribedToAnnouncements = false; public static final String SERIALIZED_NAME_IS_SUBSCRIBED_TO_EVENT_ANNOUNCEMENTS = "isSubscribedToEventAnnouncements"; @SerializedName(SERIALIZED_NAME_IS_SUBSCRIBED_TO_EVENT_ANNOUNCEMENTS) + @javax.annotation.Nullable private Boolean isSubscribedToEventAnnouncements; public static final String SERIALIZED_NAME_JOINED_AT = "joinedAt"; @SerializedName(SERIALIZED_NAME_JOINED_AT) + @javax.annotation.Nullable private OffsetDateTime joinedAt; public static final String SERIALIZED_NAME_LAST_POST_READ_AT = "lastPostReadAt"; @SerializedName(SERIALIZED_NAME_LAST_POST_READ_AT) + @javax.annotation.Nullable private OffsetDateTime lastPostReadAt; public static final String SERIALIZED_NAME_M_ROLE_IDS = "mRoleIds"; @SerializedName(SERIALIZED_NAME_M_ROLE_IDS) + @javax.annotation.Nonnull private List mRoleIds = new ArrayList<>(); public static final String SERIALIZED_NAME_MANAGER_NOTES = "managerNotes"; @SerializedName(SERIALIZED_NAME_MANAGER_NOTES) + @javax.annotation.Nullable private String managerNotes; public static final String SERIALIZED_NAME_MEMBERSHIP_STATUS = "membershipStatus"; @SerializedName(SERIALIZED_NAME_MEMBERSHIP_STATUS) + @javax.annotation.Nonnull private GroupMemberStatus membershipStatus = GroupMemberStatus.INACTIVE; public static final String SERIALIZED_NAME_ROLE_IDS = "roleIds"; @SerializedName(SERIALIZED_NAME_ROLE_IDS) + @javax.annotation.Nonnull private List roleIds = new ArrayList<>(); public static final String SERIALIZED_NAME_USER = "user"; @SerializedName(SERIALIZED_NAME_USER) + @javax.annotation.Nullable private GroupMemberLimitedUser user; public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nonnull private String userId; public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nonnull private String visibility; public GroupMember() { } - public GroupMember acceptedByDisplayName(String acceptedByDisplayName) { - + public GroupMember acceptedByDisplayName(@javax.annotation.Nullable String acceptedByDisplayName) { this.acceptedByDisplayName = acceptedByDisplayName; return this; } - /** + /** * Only missing when explicitly fetching own user. * @return acceptedByDisplayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only missing when explicitly fetching own user.") - public String getAcceptedByDisplayName() { return acceptedByDisplayName; } - - public void setAcceptedByDisplayName(String acceptedByDisplayName) { + public void setAcceptedByDisplayName(@javax.annotation.Nullable String acceptedByDisplayName) { this.acceptedByDisplayName = acceptedByDisplayName; } - public GroupMember acceptedById(String acceptedById) { - + public GroupMember acceptedById(@javax.annotation.Nullable String acceptedById) { this.acceptedById = acceptedById; return this; } - /** + /** * Only missing when explicitly fetching own user. * @return acceptedById - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only missing when explicitly fetching own user.") - public String getAcceptedById() { return acceptedById; } - - public void setAcceptedById(String acceptedById) { + public void setAcceptedById(@javax.annotation.Nullable String acceptedById) { this.acceptedById = acceptedById; } - public GroupMember bannedAt(OffsetDateTime bannedAt) { - + public GroupMember bannedAt(@javax.annotation.Nullable OffsetDateTime bannedAt) { this.bannedAt = bannedAt; return this; } - /** + /** * Only missing when explicitly fetching own user. * @return bannedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only missing when explicitly fetching own user.") - public OffsetDateTime getBannedAt() { return bannedAt; } - - public void setBannedAt(OffsetDateTime bannedAt) { + public void setBannedAt(@javax.annotation.Nullable OffsetDateTime bannedAt) { this.bannedAt = bannedAt; } - public GroupMember createdAt(OffsetDateTime createdAt) { - + public GroupMember createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Only missing when explicitly fetching own user. * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only missing when explicitly fetching own user.") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public GroupMember groupId(String groupId) { - + public GroupMember groupId(@javax.annotation.Nonnull String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", required = true, value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nonnull String groupId) { this.groupId = groupId; } - public GroupMember hasJoinedFromPurchase(Boolean hasJoinedFromPurchase) { - + public GroupMember hasJoinedFromPurchase(@javax.annotation.Nullable Boolean hasJoinedFromPurchase) { this.hasJoinedFromPurchase = hasJoinedFromPurchase; return this; } - /** + /** * Missing when explicitly fetching own user, or when group isn't linked to a purchase. * @return hasJoinedFromPurchase - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Missing when explicitly fetching own user, or when group isn't linked to a purchase.") - public Boolean getHasJoinedFromPurchase() { return hasJoinedFromPurchase; } - - public void setHasJoinedFromPurchase(Boolean hasJoinedFromPurchase) { + public void setHasJoinedFromPurchase(@javax.annotation.Nullable Boolean hasJoinedFromPurchase) { this.hasJoinedFromPurchase = hasJoinedFromPurchase; } - public GroupMember id(String id) { - + public GroupMember id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "gmem_95cdb3b4-4643-4eb6-bdab-46a4e1e5ce37", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public GroupMember isRepresenting(Boolean isRepresenting) { - + public GroupMember isRepresenting(@javax.annotation.Nonnull Boolean isRepresenting) { this.isRepresenting = isRepresenting; return this; } - /** + /** * Whether the user is representing the group. This makes the group show up above the name tag in-game. * @return isRepresenting - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "true", required = true, value = "Whether the user is representing the group. This makes the group show up above the name tag in-game.") - public Boolean getIsRepresenting() { return isRepresenting; } - - public void setIsRepresenting(Boolean isRepresenting) { + public void setIsRepresenting(@javax.annotation.Nonnull Boolean isRepresenting) { this.isRepresenting = isRepresenting; } - public GroupMember isSubscribedToAnnouncements(Boolean isSubscribedToAnnouncements) { - + public GroupMember isSubscribedToAnnouncements(@javax.annotation.Nonnull Boolean isSubscribedToAnnouncements) { this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; return this; } - /** + /** * Get isSubscribedToAnnouncements * @return isSubscribedToAnnouncements - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsSubscribedToAnnouncements() { return isSubscribedToAnnouncements; } - - public void setIsSubscribedToAnnouncements(Boolean isSubscribedToAnnouncements) { + public void setIsSubscribedToAnnouncements(@javax.annotation.Nonnull Boolean isSubscribedToAnnouncements) { this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; } - public GroupMember isSubscribedToEventAnnouncements(Boolean isSubscribedToEventAnnouncements) { - + public GroupMember isSubscribedToEventAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToEventAnnouncements) { this.isSubscribedToEventAnnouncements = isSubscribedToEventAnnouncements; return this; } - /** + /** * Only missing when explicitly fetching own user. * @return isSubscribedToEventAnnouncements - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only missing when explicitly fetching own user.") - public Boolean getIsSubscribedToEventAnnouncements() { return isSubscribedToEventAnnouncements; } - - public void setIsSubscribedToEventAnnouncements(Boolean isSubscribedToEventAnnouncements) { + public void setIsSubscribedToEventAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToEventAnnouncements) { this.isSubscribedToEventAnnouncements = isSubscribedToEventAnnouncements; } - public GroupMember joinedAt(OffsetDateTime joinedAt) { - + public GroupMember joinedAt(@javax.annotation.Nullable OffsetDateTime joinedAt) { this.joinedAt = joinedAt; return this; } - /** + /** * Get joinedAt * @return joinedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getJoinedAt() { return joinedAt; } - - public void setJoinedAt(OffsetDateTime joinedAt) { + public void setJoinedAt(@javax.annotation.Nullable OffsetDateTime joinedAt) { this.joinedAt = joinedAt; } - public GroupMember lastPostReadAt(OffsetDateTime lastPostReadAt) { - + public GroupMember lastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { this.lastPostReadAt = lastPostReadAt; return this; } - /** + /** * Get lastPostReadAt * @return lastPostReadAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getLastPostReadAt() { return lastPostReadAt; } - - public void setLastPostReadAt(OffsetDateTime lastPostReadAt) { + public void setLastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { this.lastPostReadAt = lastPostReadAt; } - public GroupMember mRoleIds(List mRoleIds) { - + public GroupMember mRoleIds(@javax.annotation.Nonnull List mRoleIds) { this.mRoleIds = mRoleIds; return this; } public GroupMember addMRoleIdsItem(String mRoleIdsItem) { + if (this.mRoleIds == null) { + this.mRoleIds = new ArrayList<>(); + } this.mRoleIds.add(mRoleIdsItem); return this; } - /** + /** * Get mRoleIds * @return mRoleIds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getmRoleIds() { return mRoleIds; } - - public void setmRoleIds(List mRoleIds) { + public void setmRoleIds(@javax.annotation.Nonnull List mRoleIds) { this.mRoleIds = mRoleIds; } - public GroupMember managerNotes(String managerNotes) { - + public GroupMember managerNotes(@javax.annotation.Nullable String managerNotes) { this.managerNotes = managerNotes; return this; } - /** + /** * Only missing when explicitly fetching own user. * @return managerNotes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only missing when explicitly fetching own user.") - public String getManagerNotes() { return managerNotes; } - - public void setManagerNotes(String managerNotes) { + public void setManagerNotes(@javax.annotation.Nullable String managerNotes) { this.managerNotes = managerNotes; } - public GroupMember membershipStatus(GroupMemberStatus membershipStatus) { - + public GroupMember membershipStatus(@javax.annotation.Nonnull GroupMemberStatus membershipStatus) { this.membershipStatus = membershipStatus; return this; } - /** + /** * Get membershipStatus * @return membershipStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public GroupMemberStatus getMembershipStatus() { return membershipStatus; } - - public void setMembershipStatus(GroupMemberStatus membershipStatus) { + public void setMembershipStatus(@javax.annotation.Nonnull GroupMemberStatus membershipStatus) { this.membershipStatus = membershipStatus; } - public GroupMember roleIds(List roleIds) { - + public GroupMember roleIds(@javax.annotation.Nonnull List roleIds) { this.roleIds = roleIds; return this; } public GroupMember addRoleIdsItem(String roleIdsItem) { + if (this.roleIds == null) { + this.roleIds = new ArrayList<>(); + } this.roleIds.add(roleIdsItem); return this; } - /** + /** * Get roleIds * @return roleIds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getRoleIds() { return roleIds; } - - public void setRoleIds(List roleIds) { + public void setRoleIds(@javax.annotation.Nonnull List roleIds) { this.roleIds = roleIds; } - public GroupMember user(GroupMemberLimitedUser user) { - + public GroupMember user(@javax.annotation.Nullable GroupMemberLimitedUser user) { this.user = user; return this; } - /** + /** * Get user * @return user - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupMemberLimitedUser getUser() { return user; } - - public void setUser(GroupMemberLimitedUser user) { + public void setUser(@javax.annotation.Nullable GroupMemberLimitedUser user) { this.user = user; } - public GroupMember userId(String userId) { - + public GroupMember userId(@javax.annotation.Nonnull String userId) { this.userId = userId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return userId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getUserId() { return userId; } - - public void setUserId(String userId) { + public void setUserId(@javax.annotation.Nonnull String userId) { this.userId = userId; } - public GroupMember visibility(String visibility) { - + public GroupMember visibility(@javax.annotation.Nonnull String visibility) { this.visibility = visibility; return this; } - /** + /** * Get visibility * @return visibility - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "visible", required = true, value = "") - public String getVisibility() { return visibility; } - - public void setVisibility(String visibility) { + public void setVisibility(@javax.annotation.Nonnull String visibility) { this.visibility = visibility; } @@ -661,10 +609,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -673,105 +618,78 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("acceptedByDisplayName"); - openapiFields.add("acceptedById"); - openapiFields.add("bannedAt"); - openapiFields.add("createdAt"); - openapiFields.add("groupId"); - openapiFields.add("hasJoinedFromPurchase"); - openapiFields.add("id"); - openapiFields.add("isRepresenting"); - openapiFields.add("isSubscribedToAnnouncements"); - openapiFields.add("isSubscribedToEventAnnouncements"); - openapiFields.add("joinedAt"); - openapiFields.add("lastPostReadAt"); - openapiFields.add("mRoleIds"); - openapiFields.add("managerNotes"); - openapiFields.add("membershipStatus"); - openapiFields.add("roleIds"); - openapiFields.add("user"); - openapiFields.add("userId"); - openapiFields.add("visibility"); + openapiFields = new HashSet(Arrays.asList("acceptedByDisplayName", "acceptedById", "bannedAt", "createdAt", "groupId", "hasJoinedFromPurchase", "id", "isRepresenting", "isSubscribedToAnnouncements", "isSubscribedToEventAnnouncements", "joinedAt", "lastPostReadAt", "mRoleIds", "managerNotes", "membershipStatus", "roleIds", "user", "userId", "visibility")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("groupId"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("isRepresenting"); - openapiRequiredFields.add("isSubscribedToAnnouncements"); - openapiRequiredFields.add("joinedAt"); - openapiRequiredFields.add("lastPostReadAt"); - openapiRequiredFields.add("mRoleIds"); - openapiRequiredFields.add("membershipStatus"); - openapiRequiredFields.add("roleIds"); - openapiRequiredFields.add("userId"); - openapiRequiredFields.add("visibility"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupMember - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupMember is not found in the empty JSON string", GroupMember.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("groupId", "id", "isRepresenting", "isSubscribedToAnnouncements", "joinedAt", "lastPostReadAt", "mRoleIds", "membershipStatus", "roleIds", "userId", "visibility")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupMember + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupMember is not found in the empty JSON string", GroupMember.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupMember.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupMember` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupMember` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : GroupMember.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("acceptedByDisplayName") != null && !jsonObj.get("acceptedByDisplayName").isJsonNull()) && !jsonObj.get("acceptedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `acceptedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acceptedByDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `acceptedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acceptedByDisplayName").toString())); } if ((jsonObj.get("acceptedById") != null && !jsonObj.get("acceptedById").isJsonNull()) && !jsonObj.get("acceptedById").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `acceptedById` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acceptedById").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `acceptedById` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acceptedById").toString())); } if (!jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // ensure the required json array is present if (jsonObj.get("mRoleIds") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("mRoleIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `mRoleIds` to be an array in the JSON string but got `%s`", jsonObj.get("mRoleIds").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mRoleIds` to be an array in the JSON string but got `%s`", jsonObj.get("mRoleIds").toString())); } if ((jsonObj.get("managerNotes") != null && !jsonObj.get("managerNotes").isJsonNull()) && !jsonObj.get("managerNotes").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `managerNotes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("managerNotes").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `managerNotes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("managerNotes").toString())); } + // validate the required field `membershipStatus` + GroupMemberStatus.validateJsonElement(jsonObj.get("membershipStatus")); // ensure the required json array is present if (jsonObj.get("roleIds") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("roleIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); } // validate the optional field `user` if (jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) { - GroupMemberLimitedUser.validateJsonObject(jsonObj.getAsJsonObject("user")); + GroupMemberLimitedUser.validateJsonElement(jsonObj.get("user")); } if (!jsonObj.get("userId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); } if (!jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); } } @@ -795,31 +713,31 @@ public void write(JsonWriter out, GroupMember value) throws IOException { @Override public GroupMember read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupMember given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupMember - * @throws IOException if the JSON string is invalid with respect to GroupMember - */ + /** + * Create an instance of GroupMember given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupMember + * @throws IOException if the JSON string is invalid with respect to GroupMember + */ public static GroupMember fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupMember.class); } - /** - * Convert an instance of GroupMember to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupMember to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupMemberLimitedUser.java b/src/main/java/io/github/vrchatapi/model/GroupMemberLimitedUser.java index be009dbe..c7b33489 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupMemberLimitedUser.java +++ b/src/main/java/io/github/vrchatapi/model/GroupMemberLimitedUser.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,42 +50,47 @@ /** * Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. */ -@ApiModel(description = "Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user.") -@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 GroupMemberLimitedUser { public static final String SERIALIZED_NAME_CURRENT_AVATAR_TAGS = "currentAvatarTags"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_TAGS) - private List currentAvatarTags = null; + @javax.annotation.Nullable + private List currentAvatarTags = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL = "currentAvatarThumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nullable private String currentAvatarThumbnailImageUrl; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable private String displayName; public static final String SERIALIZED_NAME_ICON_URL = "iconUrl"; @SerializedName(SERIALIZED_NAME_ICON_URL) + @javax.annotation.Nullable private String iconUrl; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE = "profilePicOverride"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE) + @javax.annotation.Nullable private String profilePicOverride; public static final String SERIALIZED_NAME_THUMBNAIL_URL = "thumbnailUrl"; @SerializedName(SERIALIZED_NAME_THUMBNAIL_URL) + @javax.annotation.Nullable private String thumbnailUrl; public GroupMemberLimitedUser() { } - public GroupMemberLimitedUser currentAvatarTags(List currentAvatarTags) { - + public GroupMemberLimitedUser currentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; return this; } @@ -98,157 +103,130 @@ public GroupMemberLimitedUser addCurrentAvatarTagsItem(String currentAvatarTagsI return this; } - /** + /** * Get currentAvatarTags * @return currentAvatarTags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getCurrentAvatarTags() { return currentAvatarTags; } - - public void setCurrentAvatarTags(List currentAvatarTags) { + public void setCurrentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; } - public GroupMemberLimitedUser currentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { - + public GroupMemberLimitedUser currentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; return this; } - /** + /** * Get currentAvatarThumbnailImageUrl * @return currentAvatarThumbnailImageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getCurrentAvatarThumbnailImageUrl() { return currentAvatarThumbnailImageUrl; } - - public void setCurrentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; } - public GroupMemberLimitedUser displayName(String displayName) { - + public GroupMemberLimitedUser displayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; } - public GroupMemberLimitedUser iconUrl(String iconUrl) { - + public GroupMemberLimitedUser iconUrl(@javax.annotation.Nullable String iconUrl) { this.iconUrl = iconUrl; return this; } - /** + /** * Get iconUrl * @return iconUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIconUrl() { return iconUrl; } - - public void setIconUrl(String iconUrl) { + public void setIconUrl(@javax.annotation.Nullable String iconUrl) { this.iconUrl = iconUrl; } - public GroupMemberLimitedUser id(String id) { - + public GroupMemberLimitedUser id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public GroupMemberLimitedUser profilePicOverride(String profilePicOverride) { - + public GroupMemberLimitedUser profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; return this; } - /** + /** * Get profilePicOverride * @return profilePicOverride - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProfilePicOverride() { return profilePicOverride; } - - public void setProfilePicOverride(String profilePicOverride) { + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; } - public GroupMemberLimitedUser thumbnailUrl(String thumbnailUrl) { - + public GroupMemberLimitedUser thumbnailUrl(@javax.annotation.Nullable String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } - /** + /** * Get thumbnailUrl * @return thumbnailUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getThumbnailUrl() { return thumbnailUrl; } - - public void setThumbnailUrl(String thumbnailUrl) { + public void setThumbnailUrl(@javax.annotation.Nullable String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; } @@ -308,10 +286,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -320,60 +295,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("currentAvatarTags"); - openapiFields.add("currentAvatarThumbnailImageUrl"); - openapiFields.add("displayName"); - openapiFields.add("iconUrl"); - openapiFields.add("id"); - openapiFields.add("profilePicOverride"); - openapiFields.add("thumbnailUrl"); + openapiFields = new HashSet(Arrays.asList("currentAvatarTags", "currentAvatarThumbnailImageUrl", "displayName", "iconUrl", "id", "profilePicOverride", "thumbnailUrl")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupMemberLimitedUser - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupMemberLimitedUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupMemberLimitedUser is not found in the empty JSON string", GroupMemberLimitedUser.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupMemberLimitedUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupMemberLimitedUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupMemberLimitedUser is not found in the empty JSON string", GroupMemberLimitedUser.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupMemberLimitedUser.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupMemberLimitedUser` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupMemberLimitedUser` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("currentAvatarTags") != null && !jsonObj.get("currentAvatarTags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); + if (jsonObj.get("currentAvatarTags") != null && !jsonObj.get("currentAvatarTags").isJsonNull() && !jsonObj.get("currentAvatarTags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); } if ((jsonObj.get("currentAvatarThumbnailImageUrl") != null && !jsonObj.get("currentAvatarThumbnailImageUrl").isJsonNull()) && !jsonObj.get("currentAvatarThumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); } if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("iconUrl") != null && !jsonObj.get("iconUrl").isJsonNull()) && !jsonObj.get("iconUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("profilePicOverride") != null && !jsonObj.get("profilePicOverride").isJsonNull()) && !jsonObj.get("profilePicOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); } if ((jsonObj.get("thumbnailUrl") != null && !jsonObj.get("thumbnailUrl").isJsonNull()) && !jsonObj.get("thumbnailUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); } } @@ -397,31 +366,31 @@ public void write(JsonWriter out, GroupMemberLimitedUser value) throws IOExcepti @Override public GroupMemberLimitedUser read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupMemberLimitedUser given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupMemberLimitedUser - * @throws IOException if the JSON string is invalid with respect to GroupMemberLimitedUser - */ + /** + * Create an instance of GroupMemberLimitedUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupMemberLimitedUser + * @throws IOException if the JSON string is invalid with respect to GroupMemberLimitedUser + */ public static GroupMemberLimitedUser fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupMemberLimitedUser.class); } - /** - * Convert an instance of GroupMemberLimitedUser to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupMemberLimitedUser to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupMemberStatus.java b/src/main/java/io/github/vrchatapi/model/GroupMemberStatus.java index 9356f486..3b89ef75 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupMemberStatus.java +++ b/src/main/java/io/github/vrchatapi/model/GroupMemberStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -76,5 +76,10 @@ public GroupMemberStatus read(final JsonReader jsonReader) throws IOException { return GroupMemberStatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupMemberStatus.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/GroupMyMember.java b/src/main/java/io/github/vrchatapi/model/GroupMyMember.java index 7deec334..111cc04b 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupMyMember.java +++ b/src/main/java/io/github/vrchatapi/model/GroupMyMember.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,18 +13,16 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupPermissions; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -38,13 +36,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -52,392 +52,359 @@ /** * GroupMyMember */ -@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 GroupMyMember { public static final String SERIALIZED_NAME_ACCEPTED_BY_DISPLAY_NAME = "acceptedByDisplayName"; @SerializedName(SERIALIZED_NAME_ACCEPTED_BY_DISPLAY_NAME) + @javax.annotation.Nullable private String acceptedByDisplayName; public static final String SERIALIZED_NAME_ACCEPTED_BY_ID = "acceptedById"; @SerializedName(SERIALIZED_NAME_ACCEPTED_BY_ID) + @javax.annotation.Nullable private String acceptedById; public static final String SERIALIZED_NAME_BANNED_AT = "bannedAt"; @SerializedName(SERIALIZED_NAME_BANNED_AT) + @javax.annotation.Nullable private String bannedAt; public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nullable private String groupId; public static final String SERIALIZED_NAME_HAS2_F_A = "has2FA"; @SerializedName(SERIALIZED_NAME_HAS2_F_A) + @javax.annotation.Nullable private Boolean has2FA = false; public static final String SERIALIZED_NAME_HAS_JOINED_FROM_PURCHASE = "hasJoinedFromPurchase"; @SerializedName(SERIALIZED_NAME_HAS_JOINED_FROM_PURCHASE) + @javax.annotation.Nullable private Boolean hasJoinedFromPurchase = false; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IS_REPRESENTING = "isRepresenting"; @SerializedName(SERIALIZED_NAME_IS_REPRESENTING) + @javax.annotation.Nullable private Boolean isRepresenting = false; public static final String SERIALIZED_NAME_IS_SUBSCRIBED_TO_ANNOUNCEMENTS = "isSubscribedToAnnouncements"; @SerializedName(SERIALIZED_NAME_IS_SUBSCRIBED_TO_ANNOUNCEMENTS) + @javax.annotation.Nullable private Boolean isSubscribedToAnnouncements = true; public static final String SERIALIZED_NAME_IS_SUBSCRIBED_TO_EVENT_ANNOUNCEMENTS = "isSubscribedToEventAnnouncements"; @SerializedName(SERIALIZED_NAME_IS_SUBSCRIBED_TO_EVENT_ANNOUNCEMENTS) + @javax.annotation.Nullable private Boolean isSubscribedToEventAnnouncements; public static final String SERIALIZED_NAME_JOINED_AT = "joinedAt"; @SerializedName(SERIALIZED_NAME_JOINED_AT) + @javax.annotation.Nullable private OffsetDateTime joinedAt; public static final String SERIALIZED_NAME_LAST_POST_READ_AT = "lastPostReadAt"; @SerializedName(SERIALIZED_NAME_LAST_POST_READ_AT) + @javax.annotation.Nullable private OffsetDateTime lastPostReadAt; public static final String SERIALIZED_NAME_M_ROLE_IDS = "mRoleIds"; @SerializedName(SERIALIZED_NAME_M_ROLE_IDS) - private List mRoleIds = null; + @javax.annotation.Nullable + private List mRoleIds = new ArrayList<>(); public static final String SERIALIZED_NAME_MANAGER_NOTES = "managerNotes"; @SerializedName(SERIALIZED_NAME_MANAGER_NOTES) + @javax.annotation.Nullable private String managerNotes; public static final String SERIALIZED_NAME_MEMBERSHIP_STATUS = "membershipStatus"; @SerializedName(SERIALIZED_NAME_MEMBERSHIP_STATUS) + @javax.annotation.Nullable private String membershipStatus; public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; @SerializedName(SERIALIZED_NAME_PERMISSIONS) - private List permissions = null; + @javax.annotation.Nullable + private List permissions = new ArrayList<>(); public static final String SERIALIZED_NAME_ROLE_IDS = "roleIds"; @SerializedName(SERIALIZED_NAME_ROLE_IDS) - private List roleIds = null; + @javax.annotation.Nullable + private List roleIds = new ArrayList<>(); public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nullable private String userId; public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable private String visibility; public GroupMyMember() { } - public GroupMyMember acceptedByDisplayName(String acceptedByDisplayName) { - + public GroupMyMember acceptedByDisplayName(@javax.annotation.Nullable String acceptedByDisplayName) { this.acceptedByDisplayName = acceptedByDisplayName; return this; } - /** + /** * Get acceptedByDisplayName * @return acceptedByDisplayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAcceptedByDisplayName() { return acceptedByDisplayName; } - - public void setAcceptedByDisplayName(String acceptedByDisplayName) { + public void setAcceptedByDisplayName(@javax.annotation.Nullable String acceptedByDisplayName) { this.acceptedByDisplayName = acceptedByDisplayName; } - public GroupMyMember acceptedById(String acceptedById) { - + public GroupMyMember acceptedById(@javax.annotation.Nullable String acceptedById) { this.acceptedById = acceptedById; return this; } - /** + /** * Get acceptedById * @return acceptedById - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAcceptedById() { return acceptedById; } - - public void setAcceptedById(String acceptedById) { + public void setAcceptedById(@javax.annotation.Nullable String acceptedById) { this.acceptedById = acceptedById; } - public GroupMyMember bannedAt(String bannedAt) { - + public GroupMyMember bannedAt(@javax.annotation.Nullable String bannedAt) { this.bannedAt = bannedAt; return this; } - /** + /** * Get bannedAt * @return bannedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBannedAt() { return bannedAt; } - - public void setBannedAt(String bannedAt) { + public void setBannedAt(@javax.annotation.Nullable String bannedAt) { this.bannedAt = bannedAt; } - public GroupMyMember createdAt(OffsetDateTime createdAt) { - + public GroupMyMember createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public GroupMyMember groupId(String groupId) { - + public GroupMyMember groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } - public GroupMyMember has2FA(Boolean has2FA) { - + public GroupMyMember has2FA(@javax.annotation.Nullable Boolean has2FA) { this.has2FA = has2FA; return this; } - /** + /** * Get has2FA * @return has2FA - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getHas2FA() { return has2FA; } - - public void setHas2FA(Boolean has2FA) { + public void setHas2FA(@javax.annotation.Nullable Boolean has2FA) { this.has2FA = has2FA; } - public GroupMyMember hasJoinedFromPurchase(Boolean hasJoinedFromPurchase) { - + public GroupMyMember hasJoinedFromPurchase(@javax.annotation.Nullable Boolean hasJoinedFromPurchase) { this.hasJoinedFromPurchase = hasJoinedFromPurchase; return this; } - /** + /** * Get hasJoinedFromPurchase * @return hasJoinedFromPurchase - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getHasJoinedFromPurchase() { return hasJoinedFromPurchase; } - - public void setHasJoinedFromPurchase(Boolean hasJoinedFromPurchase) { + public void setHasJoinedFromPurchase(@javax.annotation.Nullable Boolean hasJoinedFromPurchase) { this.hasJoinedFromPurchase = hasJoinedFromPurchase; } - public GroupMyMember id(String id) { - + public GroupMyMember id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "gmem_95cdb3b4-4643-4eb6-bdab-46a4e1e5ce37", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public GroupMyMember isRepresenting(Boolean isRepresenting) { - + public GroupMyMember isRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { this.isRepresenting = isRepresenting; return this; } - /** + /** * Get isRepresenting * @return isRepresenting - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsRepresenting() { return isRepresenting; } - - public void setIsRepresenting(Boolean isRepresenting) { + public void setIsRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { this.isRepresenting = isRepresenting; } - public GroupMyMember isSubscribedToAnnouncements(Boolean isSubscribedToAnnouncements) { - + public GroupMyMember isSubscribedToAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToAnnouncements) { this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; return this; } - /** + /** * Get isSubscribedToAnnouncements * @return isSubscribedToAnnouncements - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsSubscribedToAnnouncements() { return isSubscribedToAnnouncements; } - - public void setIsSubscribedToAnnouncements(Boolean isSubscribedToAnnouncements) { + public void setIsSubscribedToAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToAnnouncements) { this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; } - public GroupMyMember isSubscribedToEventAnnouncements(Boolean isSubscribedToEventAnnouncements) { - + public GroupMyMember isSubscribedToEventAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToEventAnnouncements) { this.isSubscribedToEventAnnouncements = isSubscribedToEventAnnouncements; return this; } - /** + /** * Get isSubscribedToEventAnnouncements * @return isSubscribedToEventAnnouncements - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsSubscribedToEventAnnouncements() { return isSubscribedToEventAnnouncements; } - - public void setIsSubscribedToEventAnnouncements(Boolean isSubscribedToEventAnnouncements) { + public void setIsSubscribedToEventAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToEventAnnouncements) { this.isSubscribedToEventAnnouncements = isSubscribedToEventAnnouncements; } - public GroupMyMember joinedAt(OffsetDateTime joinedAt) { - + public GroupMyMember joinedAt(@javax.annotation.Nullable OffsetDateTime joinedAt) { this.joinedAt = joinedAt; return this; } - /** + /** * Get joinedAt * @return joinedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getJoinedAt() { return joinedAt; } - - public void setJoinedAt(OffsetDateTime joinedAt) { + public void setJoinedAt(@javax.annotation.Nullable OffsetDateTime joinedAt) { this.joinedAt = joinedAt; } - public GroupMyMember lastPostReadAt(OffsetDateTime lastPostReadAt) { - + public GroupMyMember lastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { this.lastPostReadAt = lastPostReadAt; return this; } - /** + /** * Get lastPostReadAt * @return lastPostReadAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getLastPostReadAt() { return lastPostReadAt; } - - public void setLastPostReadAt(OffsetDateTime lastPostReadAt) { + public void setLastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { this.lastPostReadAt = lastPostReadAt; } - public GroupMyMember mRoleIds(List mRoleIds) { - + public GroupMyMember mRoleIds(@javax.annotation.Nullable List mRoleIds) { this.mRoleIds = mRoleIds; return this; } @@ -450,71 +417,59 @@ public GroupMyMember addMRoleIdsItem(String mRoleIdsItem) { return this; } - /** + /** * Get mRoleIds * @return mRoleIds - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getmRoleIds() { return mRoleIds; } - - public void setmRoleIds(List mRoleIds) { + public void setmRoleIds(@javax.annotation.Nullable List mRoleIds) { this.mRoleIds = mRoleIds; } - public GroupMyMember managerNotes(String managerNotes) { - + public GroupMyMember managerNotes(@javax.annotation.Nullable String managerNotes) { this.managerNotes = managerNotes; return this; } - /** + /** * Get managerNotes * @return managerNotes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getManagerNotes() { return managerNotes; } - - public void setManagerNotes(String managerNotes) { + public void setManagerNotes(@javax.annotation.Nullable String managerNotes) { this.managerNotes = managerNotes; } - public GroupMyMember membershipStatus(String membershipStatus) { - + public GroupMyMember membershipStatus(@javax.annotation.Nullable String membershipStatus) { this.membershipStatus = membershipStatus; return this; } - /** + /** * Get membershipStatus * @return membershipStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "member", value = "") - public String getMembershipStatus() { return membershipStatus; } - - public void setMembershipStatus(String membershipStatus) { + public void setMembershipStatus(@javax.annotation.Nullable String membershipStatus) { this.membershipStatus = membershipStatus; } - public GroupMyMember permissions(List permissions) { - + public GroupMyMember permissions(@javax.annotation.Nullable List permissions) { this.permissions = permissions; return this; } @@ -527,25 +482,21 @@ public GroupMyMember addPermissionsItem(GroupPermissions permissionsItem) { return this; } - /** + /** * Get permissions * @return permissions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getPermissions() { return permissions; } - - public void setPermissions(List permissions) { + public void setPermissions(@javax.annotation.Nullable List permissions) { this.permissions = permissions; } - public GroupMyMember roleIds(List roleIds) { - + public GroupMyMember roleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; return this; } @@ -558,65 +509,54 @@ public GroupMyMember addRoleIdsItem(String roleIdsItem) { return this; } - /** + /** * Get roleIds * @return roleIds - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getRoleIds() { return roleIds; } - - public void setRoleIds(List roleIds) { + public void setRoleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; } - public GroupMyMember userId(String userId) { - + public GroupMyMember userId(@javax.annotation.Nullable String userId) { this.userId = userId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return userId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getUserId() { return userId; } - - public void setUserId(String userId) { + public void setUserId(@javax.annotation.Nullable String userId) { this.userId = userId; } - public GroupMyMember visibility(String visibility) { - + public GroupMyMember visibility(@javax.annotation.Nullable String visibility) { this.visibility = visibility; return this; } - /** + /** * Get visibility * @return visibility - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "visible", value = "") - public String getVisibility() { return visibility; } - - public void setVisibility(String visibility) { + public void setVisibility(@javax.annotation.Nullable String visibility) { this.visibility = visibility; } @@ -702,10 +642,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -714,90 +651,71 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("acceptedByDisplayName"); - openapiFields.add("acceptedById"); - openapiFields.add("bannedAt"); - openapiFields.add("createdAt"); - openapiFields.add("groupId"); - openapiFields.add("has2FA"); - openapiFields.add("hasJoinedFromPurchase"); - openapiFields.add("id"); - openapiFields.add("isRepresenting"); - openapiFields.add("isSubscribedToAnnouncements"); - openapiFields.add("isSubscribedToEventAnnouncements"); - openapiFields.add("joinedAt"); - openapiFields.add("lastPostReadAt"); - openapiFields.add("mRoleIds"); - openapiFields.add("managerNotes"); - openapiFields.add("membershipStatus"); - openapiFields.add("permissions"); - openapiFields.add("roleIds"); - openapiFields.add("userId"); - openapiFields.add("visibility"); + openapiFields = new HashSet(Arrays.asList("acceptedByDisplayName", "acceptedById", "bannedAt", "createdAt", "groupId", "has2FA", "hasJoinedFromPurchase", "id", "isRepresenting", "isSubscribedToAnnouncements", "isSubscribedToEventAnnouncements", "joinedAt", "lastPostReadAt", "mRoleIds", "managerNotes", "membershipStatus", "permissions", "roleIds", "userId", "visibility")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupMyMember - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupMyMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupMyMember is not found in the empty JSON string", GroupMyMember.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupMyMember + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupMyMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupMyMember is not found in the empty JSON string", GroupMyMember.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupMyMember.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupMyMember` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupMyMember` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("acceptedByDisplayName") != null && !jsonObj.get("acceptedByDisplayName").isJsonNull()) && !jsonObj.get("acceptedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `acceptedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acceptedByDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `acceptedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acceptedByDisplayName").toString())); } if ((jsonObj.get("acceptedById") != null && !jsonObj.get("acceptedById").isJsonNull()) && !jsonObj.get("acceptedById").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `acceptedById` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acceptedById").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `acceptedById` to be a primitive type in the JSON string but got `%s`", jsonObj.get("acceptedById").toString())); } if ((jsonObj.get("bannedAt") != null && !jsonObj.get("bannedAt").isJsonNull()) && !jsonObj.get("bannedAt").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bannedAt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannedAt").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannedAt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannedAt").toString())); } if ((jsonObj.get("groupId") != null && !jsonObj.get("groupId").isJsonNull()) && !jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("mRoleIds") != null && !jsonObj.get("mRoleIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `mRoleIds` to be an array in the JSON string but got `%s`", jsonObj.get("mRoleIds").toString())); + if (jsonObj.get("mRoleIds") != null && !jsonObj.get("mRoleIds").isJsonNull() && !jsonObj.get("mRoleIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `mRoleIds` to be an array in the JSON string but got `%s`", jsonObj.get("mRoleIds").toString())); } if ((jsonObj.get("managerNotes") != null && !jsonObj.get("managerNotes").isJsonNull()) && !jsonObj.get("managerNotes").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `managerNotes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("managerNotes").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `managerNotes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("managerNotes").toString())); } if ((jsonObj.get("membershipStatus") != null && !jsonObj.get("membershipStatus").isJsonNull()) && !jsonObj.get("membershipStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `membershipStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("membershipStatus").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `membershipStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("membershipStatus").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); + if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull() && !jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); + if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonNull() && !jsonObj.get("roleIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); } if ((jsonObj.get("userId") != null && !jsonObj.get("userId").isJsonNull()) && !jsonObj.get("userId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); } if ((jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) && !jsonObj.get("visibility").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); } } @@ -821,31 +739,31 @@ public void write(JsonWriter out, GroupMyMember value) throws IOException { @Override public GroupMyMember read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupMyMember given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupMyMember - * @throws IOException if the JSON string is invalid with respect to GroupMyMember - */ + /** + * Create an instance of GroupMyMember given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupMyMember + * @throws IOException if the JSON string is invalid with respect to GroupMyMember + */ public static GroupMyMember fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupMyMember.class); } - /** - * Convert an instance of GroupMyMember to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupMyMember to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupPermission.java b/src/main/java/io/github/vrchatapi/model/GroupPermission.java index fc37f00f..25a97e8e 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupPermission.java +++ b/src/main/java/io/github/vrchatapi/model/GroupPermission.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,143 +47,127 @@ /** * A permission that can be granted to a role in a group. */ -@ApiModel(description = "A permission that can be granted to a role in a group.") -@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 GroupPermission { public static final String SERIALIZED_NAME_ALLOWED_TO_ADD = "allowedToAdd"; @SerializedName(SERIALIZED_NAME_ALLOWED_TO_ADD) + @javax.annotation.Nullable private Boolean allowedToAdd = false; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable private String displayName; public static final String SERIALIZED_NAME_HELP = "help"; @SerializedName(SERIALIZED_NAME_HELP) + @javax.annotation.Nullable private String help; public static final String SERIALIZED_NAME_IS_MANAGEMENT_PERMISSION = "isManagementPermission"; @SerializedName(SERIALIZED_NAME_IS_MANAGEMENT_PERMISSION) + @javax.annotation.Nullable private Boolean isManagementPermission = false; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public GroupPermission() { } - public GroupPermission allowedToAdd(Boolean allowedToAdd) { - + public GroupPermission allowedToAdd(@javax.annotation.Nullable Boolean allowedToAdd) { this.allowedToAdd = allowedToAdd; return this; } - /** + /** * Whether the user is allowed to add this permission to a role. * @return allowedToAdd - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "Whether the user is allowed to add this permission to a role.") - public Boolean getAllowedToAdd() { return allowedToAdd; } - - public void setAllowedToAdd(Boolean allowedToAdd) { + public void setAllowedToAdd(@javax.annotation.Nullable Boolean allowedToAdd) { this.allowedToAdd = allowedToAdd; } - public GroupPermission displayName(String displayName) { - + public GroupPermission displayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; return this; } - /** + /** * The display name of the permission. * @return displayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Manage Group Data", value = "The display name of the permission.") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; } - public GroupPermission help(String help) { - + public GroupPermission help(@javax.annotation.Nullable String help) { this.help = help; return this; } - /** + /** * Human-readable description of the permission. * @return help - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Allows role to edit group details (name, description, joinState, initialRoles, etc).", value = "Human-readable description of the permission.") - public String getHelp() { return help; } - - public void setHelp(String help) { + public void setHelp(@javax.annotation.Nullable String help) { this.help = help; } - public GroupPermission isManagementPermission(Boolean isManagementPermission) { - + public GroupPermission isManagementPermission(@javax.annotation.Nullable Boolean isManagementPermission) { this.isManagementPermission = isManagementPermission; return this; } - /** + /** * Whether this permission is a \"management\" permission. * @return isManagementPermission - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "Whether this permission is a \"management\" permission.") - public Boolean getIsManagementPermission() { return isManagementPermission; } - - public void setIsManagementPermission(Boolean isManagementPermission) { + public void setIsManagementPermission(@javax.annotation.Nullable Boolean isManagementPermission) { this.isManagementPermission = isManagementPermission; } - public GroupPermission name(String name) { - + public GroupPermission name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * The name of the permission. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "group-data-manage", value = "The name of the permission.") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } @@ -228,10 +212,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -240,45 +221,41 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("allowedToAdd"); - openapiFields.add("displayName"); - openapiFields.add("help"); - openapiFields.add("isManagementPermission"); - openapiFields.add("name"); + openapiFields = new HashSet(Arrays.asList("allowedToAdd", "displayName", "help", "isManagementPermission", "name")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupPermission - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupPermission.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupPermission is not found in the empty JSON string", GroupPermission.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupPermission + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupPermission.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupPermission is not found in the empty JSON string", GroupPermission.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupPermission.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupPermission` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupPermission` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("help") != null && !jsonObj.get("help").isJsonNull()) && !jsonObj.get("help").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `help` to be a primitive type in the JSON string but got `%s`", jsonObj.get("help").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `help` to be a primitive type in the JSON string but got `%s`", jsonObj.get("help").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } @@ -302,31 +279,31 @@ public void write(JsonWriter out, GroupPermission value) throws IOException { @Override public GroupPermission read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupPermission given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupPermission - * @throws IOException if the JSON string is invalid with respect to GroupPermission - */ + /** + * Create an instance of GroupPermission given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupPermission + * @throws IOException if the JSON string is invalid with respect to GroupPermission + */ public static GroupPermission fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupPermission.class); } - /** - * Convert an instance of GroupPermission to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupPermission to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupPermissions.java b/src/main/java/io/github/vrchatapi/model/GroupPermissions.java index 72de2897..541ca094 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupPermissions.java +++ b/src/main/java/io/github/vrchatapi/model/GroupPermissions.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -120,5 +120,10 @@ public GroupPermissions read(final JsonReader jsonReader) throws IOException { return GroupPermissions.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupPermissions.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/GroupPost.java b/src/main/java/io/github/vrchatapi/model/GroupPost.java index aff46da1..bb53f93e 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupPost.java +++ b/src/main/java/io/github/vrchatapi/model/GroupPost.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,18 +13,16 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupPostVisibility; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -38,13 +36,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -52,222 +52,205 @@ /** * GroupPost */ -@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 GroupPost { public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable private String authorId; public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_EDITOR_ID = "editorId"; @SerializedName(SERIALIZED_NAME_EDITOR_ID) + @javax.annotation.Nullable private String editorId; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nullable private String groupId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nullable private String imageId; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_ROLE_ID = "roleId"; @SerializedName(SERIALIZED_NAME_ROLE_ID) - private List roleId = null; + @javax.annotation.Nullable + private List roleId = new ArrayList<>(); public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) + @javax.annotation.Nullable private String text; public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nullable private String title; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable private GroupPostVisibility visibility; public GroupPost() { } - public GroupPost authorId(String authorId) { - + public GroupPost authorId(@javax.annotation.Nullable String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nullable String authorId) { this.authorId = authorId; } - public GroupPost createdAt(OffsetDateTime createdAt) { - + public GroupPost createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public GroupPost editorId(String editorId) { - + public GroupPost editorId(@javax.annotation.Nullable String editorId) { this.editorId = editorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return editorId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getEditorId() { return editorId; } - - public void setEditorId(String editorId) { + public void setEditorId(@javax.annotation.Nullable String editorId) { this.editorId = editorId; } - public GroupPost groupId(String groupId) { - + public GroupPost groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } - public GroupPost id(String id) { - + public GroupPost id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "not_00000000-0000-0000-0000-000000000000", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public GroupPost imageId(String imageId) { - + public GroupPost imageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; } - public GroupPost imageUrl(String imageUrl) { - + public GroupPost imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public GroupPost roleId(List roleId) { - + public GroupPost roleId(@javax.annotation.Nullable List roleId) { this.roleId = roleId; return this; } @@ -280,111 +263,92 @@ public GroupPost addRoleIdItem(String roleIdItem) { return this; } - /** + /** * * @return roleId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleId() { return roleId; } - - public void setRoleId(List roleId) { + public void setRoleId(@javax.annotation.Nullable List roleId) { this.roleId = roleId; } - public GroupPost text(String text) { - + public GroupPost text(@javax.annotation.Nullable String text) { this.text = text; return this; } - /** + /** * Get text * @return text - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getText() { return text; } - - public void setText(String text) { + public void setText(@javax.annotation.Nullable String text) { this.text = text; } - public GroupPost title(String title) { - + public GroupPost title(@javax.annotation.Nullable String title) { this.title = title; return this; } - /** + /** * Get title * @return title - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getTitle() { return title; } - - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public GroupPost updatedAt(OffsetDateTime updatedAt) { - + public GroupPost updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public GroupPost visibility(GroupPostVisibility visibility) { - + public GroupPost visibility(@javax.annotation.Nullable GroupPostVisibility visibility) { this.visibility = visibility; return this; } - /** + /** * Get visibility * @return visibility - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupPostVisibility getVisibility() { return visibility; } - - public void setVisibility(GroupPostVisibility visibility) { + public void setVisibility(@javax.annotation.Nullable GroupPostVisibility visibility) { this.visibility = visibility; } @@ -454,10 +418,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -466,71 +427,64 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authorId"); - openapiFields.add("createdAt"); - openapiFields.add("editorId"); - openapiFields.add("groupId"); - openapiFields.add("id"); - openapiFields.add("imageId"); - openapiFields.add("imageUrl"); - openapiFields.add("roleId"); - openapiFields.add("text"); - openapiFields.add("title"); - openapiFields.add("updatedAt"); - openapiFields.add("visibility"); + openapiFields = new HashSet(Arrays.asList("authorId", "createdAt", "editorId", "groupId", "id", "imageId", "imageUrl", "roleId", "text", "title", "updatedAt", "visibility")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupPost - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupPost.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupPost is not found in the empty JSON string", GroupPost.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupPost + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupPost.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupPost is not found in the empty JSON string", GroupPost.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupPost.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupPost` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupPost` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("authorId") != null && !jsonObj.get("authorId").isJsonNull()) && !jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if ((jsonObj.get("editorId") != null && !jsonObj.get("editorId").isJsonNull()) && !jsonObj.get("editorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `editorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("editorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `editorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("editorId").toString())); } if ((jsonObj.get("groupId") != null && !jsonObj.get("groupId").isJsonNull()) && !jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleId") != null && !jsonObj.get("roleId").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleId` to be an array in the JSON string but got `%s`", jsonObj.get("roleId").toString())); + if (jsonObj.get("roleId") != null && !jsonObj.get("roleId").isJsonNull() && !jsonObj.get("roleId").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleId` to be an array in the JSON string but got `%s`", jsonObj.get("roleId").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + GroupPostVisibility.validateJsonElement(jsonObj.get("visibility")); } } @@ -554,31 +508,31 @@ public void write(JsonWriter out, GroupPost value) throws IOException { @Override public GroupPost read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupPost given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupPost - * @throws IOException if the JSON string is invalid with respect to GroupPost - */ + /** + * Create an instance of GroupPost given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupPost + * @throws IOException if the JSON string is invalid with respect to GroupPost + */ public static GroupPost fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupPost.class); } - /** - * Convert an instance of GroupPost to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupPost to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupPostVisibility.java b/src/main/java/io/github/vrchatapi/model/GroupPostVisibility.java index 2bca932c..8310df1e 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupPostVisibility.java +++ b/src/main/java/io/github/vrchatapi/model/GroupPostVisibility.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +68,10 @@ public GroupPostVisibility read(final JsonReader jsonReader) throws IOException return GroupPostVisibility.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupPostVisibility.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/GroupPrivacy.java b/src/main/java/io/github/vrchatapi/model/GroupPrivacy.java index a5bcb17e..5b738e8b 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupPrivacy.java +++ b/src/main/java/io/github/vrchatapi/model/GroupPrivacy.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +68,10 @@ public GroupPrivacy read(final JsonReader jsonReader) throws IOException { return GroupPrivacy.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupPrivacy.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/GroupRole.java b/src/main/java/io/github/vrchatapi/model/GroupRole.java index 75405cfc..4b2f9b10 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupRole.java +++ b/src/main/java/io/github/vrchatapi/model/GroupRole.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,18 +13,16 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupPermissions; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,245 +51,224 @@ /** * GroupRole */ -@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 GroupRole { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nullable private String groupId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IS_MANAGEMENT_ROLE = "isManagementRole"; @SerializedName(SERIALIZED_NAME_IS_MANAGEMENT_ROLE) + @javax.annotation.Nullable private Boolean isManagementRole = false; public static final String SERIALIZED_NAME_IS_SELF_ASSIGNABLE = "isSelfAssignable"; @SerializedName(SERIALIZED_NAME_IS_SELF_ASSIGNABLE) + @javax.annotation.Nullable private Boolean isSelfAssignable = false; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_ORDER = "order"; @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable private Integer order; public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; @SerializedName(SERIALIZED_NAME_PERMISSIONS) - private List permissions = null; + @javax.annotation.Nullable + private List permissions = new ArrayList<>(); public static final String SERIALIZED_NAME_REQUIRES_PURCHASE = "requiresPurchase"; @SerializedName(SERIALIZED_NAME_REQUIRES_PURCHASE) + @javax.annotation.Nullable private Boolean requiresPurchase = false; public static final String SERIALIZED_NAME_REQUIRES_TWO_FACTOR = "requiresTwoFactor"; @SerializedName(SERIALIZED_NAME_REQUIRES_TWO_FACTOR) + @javax.annotation.Nullable private Boolean requiresTwoFactor = false; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; public GroupRole() { } - public GroupRole createdAt(OffsetDateTime createdAt) { - + public GroupRole createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public GroupRole description(String description) { - + public GroupRole description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public GroupRole groupId(String groupId) { - + public GroupRole groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } - public GroupRole id(String id) { - + public GroupRole id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grol_459d3911-f672-44bc-b84d-e54ffe7960fe", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public GroupRole isManagementRole(Boolean isManagementRole) { - + public GroupRole isManagementRole(@javax.annotation.Nullable Boolean isManagementRole) { this.isManagementRole = isManagementRole; return this; } - /** + /** * Get isManagementRole * @return isManagementRole - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsManagementRole() { return isManagementRole; } - - public void setIsManagementRole(Boolean isManagementRole) { + public void setIsManagementRole(@javax.annotation.Nullable Boolean isManagementRole) { this.isManagementRole = isManagementRole; } - public GroupRole isSelfAssignable(Boolean isSelfAssignable) { - + public GroupRole isSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { this.isSelfAssignable = isSelfAssignable; return this; } - /** + /** * Get isSelfAssignable * @return isSelfAssignable - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsSelfAssignable() { return isSelfAssignable; } - - public void setIsSelfAssignable(Boolean isSelfAssignable) { + public void setIsSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { this.isSelfAssignable = isSelfAssignable; } - public GroupRole name(String name) { - + public GroupRole name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public GroupRole order(Integer order) { - + public GroupRole order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } - /** + /** * Get order * @return order - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getOrder() { return order; } - - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } - public GroupRole permissions(List permissions) { - + public GroupRole permissions(@javax.annotation.Nullable List permissions) { this.permissions = permissions; return this; } @@ -302,88 +281,73 @@ public GroupRole addPermissionsItem(GroupPermissions permissionsItem) { return this; } - /** + /** * Get permissions * @return permissions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getPermissions() { return permissions; } - - public void setPermissions(List permissions) { + public void setPermissions(@javax.annotation.Nullable List permissions) { this.permissions = permissions; } - public GroupRole requiresPurchase(Boolean requiresPurchase) { - + public GroupRole requiresPurchase(@javax.annotation.Nullable Boolean requiresPurchase) { this.requiresPurchase = requiresPurchase; return this; } - /** + /** * Get requiresPurchase * @return requiresPurchase - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getRequiresPurchase() { return requiresPurchase; } - - public void setRequiresPurchase(Boolean requiresPurchase) { + public void setRequiresPurchase(@javax.annotation.Nullable Boolean requiresPurchase) { this.requiresPurchase = requiresPurchase; } - public GroupRole requiresTwoFactor(Boolean requiresTwoFactor) { - + public GroupRole requiresTwoFactor(@javax.annotation.Nullable Boolean requiresTwoFactor) { this.requiresTwoFactor = requiresTwoFactor; return this; } - /** + /** * Get requiresTwoFactor * @return requiresTwoFactor - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getRequiresTwoFactor() { return requiresTwoFactor; } - - public void setRequiresTwoFactor(Boolean requiresTwoFactor) { + public void setRequiresTwoFactor(@javax.annotation.Nullable Boolean requiresTwoFactor) { this.requiresTwoFactor = requiresTwoFactor; } - public GroupRole updatedAt(OffsetDateTime updatedAt) { - + public GroupRole updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -442,10 +406,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -454,59 +415,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("description"); - openapiFields.add("groupId"); - openapiFields.add("id"); - openapiFields.add("isManagementRole"); - openapiFields.add("isSelfAssignable"); - openapiFields.add("name"); - openapiFields.add("order"); - openapiFields.add("permissions"); - openapiFields.add("requiresPurchase"); - openapiFields.add("requiresTwoFactor"); - openapiFields.add("updatedAt"); + openapiFields = new HashSet(Arrays.asList("createdAt", "description", "groupId", "id", "isManagementRole", "isSelfAssignable", "name", "order", "permissions", "requiresPurchase", "requiresTwoFactor", "updatedAt")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupRole - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupRole.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupRole is not found in the empty JSON string", GroupRole.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupRole + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupRole.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupRole is not found in the empty JSON string", GroupRole.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupRole.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupRole` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupRole` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("groupId") != null && !jsonObj.get("groupId").isJsonNull()) && !jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); + if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull() && !jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); } } @@ -530,31 +480,31 @@ public void write(JsonWriter out, GroupRole value) throws IOException { @Override public GroupRole read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupRole given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupRole - * @throws IOException if the JSON string is invalid with respect to GroupRole - */ + /** + * Create an instance of GroupRole given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupRole + * @throws IOException if the JSON string is invalid with respect to GroupRole + */ public static GroupRole fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupRole.class); } - /** - * Convert an instance of GroupRole to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupRole to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupRoleTemplate.java b/src/main/java/io/github/vrchatapi/model/GroupRoleTemplate.java index 62824dcb..d867bb1e 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupRoleTemplate.java +++ b/src/main/java/io/github/vrchatapi/model/GroupRoleTemplate.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -30,11 +30,11 @@ public enum GroupRoleTemplate { DEFAULT("default"), - MANAGEDFREE("managedFree"), + MANAGED_FREE("managedFree"), - MANAGEDINVITE("managedInvite"), + MANAGED_INVITE("managedInvite"), - MANAGEDREQUEST("managedRequest"); + MANAGED_REQUEST("managedRequest"); private String value; @@ -72,5 +72,10 @@ public GroupRoleTemplate read(final JsonReader jsonReader) throws IOException { return GroupRoleTemplate.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupRoleTemplate.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValues.java b/src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValues.java index 2e733c6e..920a1ea8 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValues.java +++ b/src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValues.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,10 +20,9 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupPermissions; import io.github.vrchatapi.model.GroupRoleTemplateValuesRoles; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,120 +51,111 @@ /** * GroupRoleTemplateValues */ -@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 GroupRoleTemplateValues { public static final String SERIALIZED_NAME_BASE_PERMISSIONS = "basePermissions"; @SerializedName(SERIALIZED_NAME_BASE_PERMISSIONS) + @javax.annotation.Nonnull private List basePermissions = new ArrayList<>(); public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_ROLES = "roles"; @SerializedName(SERIALIZED_NAME_ROLES) + @javax.annotation.Nonnull private GroupRoleTemplateValuesRoles roles; public GroupRoleTemplateValues() { } - public GroupRoleTemplateValues basePermissions(List basePermissions) { - + public GroupRoleTemplateValues basePermissions(@javax.annotation.Nonnull List basePermissions) { this.basePermissions = basePermissions; return this; } public GroupRoleTemplateValues addBasePermissionsItem(GroupPermissions basePermissionsItem) { + if (this.basePermissions == null) { + this.basePermissions = new ArrayList<>(); + } this.basePermissions.add(basePermissionsItem); return this; } - /** + /** * Get basePermissions * @return basePermissions - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getBasePermissions() { return basePermissions; } - - public void setBasePermissions(List basePermissions) { + public void setBasePermissions(@javax.annotation.Nonnull List basePermissions) { this.basePermissions = basePermissions; } - public GroupRoleTemplateValues description(String description) { - + public GroupRoleTemplateValues description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public GroupRoleTemplateValues name(String name) { - + public GroupRoleTemplateValues name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public GroupRoleTemplateValues roles(GroupRoleTemplateValuesRoles roles) { - + public GroupRoleTemplateValues roles(@javax.annotation.Nonnull GroupRoleTemplateValuesRoles roles) { this.roles = roles; return this; } - /** + /** * Get roles * @return roles - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public GroupRoleTemplateValuesRoles getRoles() { return roles; } - - public void setRoles(GroupRoleTemplateValuesRoles roles) { + public void setRoles(@javax.annotation.Nonnull GroupRoleTemplateValuesRoles roles) { this.roles = roles; } @@ -207,10 +198,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -219,61 +207,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("basePermissions"); - openapiFields.add("description"); - openapiFields.add("name"); - openapiFields.add("roles"); + openapiFields = new HashSet(Arrays.asList("basePermissions", "description", "name", "roles")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("basePermissions"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("roles"); + openapiRequiredFields = new HashSet(Arrays.asList("basePermissions", "description", "name", "roles")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupRoleTemplateValues - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupRoleTemplateValues.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupRoleTemplateValues is not found in the empty JSON string", GroupRoleTemplateValues.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupRoleTemplateValues + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupRoleTemplateValues.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupRoleTemplateValues is not found in the empty JSON string", GroupRoleTemplateValues.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupRoleTemplateValues.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupRoleTemplateValues` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupRoleTemplateValues` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : GroupRoleTemplateValues.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("basePermissions") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("basePermissions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `basePermissions` to be an array in the JSON string but got `%s`", jsonObj.get("basePermissions").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `basePermissions` to be an array in the JSON string but got `%s`", jsonObj.get("basePermissions").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the required field `roles` - GroupRoleTemplateValuesRoles.validateJsonObject(jsonObj.getAsJsonObject("roles")); + GroupRoleTemplateValuesRoles.validateJsonElement(jsonObj.get("roles")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -296,31 +277,31 @@ public void write(JsonWriter out, GroupRoleTemplateValues value) throws IOExcept @Override public GroupRoleTemplateValues read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupRoleTemplateValues given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupRoleTemplateValues - * @throws IOException if the JSON string is invalid with respect to GroupRoleTemplateValues - */ + /** + * Create an instance of GroupRoleTemplateValues given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupRoleTemplateValues + * @throws IOException if the JSON string is invalid with respect to GroupRoleTemplateValues + */ public static GroupRoleTemplateValues fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupRoleTemplateValues.class); } - /** - * Convert an instance of GroupRoleTemplateValues to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupRoleTemplateValues to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValuesRoles.java b/src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValuesRoles.java index bee60025..08e507a7 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValuesRoles.java +++ b/src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValuesRoles.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupPermissions; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,75 +50,70 @@ /** * GroupRoleTemplateValuesRoles */ -@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 GroupRoleTemplateValuesRoles { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_BASE_PERMISSIONS = "basePermissions"; @SerializedName(SERIALIZED_NAME_BASE_PERMISSIONS) - private List basePermissions = null; + @javax.annotation.Nullable + private List basePermissions = new ArrayList<>(); public static final String SERIALIZED_NAME_IS_ADDED_ON_JOIN = "isAddedOnJoin"; @SerializedName(SERIALIZED_NAME_IS_ADDED_ON_JOIN) + @javax.annotation.Nullable private Boolean isAddedOnJoin = false; public GroupRoleTemplateValuesRoles() { } - public GroupRoleTemplateValuesRoles name(String name) { - + public GroupRoleTemplateValuesRoles name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public GroupRoleTemplateValuesRoles description(String description) { - + public GroupRoleTemplateValuesRoles description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public GroupRoleTemplateValuesRoles basePermissions(List basePermissions) { - + public GroupRoleTemplateValuesRoles basePermissions(@javax.annotation.Nullable List basePermissions) { this.basePermissions = basePermissions; return this; } @@ -131,42 +126,35 @@ public GroupRoleTemplateValuesRoles addBasePermissionsItem(GroupPermissions base return this; } - /** + /** * Get basePermissions * @return basePermissions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getBasePermissions() { return basePermissions; } - - public void setBasePermissions(List basePermissions) { + public void setBasePermissions(@javax.annotation.Nullable List basePermissions) { this.basePermissions = basePermissions; } - public GroupRoleTemplateValuesRoles isAddedOnJoin(Boolean isAddedOnJoin) { - + public GroupRoleTemplateValuesRoles isAddedOnJoin(@javax.annotation.Nullable Boolean isAddedOnJoin) { this.isAddedOnJoin = isAddedOnJoin; return this; } - /** + /** * Get isAddedOnJoin * @return isAddedOnJoin - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsAddedOnJoin() { return isAddedOnJoin; } - - public void setIsAddedOnJoin(Boolean isAddedOnJoin) { + public void setIsAddedOnJoin(@javax.annotation.Nullable Boolean isAddedOnJoin) { this.isAddedOnJoin = isAddedOnJoin; } @@ -209,10 +197,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -221,45 +206,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("basePermissions"); - openapiFields.add("isAddedOnJoin"); + openapiFields = new HashSet(Arrays.asList("name", "description", "basePermissions", "isAddedOnJoin")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupRoleTemplateValuesRoles - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupRoleTemplateValuesRoles.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupRoleTemplateValuesRoles is not found in the empty JSON string", GroupRoleTemplateValuesRoles.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupRoleTemplateValuesRoles + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupRoleTemplateValuesRoles.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupRoleTemplateValuesRoles is not found in the empty JSON string", GroupRoleTemplateValuesRoles.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupRoleTemplateValuesRoles.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupRoleTemplateValuesRoles` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupRoleTemplateValuesRoles` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("basePermissions") != null && !jsonObj.get("basePermissions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `basePermissions` to be an array in the JSON string but got `%s`", jsonObj.get("basePermissions").toString())); + if (jsonObj.get("basePermissions") != null && !jsonObj.get("basePermissions").isJsonNull() && !jsonObj.get("basePermissions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `basePermissions` to be an array in the JSON string but got `%s`", jsonObj.get("basePermissions").toString())); } } @@ -283,31 +265,31 @@ public void write(JsonWriter out, GroupRoleTemplateValuesRoles value) throws IOE @Override public GroupRoleTemplateValuesRoles read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupRoleTemplateValuesRoles given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupRoleTemplateValuesRoles - * @throws IOException if the JSON string is invalid with respect to GroupRoleTemplateValuesRoles - */ + /** + * Create an instance of GroupRoleTemplateValuesRoles given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupRoleTemplateValuesRoles + * @throws IOException if the JSON string is invalid with respect to GroupRoleTemplateValuesRoles + */ public static GroupRoleTemplateValuesRoles fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupRoleTemplateValuesRoles.class); } - /** - * Convert an instance of GroupRoleTemplateValuesRoles to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupRoleTemplateValuesRoles to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupSearchSort.java b/src/main/java/io/github/vrchatapi/model/GroupSearchSort.java index 2e2932ac..da65a6dc 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupSearchSort.java +++ b/src/main/java/io/github/vrchatapi/model/GroupSearchSort.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -28,9 +28,9 @@ @JsonAdapter(GroupSearchSort.Adapter.class) public enum GroupSearchSort { - ASC("joinedAt:asc"), + JOINED_AT_ASC("joinedAt:asc"), - DESC("joinedAt:desc"); + JOINED_AT_DESC("joinedAt:desc"); private String value; @@ -68,5 +68,10 @@ public GroupSearchSort read(final JsonReader jsonReader) throws IOException { return GroupSearchSort.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupSearchSort.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/GroupTransferable.java b/src/main/java/io/github/vrchatapi/model/GroupTransferable.java index ce899c08..5e0c0079 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupTransferable.java +++ b/src/main/java/io/github/vrchatapi/model/GroupTransferable.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupTransferableRequirements; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,34 +48,31 @@ /** * GroupTransferable */ -@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 GroupTransferable { public static final String SERIALIZED_NAME_REQUIREMENTS = "requirements"; @SerializedName(SERIALIZED_NAME_REQUIREMENTS) + @javax.annotation.Nonnull private GroupTransferableRequirements requirements; public GroupTransferable() { } - public GroupTransferable requirements(GroupTransferableRequirements requirements) { - + public GroupTransferable requirements(@javax.annotation.Nonnull GroupTransferableRequirements requirements) { this.requirements = requirements; return this; } - /** + /** * Get requirements * @return requirements - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public GroupTransferableRequirements getRequirements() { return requirements; } - - public void setRequirements(GroupTransferableRequirements requirements) { + public void setRequirements(@javax.annotation.Nonnull GroupTransferableRequirements requirements) { this.requirements = requirements; } @@ -112,10 +109,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,43 +118,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("requirements"); + openapiFields = new HashSet(Arrays.asList("requirements")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("requirements"); + openapiRequiredFields = new HashSet(Arrays.asList("requirements")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupTransferable - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupTransferable.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupTransferable is not found in the empty JSON string", GroupTransferable.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupTransferable + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupTransferable.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupTransferable is not found in the empty JSON string", GroupTransferable.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupTransferable.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupTransferable` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupTransferable` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : GroupTransferable.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `requirements` - GroupTransferableRequirements.validateJsonObject(jsonObj.getAsJsonObject("requirements")); + GroupTransferableRequirements.validateJsonElement(jsonObj.get("requirements")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -183,31 +176,31 @@ public void write(JsonWriter out, GroupTransferable value) throws IOException { @Override public GroupTransferable read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupTransferable given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupTransferable - * @throws IOException if the JSON string is invalid with respect to GroupTransferable - */ + /** + * Create an instance of GroupTransferable given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupTransferable + * @throws IOException if the JSON string is invalid with respect to GroupTransferable + */ public static GroupTransferable fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupTransferable.class); } - /** - * Convert an instance of GroupTransferable to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupTransferable to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupTransferableRequirements.java b/src/main/java/io/github/vrchatapi/model/GroupTransferableRequirements.java index 529eb3dc..219444e3 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupTransferableRequirements.java +++ b/src/main/java/io/github/vrchatapi/model/GroupTransferableRequirements.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,142 +47,127 @@ /** * GroupTransferableRequirements */ -@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 GroupTransferableRequirements { public static final String SERIALIZED_NAME_GROUP_NOT_MONETIZED = "groupNotMonetized"; @SerializedName(SERIALIZED_NAME_GROUP_NOT_MONETIZED) + @javax.annotation.Nonnull private Boolean groupNotMonetized = false; public static final String SERIALIZED_NAME_HAS_V_R_C_PLUS = "hasVRCPlus"; @SerializedName(SERIALIZED_NAME_HAS_V_R_C_PLUS) + @javax.annotation.Nonnull private Boolean hasVRCPlus = false; public static final String SERIALIZED_NAME_HAS_VERIFIED_EMAIL = "hasVerifiedEmail"; @SerializedName(SERIALIZED_NAME_HAS_VERIFIED_EMAIL) + @javax.annotation.Nonnull private Boolean hasVerifiedEmail = false; public static final String SERIALIZED_NAME_TARGET_CAN_OWN_MORE_GROUPS = "targetCanOwnMoreGroups"; @SerializedName(SERIALIZED_NAME_TARGET_CAN_OWN_MORE_GROUPS) + @javax.annotation.Nonnull private Boolean targetCanOwnMoreGroups = false; public static final String SERIALIZED_NAME_TARGET_IS_GROUP_MEMBER = "targetIsGroupMember"; @SerializedName(SERIALIZED_NAME_TARGET_IS_GROUP_MEMBER) + @javax.annotation.Nonnull private Boolean targetIsGroupMember = false; public GroupTransferableRequirements() { } - public GroupTransferableRequirements groupNotMonetized(Boolean groupNotMonetized) { - + public GroupTransferableRequirements groupNotMonetized(@javax.annotation.Nonnull Boolean groupNotMonetized) { this.groupNotMonetized = groupNotMonetized; return this; } - /** + /** * Get groupNotMonetized * @return groupNotMonetized - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getGroupNotMonetized() { return groupNotMonetized; } - - public void setGroupNotMonetized(Boolean groupNotMonetized) { + public void setGroupNotMonetized(@javax.annotation.Nonnull Boolean groupNotMonetized) { this.groupNotMonetized = groupNotMonetized; } - public GroupTransferableRequirements hasVRCPlus(Boolean hasVRCPlus) { - + public GroupTransferableRequirements hasVRCPlus(@javax.annotation.Nonnull Boolean hasVRCPlus) { this.hasVRCPlus = hasVRCPlus; return this; } - /** + /** * Get hasVRCPlus * @return hasVRCPlus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getHasVRCPlus() { return hasVRCPlus; } - - public void setHasVRCPlus(Boolean hasVRCPlus) { + public void setHasVRCPlus(@javax.annotation.Nonnull Boolean hasVRCPlus) { this.hasVRCPlus = hasVRCPlus; } - public GroupTransferableRequirements hasVerifiedEmail(Boolean hasVerifiedEmail) { - + public GroupTransferableRequirements hasVerifiedEmail(@javax.annotation.Nonnull Boolean hasVerifiedEmail) { this.hasVerifiedEmail = hasVerifiedEmail; return this; } - /** + /** * Get hasVerifiedEmail * @return hasVerifiedEmail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getHasVerifiedEmail() { return hasVerifiedEmail; } - - public void setHasVerifiedEmail(Boolean hasVerifiedEmail) { + public void setHasVerifiedEmail(@javax.annotation.Nonnull Boolean hasVerifiedEmail) { this.hasVerifiedEmail = hasVerifiedEmail; } - public GroupTransferableRequirements targetCanOwnMoreGroups(Boolean targetCanOwnMoreGroups) { - + public GroupTransferableRequirements targetCanOwnMoreGroups(@javax.annotation.Nonnull Boolean targetCanOwnMoreGroups) { this.targetCanOwnMoreGroups = targetCanOwnMoreGroups; return this; } - /** + /** * Get targetCanOwnMoreGroups * @return targetCanOwnMoreGroups - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getTargetCanOwnMoreGroups() { return targetCanOwnMoreGroups; } - - public void setTargetCanOwnMoreGroups(Boolean targetCanOwnMoreGroups) { + public void setTargetCanOwnMoreGroups(@javax.annotation.Nonnull Boolean targetCanOwnMoreGroups) { this.targetCanOwnMoreGroups = targetCanOwnMoreGroups; } - public GroupTransferableRequirements targetIsGroupMember(Boolean targetIsGroupMember) { - + public GroupTransferableRequirements targetIsGroupMember(@javax.annotation.Nonnull Boolean targetIsGroupMember) { this.targetIsGroupMember = targetIsGroupMember; return this; } - /** + /** * Get targetIsGroupMember * @return targetIsGroupMember - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getTargetIsGroupMember() { return targetIsGroupMember; } - - public void setTargetIsGroupMember(Boolean targetIsGroupMember) { + public void setTargetIsGroupMember(@javax.annotation.Nonnull Boolean targetIsGroupMember) { this.targetIsGroupMember = targetIsGroupMember; } @@ -227,10 +212,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -239,49 +221,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("groupNotMonetized"); - openapiFields.add("hasVRCPlus"); - openapiFields.add("hasVerifiedEmail"); - openapiFields.add("targetCanOwnMoreGroups"); - openapiFields.add("targetIsGroupMember"); + openapiFields = new HashSet(Arrays.asList("groupNotMonetized", "hasVRCPlus", "hasVerifiedEmail", "targetCanOwnMoreGroups", "targetIsGroupMember")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("groupNotMonetized"); - openapiRequiredFields.add("hasVRCPlus"); - openapiRequiredFields.add("hasVerifiedEmail"); - openapiRequiredFields.add("targetCanOwnMoreGroups"); - openapiRequiredFields.add("targetIsGroupMember"); + openapiRequiredFields = new HashSet(Arrays.asList("groupNotMonetized", "hasVRCPlus", "hasVerifiedEmail", "targetCanOwnMoreGroups", "targetIsGroupMember")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GroupTransferableRequirements - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupTransferableRequirements.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupTransferableRequirements is not found in the empty JSON string", GroupTransferableRequirements.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GroupTransferableRequirements + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GroupTransferableRequirements.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in GroupTransferableRequirements is not found in the empty JSON string", GroupTransferableRequirements.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!GroupTransferableRequirements.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupTransferableRequirements` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `GroupTransferableRequirements` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : GroupTransferableRequirements.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -304,31 +277,31 @@ public void write(JsonWriter out, GroupTransferableRequirements value) throws IO @Override public GroupTransferableRequirements read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of GroupTransferableRequirements given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupTransferableRequirements - * @throws IOException if the JSON string is invalid with respect to GroupTransferableRequirements - */ + /** + * Create an instance of GroupTransferableRequirements given an JSON string + * + * @param jsonString JSON string + * @return An instance of GroupTransferableRequirements + * @throws IOException if the JSON string is invalid with respect to GroupTransferableRequirements + */ public static GroupTransferableRequirements fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupTransferableRequirements.class); } - /** - * Convert an instance of GroupTransferableRequirements to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of GroupTransferableRequirements to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/GroupUserVisibility.java b/src/main/java/io/github/vrchatapi/model/GroupUserVisibility.java index fc85710e..17825dd8 100644 --- a/src/main/java/io/github/vrchatapi/model/GroupUserVisibility.java +++ b/src/main/java/io/github/vrchatapi/model/GroupUserVisibility.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -70,5 +70,10 @@ public GroupUserVisibility read(final JsonReader jsonReader) throws IOException return GroupUserVisibility.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GroupUserVisibility.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/ImageAnimationStyle.java b/src/main/java/io/github/vrchatapi/model/ImageAnimationStyle.java index 5b61c214..1bcdee29 100644 --- a/src/main/java/io/github/vrchatapi/model/ImageAnimationStyle.java +++ b/src/main/java/io/github/vrchatapi/model/ImageAnimationStyle.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -119,5 +118,10 @@ public ImageAnimationStyle read(final JsonReader jsonReader) throws IOException return ImageAnimationStyle.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ImageAnimationStyle.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/ImageLoopStyle.java b/src/main/java/io/github/vrchatapi/model/ImageLoopStyle.java index c4ee02e5..a6473991 100644 --- a/src/main/java/io/github/vrchatapi/model/ImageLoopStyle.java +++ b/src/main/java/io/github/vrchatapi/model/ImageLoopStyle.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -69,5 +68,10 @@ public ImageLoopStyle read(final JsonReader jsonReader) throws IOException { return ImageLoopStyle.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ImageLoopStyle.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/ImageMask.java b/src/main/java/io/github/vrchatapi/model/ImageMask.java index c28684e7..81d740ea 100644 --- a/src/main/java/io/github/vrchatapi/model/ImageMask.java +++ b/src/main/java/io/github/vrchatapi/model/ImageMask.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -77,5 +76,10 @@ public ImageMask read(final JsonReader jsonReader) throws IOException { return ImageMask.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ImageMask.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/ImagePurpose.java b/src/main/java/io/github/vrchatapi/model/ImagePurpose.java index ba53757b..be7c46a5 100644 --- a/src/main/java/io/github/vrchatapi/model/ImagePurpose.java +++ b/src/main/java/io/github/vrchatapi/model/ImagePurpose.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -87,5 +86,10 @@ public ImagePurpose read(final JsonReader jsonReader) throws IOException { return ImagePurpose.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ImagePurpose.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/InfoPush.java b/src/main/java/io/github/vrchatapi/model/InfoPush.java index 1383589d..04bb9e61 100644 --- a/src/main/java/io/github/vrchatapi/model/InfoPush.java +++ b/src/main/java/io/github/vrchatapi/model/InfoPush.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,11 +20,10 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InfoPushData; import io.github.vrchatapi.model.ReleaseStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -38,13 +36,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -52,310 +52,279 @@ /** * */ -@ApiModel(description = "") -@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 InfoPush { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull private InfoPushData data; public static final String SERIALIZED_NAME_END_DATE = "endDate"; @SerializedName(SERIALIZED_NAME_END_DATE) + @javax.annotation.Nullable private OffsetDateTime endDate; public static final String SERIALIZED_NAME_HASH = "hash"; @SerializedName(SERIALIZED_NAME_HASH) + @javax.annotation.Nonnull private String hash; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IS_ENABLED = "isEnabled"; @SerializedName(SERIALIZED_NAME_IS_ENABLED) + @javax.annotation.Nonnull private Boolean isEnabled = true; public static final String SERIALIZED_NAME_PRIORITY = "priority"; @SerializedName(SERIALIZED_NAME_PRIORITY) + @javax.annotation.Nonnull private Integer priority; public static final String SERIALIZED_NAME_RELEASE_STATUS = "releaseStatus"; @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) + @javax.annotation.Nonnull private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; public static final String SERIALIZED_NAME_START_DATE = "startDate"; @SerializedName(SERIALIZED_NAME_START_DATE) + @javax.annotation.Nullable private OffsetDateTime startDate; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public InfoPush() { } - public InfoPush createdAt(OffsetDateTime createdAt) { - + public InfoPush createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public InfoPush data(InfoPushData data) { - + public InfoPush data(@javax.annotation.Nonnull InfoPushData data) { this.data = data; return this; } - /** + /** * Get data * @return data - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InfoPushData getData() { return data; } - - public void setData(InfoPushData data) { + public void setData(@javax.annotation.Nonnull InfoPushData data) { this.data = data; } - public InfoPush endDate(OffsetDateTime endDate) { - + public InfoPush endDate(@javax.annotation.Nullable OffsetDateTime endDate) { this.endDate = endDate; return this; } - /** + /** * Get endDate * @return endDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getEndDate() { return endDate; } - - public void setEndDate(OffsetDateTime endDate) { + public void setEndDate(@javax.annotation.Nullable OffsetDateTime endDate) { this.endDate = endDate; } - public InfoPush hash(String hash) { - + public InfoPush hash(@javax.annotation.Nonnull String hash) { this.hash = hash; return this; } - /** + /** * Unknown usage, MD5 * @return hash - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown usage, MD5") - public String getHash() { return hash; } - - public void setHash(String hash) { + public void setHash(@javax.annotation.Nonnull String hash) { this.hash = hash; } - public InfoPush id(String id) { - + public InfoPush id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "launch-beta", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public InfoPush isEnabled(Boolean isEnabled) { - + public InfoPush isEnabled(@javax.annotation.Nonnull Boolean isEnabled) { this.isEnabled = isEnabled; return this; } - /** + /** * Get isEnabled * @return isEnabled - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsEnabled() { return isEnabled; } - - public void setIsEnabled(Boolean isEnabled) { + public void setIsEnabled(@javax.annotation.Nonnull Boolean isEnabled) { this.isEnabled = isEnabled; } - public InfoPush priority(Integer priority) { - + public InfoPush priority(@javax.annotation.Nonnull Integer priority) { this.priority = priority; return this; } - /** + /** * Get priority * @return priority - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPriority() { return priority; } - - public void setPriority(Integer priority) { + public void setPriority(@javax.annotation.Nonnull Integer priority) { this.priority = priority; } - public InfoPush releaseStatus(ReleaseStatus releaseStatus) { - + public InfoPush releaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; return this; } - /** + /** * Get releaseStatus * @return releaseStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ReleaseStatus getReleaseStatus() { return releaseStatus; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { + public void setReleaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; } - public InfoPush startDate(OffsetDateTime startDate) { - + public InfoPush startDate(@javax.annotation.Nullable OffsetDateTime startDate) { this.startDate = startDate; return this; } - /** + /** * * @return startDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getStartDate() { return startDate; } - - public void setStartDate(OffsetDateTime startDate) { + public void setStartDate(@javax.annotation.Nullable OffsetDateTime startDate) { this.startDate = startDate; } - public InfoPush tags(List tags) { - + public InfoPush tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public InfoPush addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public InfoPush updatedAt(OffsetDateTime updatedAt) { - + public InfoPush updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -412,10 +381,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -424,72 +390,55 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("data"); - openapiFields.add("endDate"); - openapiFields.add("hash"); - openapiFields.add("id"); - openapiFields.add("isEnabled"); - openapiFields.add("priority"); - openapiFields.add("releaseStatus"); - openapiFields.add("startDate"); - openapiFields.add("tags"); - openapiFields.add("updatedAt"); + openapiFields = new HashSet(Arrays.asList("createdAt", "data", "endDate", "hash", "id", "isEnabled", "priority", "releaseStatus", "startDate", "tags", "updatedAt")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("hash"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("isEnabled"); - openapiRequiredFields.add("priority"); - openapiRequiredFields.add("releaseStatus"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("updatedAt"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InfoPush - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InfoPush.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InfoPush is not found in the empty JSON string", InfoPush.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("createdAt", "data", "hash", "id", "isEnabled", "priority", "releaseStatus", "tags", "updatedAt")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InfoPush + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InfoPush.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InfoPush is not found in the empty JSON string", InfoPush.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InfoPush.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InfoPush` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InfoPush` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InfoPush.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `data` - InfoPushData.validateJsonObject(jsonObj.getAsJsonObject("data")); + InfoPushData.validateJsonElement(jsonObj.get("data")); if (!jsonObj.get("hash").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hash` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hash").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `hash` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hash").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } + // validate the required field `releaseStatus` + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -513,31 +462,31 @@ public void write(JsonWriter out, InfoPush value) throws IOException { @Override public InfoPush read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InfoPush given an JSON string - * - * @param jsonString JSON string - * @return An instance of InfoPush - * @throws IOException if the JSON string is invalid with respect to InfoPush - */ + /** + * Create an instance of InfoPush given an JSON string + * + * @param jsonString JSON string + * @return An instance of InfoPush + * @throws IOException if the JSON string is invalid with respect to InfoPush + */ public static InfoPush fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InfoPush.class); } - /** - * Convert an instance of InfoPush to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InfoPush to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InfoPushData.java b/src/main/java/io/github/vrchatapi/model/InfoPushData.java index d87bd7aa..5f2080b4 100644 --- a/src/main/java/io/github/vrchatapi/model/InfoPushData.java +++ b/src/main/java/io/github/vrchatapi/model/InfoPushData.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,9 +21,8 @@ import io.github.vrchatapi.model.DynamicContentRow; import io.github.vrchatapi.model.InfoPushDataArticle; import io.github.vrchatapi.model.InfoPushDataClickable; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,224 +50,199 @@ /** * */ -@ApiModel(description = "") -@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 InfoPushData { public static final String SERIALIZED_NAME_ARTICLE = "article"; @SerializedName(SERIALIZED_NAME_ARTICLE) + @javax.annotation.Nullable private InfoPushDataArticle article; public static final String SERIALIZED_NAME_CONTENT_LIST = "contentList"; @SerializedName(SERIALIZED_NAME_CONTENT_LIST) + @javax.annotation.Nullable private DynamicContentRow contentList; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_ON_PRESSED = "onPressed"; @SerializedName(SERIALIZED_NAME_ON_PRESSED) + @javax.annotation.Nullable private InfoPushDataClickable onPressed; public static final String SERIALIZED_NAME_TEMPLATE = "template"; @SerializedName(SERIALIZED_NAME_TEMPLATE) + @javax.annotation.Nullable private String template; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nullable private String version; public InfoPushData() { } - public InfoPushData article(InfoPushDataArticle article) { - + public InfoPushData article(@javax.annotation.Nullable InfoPushDataArticle article) { this.article = article; return this; } - /** + /** * Get article * @return article - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InfoPushDataArticle getArticle() { return article; } - - public void setArticle(InfoPushDataArticle article) { + public void setArticle(@javax.annotation.Nullable InfoPushDataArticle article) { this.article = article; } - public InfoPushData contentList(DynamicContentRow contentList) { - + public InfoPushData contentList(@javax.annotation.Nullable DynamicContentRow contentList) { this.contentList = contentList; return this; } - /** + /** * Get contentList * @return contentList - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public DynamicContentRow getContentList() { return contentList; } - - public void setContentList(DynamicContentRow contentList) { + public void setContentList(@javax.annotation.Nullable DynamicContentRow contentList) { this.contentList = contentList; } - public InfoPushData description(String description) { - + public InfoPushData description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public InfoPushData imageUrl(String imageUrl) { - + public InfoPushData imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public InfoPushData name(String name) { - + public InfoPushData name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public InfoPushData onPressed(InfoPushDataClickable onPressed) { - + public InfoPushData onPressed(@javax.annotation.Nullable InfoPushDataClickable onPressed) { this.onPressed = onPressed; return this; } - /** + /** * Get onPressed * @return onPressed - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InfoPushDataClickable getOnPressed() { return onPressed; } - - public void setOnPressed(InfoPushDataClickable onPressed) { + public void setOnPressed(@javax.annotation.Nullable InfoPushDataClickable onPressed) { this.onPressed = onPressed; } - public InfoPushData template(String template) { - + public InfoPushData template(@javax.annotation.Nullable String template) { this.template = template; return this; } - /** + /** * Get template * @return template - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getTemplate() { return template; } - - public void setTemplate(String template) { + public void setTemplate(@javax.annotation.Nullable String template) { this.template = template; } - public InfoPushData version(String version) { - + public InfoPushData version(@javax.annotation.Nullable String version) { this.version = version; return this; } - /** + /** * Get version * @return version - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "2021.3.4", value = "") - public String getVersion() { return version; } - - public void setVersion(String version) { + public void setVersion(@javax.annotation.Nullable String version) { this.version = version; } @@ -318,10 +293,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -330,66 +302,59 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("article"); - openapiFields.add("contentList"); - openapiFields.add("description"); - openapiFields.add("imageUrl"); - openapiFields.add("name"); - openapiFields.add("onPressed"); - openapiFields.add("template"); - openapiFields.add("version"); + openapiFields = new HashSet(Arrays.asList("article", "contentList", "description", "imageUrl", "name", "onPressed", "template", "version")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InfoPushData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InfoPushData.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InfoPushData is not found in the empty JSON string", InfoPushData.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InfoPushData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InfoPushData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InfoPushData is not found in the empty JSON string", InfoPushData.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InfoPushData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InfoPushData` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InfoPushData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `article` if (jsonObj.get("article") != null && !jsonObj.get("article").isJsonNull()) { - InfoPushDataArticle.validateJsonObject(jsonObj.getAsJsonObject("article")); + InfoPushDataArticle.validateJsonElement(jsonObj.get("article")); } // validate the optional field `contentList` if (jsonObj.get("contentList") != null && !jsonObj.get("contentList").isJsonNull()) { - DynamicContentRow.validateJsonObject(jsonObj.getAsJsonObject("contentList")); + DynamicContentRow.validateJsonElement(jsonObj.get("contentList")); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `onPressed` if (jsonObj.get("onPressed") != null && !jsonObj.get("onPressed").isJsonNull()) { - InfoPushDataClickable.validateJsonObject(jsonObj.getAsJsonObject("onPressed")); + InfoPushDataClickable.validateJsonElement(jsonObj.get("onPressed")); } if ((jsonObj.get("template") != null && !jsonObj.get("template").isJsonNull()) && !jsonObj.get("template").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `template` to be a primitive type in the JSON string but got `%s`", jsonObj.get("template").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `template` to be a primitive type in the JSON string but got `%s`", jsonObj.get("template").toString())); } if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); } } @@ -413,31 +378,31 @@ public void write(JsonWriter out, InfoPushData value) throws IOException { @Override public InfoPushData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InfoPushData given an JSON string - * - * @param jsonString JSON string - * @return An instance of InfoPushData - * @throws IOException if the JSON string is invalid with respect to InfoPushData - */ + /** + * Create an instance of InfoPushData given an JSON string + * + * @param jsonString JSON string + * @return An instance of InfoPushData + * @throws IOException if the JSON string is invalid with respect to InfoPushData + */ public static InfoPushData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InfoPushData.class); } - /** - * Convert an instance of InfoPushData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InfoPushData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InfoPushDataArticle.java b/src/main/java/io/github/vrchatapi/model/InfoPushDataArticle.java index c71d7117..f0de3fa7 100644 --- a/src/main/java/io/github/vrchatapi/model/InfoPushDataArticle.java +++ b/src/main/java/io/github/vrchatapi/model/InfoPushDataArticle.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InfoPushDataArticleContent; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,34 +48,31 @@ /** * InfoPushDataArticle */ -@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 InfoPushDataArticle { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nullable private InfoPushDataArticleContent content; public InfoPushDataArticle() { } - public InfoPushDataArticle content(InfoPushDataArticleContent content) { - + public InfoPushDataArticle content(@javax.annotation.Nullable InfoPushDataArticleContent content) { this.content = content; return this; } - /** + /** * Get content * @return content - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InfoPushDataArticleContent getContent() { return content; } - - public void setContent(InfoPushDataArticleContent content) { + public void setContent(@javax.annotation.Nullable InfoPushDataArticleContent content) { this.content = content; } @@ -112,10 +109,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,36 +118,36 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("content"); + openapiFields = new HashSet(Arrays.asList("content")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InfoPushDataArticle - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InfoPushDataArticle.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InfoPushDataArticle is not found in the empty JSON string", InfoPushDataArticle.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InfoPushDataArticle + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InfoPushDataArticle.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InfoPushDataArticle is not found in the empty JSON string", InfoPushDataArticle.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InfoPushDataArticle.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InfoPushDataArticle` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InfoPushDataArticle` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `content` if (jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) { - InfoPushDataArticleContent.validateJsonObject(jsonObj.getAsJsonObject("content")); + InfoPushDataArticleContent.validateJsonElement(jsonObj.get("content")); } } @@ -177,31 +171,31 @@ public void write(JsonWriter out, InfoPushDataArticle value) throws IOException @Override public InfoPushDataArticle read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InfoPushDataArticle given an JSON string - * - * @param jsonString JSON string - * @return An instance of InfoPushDataArticle - * @throws IOException if the JSON string is invalid with respect to InfoPushDataArticle - */ + /** + * Create an instance of InfoPushDataArticle given an JSON string + * + * @param jsonString JSON string + * @return An instance of InfoPushDataArticle + * @throws IOException if the JSON string is invalid with respect to InfoPushDataArticle + */ public static InfoPushDataArticle fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InfoPushDataArticle.class); } - /** - * Convert an instance of InfoPushDataArticle to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InfoPushDataArticle to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InfoPushDataArticleContent.java b/src/main/java/io/github/vrchatapi/model/InfoPushDataArticleContent.java index 63f915a1..171ed854 100644 --- a/src/main/java/io/github/vrchatapi/model/InfoPushDataArticleContent.java +++ b/src/main/java/io/github/vrchatapi/model/InfoPushDataArticleContent.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InfoPushDataClickable; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,88 +48,79 @@ /** * InfoPushDataArticleContent */ -@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 InfoPushDataArticleContent { public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_ON_PRESSED = "onPressed"; @SerializedName(SERIALIZED_NAME_ON_PRESSED) + @javax.annotation.Nullable private InfoPushDataClickable onPressed; public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) + @javax.annotation.Nullable private String text; public InfoPushDataArticleContent() { } - public InfoPushDataArticleContent imageUrl(String imageUrl) { - + public InfoPushDataArticleContent imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public InfoPushDataArticleContent onPressed(InfoPushDataClickable onPressed) { - + public InfoPushDataArticleContent onPressed(@javax.annotation.Nullable InfoPushDataClickable onPressed) { this.onPressed = onPressed; return this; } - /** + /** * Get onPressed * @return onPressed - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InfoPushDataClickable getOnPressed() { return onPressed; } - - public void setOnPressed(InfoPushDataClickable onPressed) { + public void setOnPressed(@javax.annotation.Nullable InfoPushDataClickable onPressed) { this.onPressed = onPressed; } - public InfoPushDataArticleContent text(String text) { - + public InfoPushDataArticleContent text(@javax.annotation.Nullable String text) { this.text = text; return this; } - /** + /** * Get text * @return text - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getText() { return text; } - - public void setText(String text) { + public void setText(@javax.annotation.Nullable String text) { this.text = text; } @@ -170,10 +161,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -182,44 +170,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("imageUrl"); - openapiFields.add("onPressed"); - openapiFields.add("text"); + openapiFields = new HashSet(Arrays.asList("imageUrl", "onPressed", "text")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InfoPushDataArticleContent - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InfoPushDataArticleContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InfoPushDataArticleContent is not found in the empty JSON string", InfoPushDataArticleContent.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InfoPushDataArticleContent + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InfoPushDataArticleContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InfoPushDataArticleContent is not found in the empty JSON string", InfoPushDataArticleContent.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InfoPushDataArticleContent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InfoPushDataArticleContent` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InfoPushDataArticleContent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } // validate the optional field `onPressed` if (jsonObj.get("onPressed") != null && !jsonObj.get("onPressed").isJsonNull()) { - InfoPushDataClickable.validateJsonObject(jsonObj.getAsJsonObject("onPressed")); + InfoPushDataClickable.validateJsonElement(jsonObj.get("onPressed")); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -243,31 +229,31 @@ public void write(JsonWriter out, InfoPushDataArticleContent value) throws IOExc @Override public InfoPushDataArticleContent read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InfoPushDataArticleContent given an JSON string - * - * @param jsonString JSON string - * @return An instance of InfoPushDataArticleContent - * @throws IOException if the JSON string is invalid with respect to InfoPushDataArticleContent - */ + /** + * Create an instance of InfoPushDataArticleContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of InfoPushDataArticleContent + * @throws IOException if the JSON string is invalid with respect to InfoPushDataArticleContent + */ public static InfoPushDataArticleContent fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InfoPushDataArticleContent.class); } - /** - * Convert an instance of InfoPushDataArticleContent to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InfoPushDataArticleContent to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InfoPushDataClickable.java b/src/main/java/io/github/vrchatapi/model/InfoPushDataClickable.java index 16a70726..00004b32 100644 --- a/src/main/java/io/github/vrchatapi/model/InfoPushDataClickable.java +++ b/src/main/java/io/github/vrchatapi/model/InfoPushDataClickable.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,24 +49,25 @@ /** * InfoPushDataClickable */ -@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 InfoPushDataClickable { public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; @SerializedName(SERIALIZED_NAME_PARAMETERS) - private List parameters = null; + @javax.annotation.Nullable + private List parameters = new ArrayList<>(); /** * Gets or Sets command */ @JsonAdapter(CommandEnum.Adapter.class) public enum CommandEnum { - CANNEDWORLDSEARCH("CannedWorldSearch"), + CANNED_WORLD_SEARCH("CannedWorldSearch"), - OPENSAFETYMENU("OpenSafetyMenu"), + OPEN_SAFETY_MENU("OpenSafetyMenu"), - OPENURL("OpenURL"), + OPEN_URL("OpenURL"), - OPENVRCPLUSMENU("OpenVRCPlusMenu"); + OPEN_VRC_PLUS_MENU("OpenVRCPlusMenu"); private String value; @@ -104,17 +105,22 @@ public CommandEnum read(final JsonReader jsonReader) throws IOException { return CommandEnum.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CommandEnum.fromValue(value); + } } public static final String SERIALIZED_NAME_COMMAND = "command"; @SerializedName(SERIALIZED_NAME_COMMAND) + @javax.annotation.Nonnull private CommandEnum command; public InfoPushDataClickable() { } - public InfoPushDataClickable parameters(List parameters) { - + public InfoPushDataClickable parameters(@javax.annotation.Nullable List parameters) { this.parameters = parameters; return this; } @@ -127,42 +133,35 @@ public InfoPushDataClickable addParametersItem(String parametersItem) { return this; } - /** + /** * In case of OpenURL, this would contain the link. * @return parameters - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "In case of OpenURL, this would contain the link.") - public List getParameters() { return parameters; } - - public void setParameters(List parameters) { + public void setParameters(@javax.annotation.Nullable List parameters) { this.parameters = parameters; } - public InfoPushDataClickable command(CommandEnum command) { - + public InfoPushDataClickable command(@javax.annotation.Nonnull CommandEnum command) { this.command = command; return this; } - /** + /** * Get command * @return command - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "OpenURL", required = true, value = "") - public CommandEnum getCommand() { return command; } - - public void setCommand(CommandEnum command) { + public void setCommand(@javax.annotation.Nonnull CommandEnum command) { this.command = command; } @@ -201,10 +200,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -213,49 +209,49 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("parameters"); - openapiFields.add("command"); + openapiFields = new HashSet(Arrays.asList("parameters", "command")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("command"); + openapiRequiredFields = new HashSet(Arrays.asList("command")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InfoPushDataClickable - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InfoPushDataClickable.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InfoPushDataClickable is not found in the empty JSON string", InfoPushDataClickable.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InfoPushDataClickable + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InfoPushDataClickable.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InfoPushDataClickable is not found in the empty JSON string", InfoPushDataClickable.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InfoPushDataClickable.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InfoPushDataClickable` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InfoPushDataClickable` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InfoPushDataClickable.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `parameters` to be an array in the JSON string but got `%s`", jsonObj.get("parameters").toString())); + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull() && !jsonObj.get("parameters").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parameters` to be an array in the JSON string but got `%s`", jsonObj.get("parameters").toString())); } if (!jsonObj.get("command").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `command` to be a primitive type in the JSON string but got `%s`", jsonObj.get("command").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `command` to be a primitive type in the JSON string but got `%s`", jsonObj.get("command").toString())); } + // validate the required field `command` + CommandEnum.validateJsonElement(jsonObj.get("command")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -278,31 +274,31 @@ public void write(JsonWriter out, InfoPushDataClickable value) throws IOExceptio @Override public InfoPushDataClickable read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InfoPushDataClickable given an JSON string - * - * @param jsonString JSON string - * @return An instance of InfoPushDataClickable - * @throws IOException if the JSON string is invalid with respect to InfoPushDataClickable - */ + /** + * Create an instance of InfoPushDataClickable given an JSON string + * + * @param jsonString JSON string + * @return An instance of InfoPushDataClickable + * @throws IOException if the JSON string is invalid with respect to InfoPushDataClickable + */ public static InfoPushDataClickable fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InfoPushDataClickable.class); } - /** - * Convert an instance of InfoPushDataClickable to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InfoPushDataClickable to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Instance.java b/src/main/java/io/github/vrchatapi/model/Instance.java index 3cc960cb..dab07d6e 100644 --- a/src/main/java/io/github/vrchatapi/model/Instance.java +++ b/src/main/java/io/github/vrchatapi/model/Instance.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -27,11 +26,10 @@ import io.github.vrchatapi.model.LimitedUserInstance; import io.github.vrchatapi.model.Region; import io.github.vrchatapi.model.World; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -45,13 +43,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -59,1145 +59,1029 @@ /** * * `hidden` field is only present if InstanceType is `hidden` aka \"Friends+\", and is instance creator. * `friends` field is only present if InstanceType is `friends` aka \"Friends\", and is instance creator. * `private` field is only present if InstanceType is `private` aka \"Invite\" or \"Invite+\", and is instance creator. */ -@ApiModel(description = "* `hidden` field is only present if InstanceType is `hidden` aka \"Friends+\", and is instance creator. * `friends` field is only present if InstanceType is `friends` aka \"Friends\", and is instance creator. * `private` field is only present if InstanceType is `private` aka \"Invite\" or \"Invite+\", and is instance creator.") -@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 Instance { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) + @javax.annotation.Nullable private Boolean active = true; public static final String SERIALIZED_NAME_AGE_GATE = "ageGate"; @SerializedName(SERIALIZED_NAME_AGE_GATE) + @javax.annotation.Nullable private Boolean ageGate; public static final String SERIALIZED_NAME_CALENDAR_ENTRY_ID = "calendarEntryId"; @SerializedName(SERIALIZED_NAME_CALENDAR_ENTRY_ID) + @javax.annotation.Nullable private String calendarEntryId; public static final String SERIALIZED_NAME_CAN_REQUEST_INVITE = "canRequestInvite"; @SerializedName(SERIALIZED_NAME_CAN_REQUEST_INVITE) + @javax.annotation.Nullable private Boolean canRequestInvite = true; public static final String SERIALIZED_NAME_CAPACITY = "capacity"; @SerializedName(SERIALIZED_NAME_CAPACITY) + @javax.annotation.Nullable private Integer capacity; public static final String SERIALIZED_NAME_CLIENT_NUMBER = "clientNumber"; + @Deprecated @SerializedName(SERIALIZED_NAME_CLIENT_NUMBER) + @javax.annotation.Nonnull private String clientNumber; public static final String SERIALIZED_NAME_CLOSED_AT = "closedAt"; @SerializedName(SERIALIZED_NAME_CLOSED_AT) + @javax.annotation.Nullable private OffsetDateTime closedAt; public static final String SERIALIZED_NAME_CONTENT_SETTINGS = "contentSettings"; @SerializedName(SERIALIZED_NAME_CONTENT_SETTINGS) + @javax.annotation.Nullable private InstanceContentSettings contentSettings; public static final String SERIALIZED_NAME_CREATOR_ID = "creatorId"; @SerializedName(SERIALIZED_NAME_CREATOR_ID) + @javax.annotation.Nullable private String creatorId; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable private String displayName; public static final String SERIALIZED_NAME_FRIENDS = "friends"; @SerializedName(SERIALIZED_NAME_FRIENDS) + @javax.annotation.Nullable private String friends; public static final String SERIALIZED_NAME_FULL = "full"; @SerializedName(SERIALIZED_NAME_FULL) + @javax.annotation.Nonnull private Boolean full = false; public static final String SERIALIZED_NAME_GAME_SERVER_VERSION = "gameServerVersion"; @SerializedName(SERIALIZED_NAME_GAME_SERVER_VERSION) + @javax.annotation.Nullable private Integer gameServerVersion; public static final String SERIALIZED_NAME_GROUP_ACCESS_TYPE = "groupAccessType"; @SerializedName(SERIALIZED_NAME_GROUP_ACCESS_TYPE) + @javax.annotation.Nullable private GroupAccessType groupAccessType = GroupAccessType.MEMBERS; public static final String SERIALIZED_NAME_HARD_CLOSE = "hardClose"; @SerializedName(SERIALIZED_NAME_HARD_CLOSE) + @javax.annotation.Nullable private Boolean hardClose; public static final String SERIALIZED_NAME_HAS_CAPACITY_FOR_YOU = "hasCapacityForYou"; @SerializedName(SERIALIZED_NAME_HAS_CAPACITY_FOR_YOU) + @javax.annotation.Nullable private Boolean hasCapacityForYou; public static final String SERIALIZED_NAME_HIDDEN = "hidden"; @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable private String hidden; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_INSTANCE_ID = "instanceId"; @SerializedName(SERIALIZED_NAME_INSTANCE_ID) + @javax.annotation.Nonnull private String instanceId; public static final String SERIALIZED_NAME_INSTANCE_PERSISTENCE_ENABLED = "instancePersistenceEnabled"; @SerializedName(SERIALIZED_NAME_INSTANCE_PERSISTENCE_ENABLED) + @javax.annotation.Nullable private Boolean instancePersistenceEnabled; public static final String SERIALIZED_NAME_LOCATION = "location"; @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nonnull private String location; public static final String SERIALIZED_NAME_N_USERS = "n_users"; @SerializedName(SERIALIZED_NAME_N_USERS) + @javax.annotation.Nonnull private Integer nUsers; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_NONCE = "nonce"; @SerializedName(SERIALIZED_NAME_NONCE) + @javax.annotation.Nullable private String nonce; public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable private String ownerId; public static final String SERIALIZED_NAME_PERMANENT = "permanent"; @SerializedName(SERIALIZED_NAME_PERMANENT) + @javax.annotation.Nonnull private Boolean permanent = false; public static final String SERIALIZED_NAME_PHOTON_REGION = "photonRegion"; @SerializedName(SERIALIZED_NAME_PHOTON_REGION) + @javax.annotation.Nonnull private Region photonRegion = Region.US; public static final String SERIALIZED_NAME_PLATFORMS = "platforms"; @SerializedName(SERIALIZED_NAME_PLATFORMS) + @javax.annotation.Nonnull private InstancePlatforms platforms; public static final String SERIALIZED_NAME_PLAYER_PERSISTENCE_ENABLED = "playerPersistenceEnabled"; @SerializedName(SERIALIZED_NAME_PLAYER_PERSISTENCE_ENABLED) + @javax.annotation.Nullable private Boolean playerPersistenceEnabled; public static final String SERIALIZED_NAME_PRIVATE = "private"; @SerializedName(SERIALIZED_NAME_PRIVATE) + @javax.annotation.Nullable private String _private; public static final String SERIALIZED_NAME_QUEUE_ENABLED = "queueEnabled"; @SerializedName(SERIALIZED_NAME_QUEUE_ENABLED) + @javax.annotation.Nonnull private Boolean queueEnabled; public static final String SERIALIZED_NAME_QUEUE_SIZE = "queueSize"; @SerializedName(SERIALIZED_NAME_QUEUE_SIZE) + @javax.annotation.Nonnull private Integer queueSize; public static final String SERIALIZED_NAME_RECOMMENDED_CAPACITY = "recommendedCapacity"; @SerializedName(SERIALIZED_NAME_RECOMMENDED_CAPACITY) + @javax.annotation.Nonnull private Integer recommendedCapacity; public static final String SERIALIZED_NAME_REGION = "region"; @SerializedName(SERIALIZED_NAME_REGION) + @javax.annotation.Nonnull private InstanceRegion region = InstanceRegion.US; public static final String SERIALIZED_NAME_ROLE_RESTRICTED = "roleRestricted"; @SerializedName(SERIALIZED_NAME_ROLE_RESTRICTED) + @javax.annotation.Nullable private Boolean roleRestricted; public static final String SERIALIZED_NAME_SECURE_NAME = "secureName"; @SerializedName(SERIALIZED_NAME_SECURE_NAME) + @javax.annotation.Nonnull private String secureName; public static final String SERIALIZED_NAME_SHORT_NAME = "shortName"; @SerializedName(SERIALIZED_NAME_SHORT_NAME) + @javax.annotation.Nullable private String shortName; public static final String SERIALIZED_NAME_STRICT = "strict"; @SerializedName(SERIALIZED_NAME_STRICT) + @javax.annotation.Nonnull private Boolean strict; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private InstanceType type; public static final String SERIALIZED_NAME_USER_COUNT = "userCount"; @SerializedName(SERIALIZED_NAME_USER_COUNT) + @javax.annotation.Nonnull private Integer userCount; public static final String SERIALIZED_NAME_USERS = "users"; @SerializedName(SERIALIZED_NAME_USERS) - private List users = null; + @javax.annotation.Nullable + private List users = new ArrayList<>(); public static final String SERIALIZED_NAME_WORLD = "world"; @SerializedName(SERIALIZED_NAME_WORLD) + @javax.annotation.Nonnull private World world; public static final String SERIALIZED_NAME_WORLD_ID = "worldId"; @SerializedName(SERIALIZED_NAME_WORLD_ID) + @javax.annotation.Nonnull private String worldId; public Instance() { } - public Instance active(Boolean active) { - + public Instance active(@javax.annotation.Nullable Boolean active) { this.active = active; return this; } - /** + /** * Get active * @return active - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - public Boolean getActive() { return active; } - - public void setActive(Boolean active) { + public void setActive(@javax.annotation.Nullable Boolean active) { this.active = active; } - public Instance ageGate(Boolean ageGate) { - + public Instance ageGate(@javax.annotation.Nullable Boolean ageGate) { this.ageGate = ageGate; return this; } - /** + /** * Get ageGate * @return ageGate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getAgeGate() { return ageGate; } - - public void setAgeGate(Boolean ageGate) { + public void setAgeGate(@javax.annotation.Nullable Boolean ageGate) { this.ageGate = ageGate; } - public Instance calendarEntryId(String calendarEntryId) { - + public Instance calendarEntryId(@javax.annotation.Nullable String calendarEntryId) { this.calendarEntryId = calendarEntryId; return this; } - /** + /** * Get calendarEntryId * @return calendarEntryId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getCalendarEntryId() { return calendarEntryId; } - - public void setCalendarEntryId(String calendarEntryId) { + public void setCalendarEntryId(@javax.annotation.Nullable String calendarEntryId) { this.calendarEntryId = calendarEntryId; } - public Instance canRequestInvite(Boolean canRequestInvite) { - + public Instance canRequestInvite(@javax.annotation.Nullable Boolean canRequestInvite) { this.canRequestInvite = canRequestInvite; return this; } - /** + /** * Get canRequestInvite * @return canRequestInvite - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - public Boolean getCanRequestInvite() { return canRequestInvite; } - - public void setCanRequestInvite(Boolean canRequestInvite) { + public void setCanRequestInvite(@javax.annotation.Nullable Boolean canRequestInvite) { this.canRequestInvite = canRequestInvite; } - public Instance capacity(Integer capacity) { - + public Instance capacity(@javax.annotation.Nullable Integer capacity) { this.capacity = capacity; return this; } - /** + /** * Get capacity * minimum: 0 * @return capacity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "8", value = "") - public Integer getCapacity() { return capacity; } - - public void setCapacity(Integer capacity) { + public void setCapacity(@javax.annotation.Nullable Integer capacity) { this.capacity = capacity; } - public Instance clientNumber(String clientNumber) { - + @Deprecated + public Instance clientNumber(@javax.annotation.Nonnull String clientNumber) { this.clientNumber = clientNumber; return this; } - /** + /** * Always returns \"unknown\". * @return clientNumber * @deprecated - **/ + */ @Deprecated @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Always returns \"unknown\".") - public String getClientNumber() { return clientNumber; } - - public void setClientNumber(String clientNumber) { + @Deprecated + public void setClientNumber(@javax.annotation.Nonnull String clientNumber) { this.clientNumber = clientNumber; } - public Instance closedAt(OffsetDateTime closedAt) { - + public Instance closedAt(@javax.annotation.Nullable OffsetDateTime closedAt) { this.closedAt = closedAt; return this; } - /** + /** * Get closedAt * @return closedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getClosedAt() { return closedAt; } - - public void setClosedAt(OffsetDateTime closedAt) { + public void setClosedAt(@javax.annotation.Nullable OffsetDateTime closedAt) { this.closedAt = closedAt; } - public Instance contentSettings(InstanceContentSettings contentSettings) { - + public Instance contentSettings(@javax.annotation.Nullable InstanceContentSettings contentSettings) { this.contentSettings = contentSettings; return this; } - /** + /** * Get contentSettings * @return contentSettings - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InstanceContentSettings getContentSettings() { return contentSettings; } - - public void setContentSettings(InstanceContentSettings contentSettings) { + public void setContentSettings(@javax.annotation.Nullable InstanceContentSettings contentSettings) { this.contentSettings = contentSettings; } - public Instance creatorId(String creatorId) { - + public Instance creatorId(@javax.annotation.Nullable String creatorId) { this.creatorId = creatorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return creatorId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getCreatorId() { return creatorId; } - - public void setCreatorId(String creatorId) { + public void setCreatorId(@javax.annotation.Nullable String creatorId) { this.creatorId = creatorId; } - public Instance displayName(String displayName) { - + public Instance displayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; } - public Instance friends(String friends) { - + public Instance friends(@javax.annotation.Nullable String friends) { this.friends = friends; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return friends - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getFriends() { return friends; } - - public void setFriends(String friends) { + public void setFriends(@javax.annotation.Nullable String friends) { this.friends = friends; } - public Instance full(Boolean full) { - + public Instance full(@javax.annotation.Nonnull Boolean full) { this.full = full; return this; } - /** + /** * Get full * @return full - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getFull() { return full; } - - public void setFull(Boolean full) { + public void setFull(@javax.annotation.Nonnull Boolean full) { this.full = full; } - public Instance gameServerVersion(Integer gameServerVersion) { - + public Instance gameServerVersion(@javax.annotation.Nullable Integer gameServerVersion) { this.gameServerVersion = gameServerVersion; return this; } - /** + /** * Get gameServerVersion * @return gameServerVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getGameServerVersion() { return gameServerVersion; } - - public void setGameServerVersion(Integer gameServerVersion) { + public void setGameServerVersion(@javax.annotation.Nullable Integer gameServerVersion) { this.gameServerVersion = gameServerVersion; } - public Instance groupAccessType(GroupAccessType groupAccessType) { - + public Instance groupAccessType(@javax.annotation.Nullable GroupAccessType groupAccessType) { this.groupAccessType = groupAccessType; return this; } - /** + /** * Get groupAccessType * @return groupAccessType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupAccessType getGroupAccessType() { return groupAccessType; } - - public void setGroupAccessType(GroupAccessType groupAccessType) { + public void setGroupAccessType(@javax.annotation.Nullable GroupAccessType groupAccessType) { this.groupAccessType = groupAccessType; } - public Instance hardClose(Boolean hardClose) { - + public Instance hardClose(@javax.annotation.Nullable Boolean hardClose) { this.hardClose = hardClose; return this; } - /** + /** * Get hardClose * @return hardClose - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getHardClose() { return hardClose; } - - public void setHardClose(Boolean hardClose) { + public void setHardClose(@javax.annotation.Nullable Boolean hardClose) { this.hardClose = hardClose; } - public Instance hasCapacityForYou(Boolean hasCapacityForYou) { - + public Instance hasCapacityForYou(@javax.annotation.Nullable Boolean hasCapacityForYou) { this.hasCapacityForYou = hasCapacityForYou; return this; } - /** + /** * Get hasCapacityForYou * @return hasCapacityForYou - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getHasCapacityForYou() { return hasCapacityForYou; } - - public void setHasCapacityForYou(Boolean hasCapacityForYou) { + public void setHasCapacityForYou(@javax.annotation.Nullable Boolean hasCapacityForYou) { this.hasCapacityForYou = hasCapacityForYou; } - public Instance hidden(String hidden) { - + public Instance hidden(@javax.annotation.Nullable String hidden) { this.hidden = hidden; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return hidden - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getHidden() { return hidden; } - - public void setHidden(String hidden) { + public void setHidden(@javax.annotation.Nullable String hidden) { this.hidden = hidden; } - public Instance id(String id) { - + public Instance id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)", required = true, value = "InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Instance instanceId(String instanceId) { - + public Instance instanceId(@javax.annotation.Nonnull String instanceId) { this.instanceId = instanceId; return this; } - /** + /** * InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. * @return instanceId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)", required = true, value = "InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance.") - public String getInstanceId() { return instanceId; } - - public void setInstanceId(String instanceId) { + public void setInstanceId(@javax.annotation.Nonnull String instanceId) { this.instanceId = instanceId; } - public Instance instancePersistenceEnabled(Boolean instancePersistenceEnabled) { - + public Instance instancePersistenceEnabled(@javax.annotation.Nullable Boolean instancePersistenceEnabled) { this.instancePersistenceEnabled = instancePersistenceEnabled; return this; } - /** + /** * Get instancePersistenceEnabled * @return instancePersistenceEnabled - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getInstancePersistenceEnabled() { return instancePersistenceEnabled; } - - public void setInstancePersistenceEnabled(Boolean instancePersistenceEnabled) { + public void setInstancePersistenceEnabled(@javax.annotation.Nullable Boolean instancePersistenceEnabled) { this.instancePersistenceEnabled = instancePersistenceEnabled; } - public Instance location(String location) { - + public Instance location(@javax.annotation.Nonnull String location) { this.location = location; return this; } - /** + /** * Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list. * @return location - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd:12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)", required = true, value = "Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list.") - public String getLocation() { return location; } - - public void setLocation(String location) { + public void setLocation(@javax.annotation.Nonnull String location) { this.location = location; } - public Instance nUsers(Integer nUsers) { - + public Instance nUsers(@javax.annotation.Nonnull Integer nUsers) { this.nUsers = nUsers; return this; } - /** + /** * Get nUsers * minimum: 0 * @return nUsers - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "6", required = true, value = "") - public Integer getnUsers() { return nUsers; } - - public void setnUsers(Integer nUsers) { + public void setnUsers(@javax.annotation.Nonnull Integer nUsers) { this.nUsers = nUsers; } - public Instance name(String name) { - + public Instance name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "12345", required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public Instance nonce(String nonce) { - + public Instance nonce(@javax.annotation.Nullable String nonce) { this.nonce = nonce; return this; } - /** + /** * Get nonce * @return nonce - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getNonce() { return nonce; } - - public void setNonce(String nonce) { + public void setNonce(@javax.annotation.Nullable String nonce) { this.nonce = nonce; } - public Instance ownerId(String ownerId) { - + public Instance ownerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; return this; } - /** + /** * A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise * @return ownerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise") - public String getOwnerId() { return ownerId; } - - public void setOwnerId(String ownerId) { + public void setOwnerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; } - public Instance permanent(Boolean permanent) { - + public Instance permanent(@javax.annotation.Nonnull Boolean permanent) { this.permanent = permanent; return this; } - /** + /** * Get permanent * @return permanent - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getPermanent() { return permanent; } - - public void setPermanent(Boolean permanent) { + public void setPermanent(@javax.annotation.Nonnull Boolean permanent) { this.permanent = permanent; } - public Instance photonRegion(Region photonRegion) { - + public Instance photonRegion(@javax.annotation.Nonnull Region photonRegion) { this.photonRegion = photonRegion; return this; } - /** + /** * Get photonRegion * @return photonRegion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Region getPhotonRegion() { return photonRegion; } - - public void setPhotonRegion(Region photonRegion) { + public void setPhotonRegion(@javax.annotation.Nonnull Region photonRegion) { this.photonRegion = photonRegion; } - public Instance platforms(InstancePlatforms platforms) { - + public Instance platforms(@javax.annotation.Nonnull InstancePlatforms platforms) { this.platforms = platforms; return this; } - /** + /** * Get platforms * @return platforms - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InstancePlatforms getPlatforms() { return platforms; } - - public void setPlatforms(InstancePlatforms platforms) { + public void setPlatforms(@javax.annotation.Nonnull InstancePlatforms platforms) { this.platforms = platforms; } - public Instance playerPersistenceEnabled(Boolean playerPersistenceEnabled) { - + public Instance playerPersistenceEnabled(@javax.annotation.Nullable Boolean playerPersistenceEnabled) { this.playerPersistenceEnabled = playerPersistenceEnabled; return this; } - /** + /** * Get playerPersistenceEnabled * @return playerPersistenceEnabled - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getPlayerPersistenceEnabled() { return playerPersistenceEnabled; } - - public void setPlayerPersistenceEnabled(Boolean playerPersistenceEnabled) { + public void setPlayerPersistenceEnabled(@javax.annotation.Nullable Boolean playerPersistenceEnabled) { this.playerPersistenceEnabled = playerPersistenceEnabled; } - public Instance _private(String _private) { - + public Instance _private(@javax.annotation.Nullable String _private) { this._private = _private; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return _private - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getPrivate() { return _private; } - - public void setPrivate(String _private) { + public void setPrivate(@javax.annotation.Nullable String _private) { this._private = _private; } - public Instance queueEnabled(Boolean queueEnabled) { - + public Instance queueEnabled(@javax.annotation.Nonnull Boolean queueEnabled) { this.queueEnabled = queueEnabled; return this; } - /** + /** * Get queueEnabled * @return queueEnabled - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getQueueEnabled() { return queueEnabled; } - - public void setQueueEnabled(Boolean queueEnabled) { + public void setQueueEnabled(@javax.annotation.Nonnull Boolean queueEnabled) { this.queueEnabled = queueEnabled; } - public Instance queueSize(Integer queueSize) { - + public Instance queueSize(@javax.annotation.Nonnull Integer queueSize) { this.queueSize = queueSize; return this; } - /** + /** * Get queueSize * minimum: 0 * @return queueSize - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "6", required = true, value = "") - public Integer getQueueSize() { return queueSize; } - - public void setQueueSize(Integer queueSize) { + public void setQueueSize(@javax.annotation.Nonnull Integer queueSize) { this.queueSize = queueSize; } - public Instance recommendedCapacity(Integer recommendedCapacity) { - + public Instance recommendedCapacity(@javax.annotation.Nonnull Integer recommendedCapacity) { this.recommendedCapacity = recommendedCapacity; return this; } - /** + /** * Get recommendedCapacity * minimum: 0 * @return recommendedCapacity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "6", required = true, value = "") - public Integer getRecommendedCapacity() { return recommendedCapacity; } - - public void setRecommendedCapacity(Integer recommendedCapacity) { + public void setRecommendedCapacity(@javax.annotation.Nonnull Integer recommendedCapacity) { this.recommendedCapacity = recommendedCapacity; } - public Instance region(InstanceRegion region) { - + public Instance region(@javax.annotation.Nonnull InstanceRegion region) { this.region = region; return this; } - /** + /** * Get region * @return region - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InstanceRegion getRegion() { return region; } - - public void setRegion(InstanceRegion region) { + public void setRegion(@javax.annotation.Nonnull InstanceRegion region) { this.region = region; } - public Instance roleRestricted(Boolean roleRestricted) { - + public Instance roleRestricted(@javax.annotation.Nullable Boolean roleRestricted) { this.roleRestricted = roleRestricted; return this; } - /** + /** * Get roleRestricted * @return roleRestricted - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getRoleRestricted() { return roleRestricted; } - - public void setRoleRestricted(Boolean roleRestricted) { + public void setRoleRestricted(@javax.annotation.Nullable Boolean roleRestricted) { this.roleRestricted = roleRestricted; } - public Instance secureName(String secureName) { - + public Instance secureName(@javax.annotation.Nonnull String secureName) { this.secureName = secureName; return this; } - /** + /** * Get secureName * @return secureName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "7eavhhng", required = true, value = "") - public String getSecureName() { return secureName; } - - public void setSecureName(String secureName) { + public void setSecureName(@javax.annotation.Nonnull String secureName) { this.secureName = secureName; } - public Instance shortName(String shortName) { - + public Instance shortName(@javax.annotation.Nullable String shortName) { this.shortName = shortName; return this; } - /** + /** * Get shortName * @return shortName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "02u7yz8j", value = "") - public String getShortName() { return shortName; } - - public void setShortName(String shortName) { + public void setShortName(@javax.annotation.Nullable String shortName) { this.shortName = shortName; } - public Instance strict(Boolean strict) { - + public Instance strict(@javax.annotation.Nonnull Boolean strict) { this.strict = strict; return this; } - /** + /** * Get strict * @return strict - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getStrict() { return strict; } - - public void setStrict(Boolean strict) { + public void setStrict(@javax.annotation.Nonnull Boolean strict) { this.strict = strict; } - public Instance tags(List tags) { - + public Instance tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public Instance addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * The tags array on Instances usually contain the language tags of the people in the instance. * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "[\"language_eng\",\"language_jpn\",\"show_social_rank\"]", required = true, value = "The tags array on Instances usually contain the language tags of the people in the instance. ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public Instance type(InstanceType type) { - + public Instance type(@javax.annotation.Nonnull InstanceType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InstanceType getType() { return type; } - - public void setType(InstanceType type) { + public void setType(@javax.annotation.Nonnull InstanceType type) { this.type = type; } - public Instance userCount(Integer userCount) { - + public Instance userCount(@javax.annotation.Nonnull Integer userCount) { this.userCount = userCount; return this; } - /** + /** * Get userCount * minimum: 0 * @return userCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "6", required = true, value = "") - public Integer getUserCount() { return userCount; } - - public void setUserCount(Integer userCount) { + public void setUserCount(@javax.annotation.Nonnull Integer userCount) { this.userCount = userCount; } - public Instance users(List users) { - + public Instance users(@javax.annotation.Nullable List users) { this.users = users; return this; } @@ -1210,65 +1094,54 @@ public Instance addUsersItem(LimitedUserInstance usersItem) { return this; } - /** + /** * The users field is present on instances created by the requesting user. * @return users - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The users field is present on instances created by the requesting user.") - public List getUsers() { return users; } - - public void setUsers(List users) { + public void setUsers(@javax.annotation.Nullable List users) { this.users = users; } - public Instance world(World world) { - + public Instance world(@javax.annotation.Nonnull World world) { this.world = world; return this; } - /** + /** * Get world * @return world - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public World getWorld() { return world; } - - public void setWorld(World world) { + public void setWorld(@javax.annotation.Nonnull World world) { this.world = world; } - public Instance worldId(String worldId) { - + public Instance worldId(@javax.annotation.Nonnull String worldId) { this.worldId = worldId; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return worldId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getWorldId() { return worldId; } - - public void setWorldId(String worldId) { + public void setWorldId(@javax.annotation.Nonnull String worldId) { this.worldId = worldId; } @@ -1402,10 +1275,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -1414,179 +1284,125 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("active"); - openapiFields.add("ageGate"); - openapiFields.add("calendarEntryId"); - openapiFields.add("canRequestInvite"); - openapiFields.add("capacity"); - openapiFields.add("clientNumber"); - openapiFields.add("closedAt"); - openapiFields.add("contentSettings"); - openapiFields.add("creatorId"); - openapiFields.add("displayName"); - openapiFields.add("friends"); - openapiFields.add("full"); - openapiFields.add("gameServerVersion"); - openapiFields.add("groupAccessType"); - openapiFields.add("hardClose"); - openapiFields.add("hasCapacityForYou"); - openapiFields.add("hidden"); - openapiFields.add("id"); - openapiFields.add("instanceId"); - openapiFields.add("instancePersistenceEnabled"); - openapiFields.add("location"); - openapiFields.add("n_users"); - openapiFields.add("name"); - openapiFields.add("nonce"); - openapiFields.add("ownerId"); - openapiFields.add("permanent"); - openapiFields.add("photonRegion"); - openapiFields.add("platforms"); - openapiFields.add("playerPersistenceEnabled"); - openapiFields.add("private"); - openapiFields.add("queueEnabled"); - openapiFields.add("queueSize"); - openapiFields.add("recommendedCapacity"); - openapiFields.add("region"); - openapiFields.add("roleRestricted"); - openapiFields.add("secureName"); - openapiFields.add("shortName"); - openapiFields.add("strict"); - openapiFields.add("tags"); - openapiFields.add("type"); - openapiFields.add("userCount"); - openapiFields.add("users"); - openapiFields.add("world"); - openapiFields.add("worldId"); + openapiFields = new HashSet(Arrays.asList("active", "ageGate", "calendarEntryId", "canRequestInvite", "capacity", "clientNumber", "closedAt", "contentSettings", "creatorId", "displayName", "friends", "full", "gameServerVersion", "groupAccessType", "hardClose", "hasCapacityForYou", "hidden", "id", "instanceId", "instancePersistenceEnabled", "location", "n_users", "name", "nonce", "ownerId", "permanent", "photonRegion", "platforms", "playerPersistenceEnabled", "private", "queueEnabled", "queueSize", "recommendedCapacity", "region", "roleRestricted", "secureName", "shortName", "strict", "tags", "type", "userCount", "users", "world", "worldId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("clientNumber"); - openapiRequiredFields.add("full"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("instanceId"); - openapiRequiredFields.add("location"); - openapiRequiredFields.add("n_users"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("permanent"); - openapiRequiredFields.add("photonRegion"); - openapiRequiredFields.add("platforms"); - openapiRequiredFields.add("queueEnabled"); - openapiRequiredFields.add("queueSize"); - openapiRequiredFields.add("recommendedCapacity"); - openapiRequiredFields.add("region"); - openapiRequiredFields.add("secureName"); - openapiRequiredFields.add("strict"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("userCount"); - openapiRequiredFields.add("world"); - openapiRequiredFields.add("worldId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Instance - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Instance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Instance is not found in the empty JSON string", Instance.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("clientNumber", "full", "id", "instanceId", "location", "n_users", "name", "permanent", "photonRegion", "platforms", "queueEnabled", "queueSize", "recommendedCapacity", "region", "secureName", "strict", "tags", "type", "userCount", "world", "worldId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Instance + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Instance.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Instance is not found in the empty JSON string", Instance.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Instance.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Instance` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Instance` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Instance.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("calendarEntryId") != null && !jsonObj.get("calendarEntryId").isJsonNull()) && !jsonObj.get("calendarEntryId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `calendarEntryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calendarEntryId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `calendarEntryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calendarEntryId").toString())); } if (!jsonObj.get("clientNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clientNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clientNumber").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `clientNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clientNumber").toString())); } // validate the optional field `contentSettings` if (jsonObj.get("contentSettings") != null && !jsonObj.get("contentSettings").isJsonNull()) { - InstanceContentSettings.validateJsonObject(jsonObj.getAsJsonObject("contentSettings")); + InstanceContentSettings.validateJsonElement(jsonObj.get("contentSettings")); } if ((jsonObj.get("creatorId") != null && !jsonObj.get("creatorId").isJsonNull()) && !jsonObj.get("creatorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `creatorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creatorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `creatorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creatorId").toString())); } if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("friends") != null && !jsonObj.get("friends").isJsonNull()) && !jsonObj.get("friends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `friends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friends").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `friends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friends").toString())); + } + // validate the optional field `groupAccessType` + if (jsonObj.get("groupAccessType") != null && !jsonObj.get("groupAccessType").isJsonNull()) { + GroupAccessType.validateJsonElement(jsonObj.get("groupAccessType")); } if ((jsonObj.get("hidden") != null && !jsonObj.get("hidden").isJsonNull()) && !jsonObj.get("hidden").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hidden` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hidden").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `hidden` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hidden").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("instanceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `instanceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `instanceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceId").toString())); } if (!jsonObj.get("location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("nonce") != null && !jsonObj.get("nonce").isJsonNull()) && !jsonObj.get("nonce").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonce` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonce").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `nonce` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonce").toString())); } if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); } + // validate the required field `photonRegion` + Region.validateJsonElement(jsonObj.get("photonRegion")); // validate the required field `platforms` - InstancePlatforms.validateJsonObject(jsonObj.getAsJsonObject("platforms")); + InstancePlatforms.validateJsonElement(jsonObj.get("platforms")); if ((jsonObj.get("private") != null && !jsonObj.get("private").isJsonNull()) && !jsonObj.get("private").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `private` to be a primitive type in the JSON string but got `%s`", jsonObj.get("private").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `private` to be a primitive type in the JSON string but got `%s`", jsonObj.get("private").toString())); } + // validate the required field `region` + InstanceRegion.validateJsonElement(jsonObj.get("region")); if (!jsonObj.get("secureName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secureName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secureName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `secureName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secureName").toString())); } if ((jsonObj.get("shortName") != null && !jsonObj.get("shortName").isJsonNull()) && !jsonObj.get("shortName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `shortName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shortName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortName").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } + // validate the required field `type` + InstanceType.validateJsonElement(jsonObj.get("type")); if (jsonObj.get("users") != null && !jsonObj.get("users").isJsonNull()) { JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); if (jsonArrayusers != null) { // ensure the json data is an array if (!jsonObj.get("users").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); } // validate the optional field `users` (array) for (int i = 0; i < jsonArrayusers.size(); i++) { - LimitedUserInstance.validateJsonObject(jsonArrayusers.get(i).getAsJsonObject()); + LimitedUserInstance.validateJsonElement(jsonArrayusers.get(i)); }; } } // validate the required field `world` - World.validateJsonObject(jsonObj.getAsJsonObject("world")); + World.validateJsonElement(jsonObj.get("world")); if (!jsonObj.get("worldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); } } @@ -1610,31 +1426,31 @@ public void write(JsonWriter out, Instance value) throws IOException { @Override public Instance read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Instance given an JSON string - * - * @param jsonString JSON string - * @return An instance of Instance - * @throws IOException if the JSON string is invalid with respect to Instance - */ + /** + * Create an instance of Instance given an JSON string + * + * @param jsonString JSON string + * @return An instance of Instance + * @throws IOException if the JSON string is invalid with respect to Instance + */ public static Instance fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Instance.class); } - /** - * Convert an instance of Instance to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Instance to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InstanceContentSettings.java b/src/main/java/io/github/vrchatapi/model/InstanceContentSettings.java index 00959e8d..f8a8bb6f 100644 --- a/src/main/java/io/github/vrchatapi/model/InstanceContentSettings.java +++ b/src/main/java/io/github/vrchatapi/model/InstanceContentSettings.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,170 +47,151 @@ /** * Types of dynamic user content permitted in an instance */ -@ApiModel(description = "Types of dynamic user content permitted in an instance") -@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 InstanceContentSettings { public static final String SERIALIZED_NAME_DRONES = "drones"; @SerializedName(SERIALIZED_NAME_DRONES) + @javax.annotation.Nullable private Boolean drones = true; public static final String SERIALIZED_NAME_EMOJI = "emoji"; @SerializedName(SERIALIZED_NAME_EMOJI) + @javax.annotation.Nullable private Boolean emoji = true; public static final String SERIALIZED_NAME_PEDESTALS = "pedestals"; @SerializedName(SERIALIZED_NAME_PEDESTALS) + @javax.annotation.Nullable private Boolean pedestals = true; public static final String SERIALIZED_NAME_PRINTS = "prints"; @SerializedName(SERIALIZED_NAME_PRINTS) + @javax.annotation.Nullable private Boolean prints = true; public static final String SERIALIZED_NAME_PROPS = "props"; @SerializedName(SERIALIZED_NAME_PROPS) + @javax.annotation.Nullable private Boolean props = true; public static final String SERIALIZED_NAME_STICKERS = "stickers"; @SerializedName(SERIALIZED_NAME_STICKERS) + @javax.annotation.Nullable private Boolean stickers = true; public InstanceContentSettings() { } - public InstanceContentSettings drones(Boolean drones) { - + public InstanceContentSettings drones(@javax.annotation.Nullable Boolean drones) { this.drones = drones; return this; } - /** + /** * Get drones * @return drones - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getDrones() { return drones; } - - public void setDrones(Boolean drones) { + public void setDrones(@javax.annotation.Nullable Boolean drones) { this.drones = drones; } - public InstanceContentSettings emoji(Boolean emoji) { - + public InstanceContentSettings emoji(@javax.annotation.Nullable Boolean emoji) { this.emoji = emoji; return this; } - /** + /** * Get emoji * @return emoji - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getEmoji() { return emoji; } - - public void setEmoji(Boolean emoji) { + public void setEmoji(@javax.annotation.Nullable Boolean emoji) { this.emoji = emoji; } - public InstanceContentSettings pedestals(Boolean pedestals) { - + public InstanceContentSettings pedestals(@javax.annotation.Nullable Boolean pedestals) { this.pedestals = pedestals; return this; } - /** + /** * Get pedestals * @return pedestals - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getPedestals() { return pedestals; } - - public void setPedestals(Boolean pedestals) { + public void setPedestals(@javax.annotation.Nullable Boolean pedestals) { this.pedestals = pedestals; } - public InstanceContentSettings prints(Boolean prints) { - + public InstanceContentSettings prints(@javax.annotation.Nullable Boolean prints) { this.prints = prints; return this; } - /** + /** * Get prints * @return prints - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getPrints() { return prints; } - - public void setPrints(Boolean prints) { + public void setPrints(@javax.annotation.Nullable Boolean prints) { this.prints = prints; } - public InstanceContentSettings props(Boolean props) { - + public InstanceContentSettings props(@javax.annotation.Nullable Boolean props) { this.props = props; return this; } - /** + /** * Get props * @return props - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getProps() { return props; } - - public void setProps(Boolean props) { + public void setProps(@javax.annotation.Nullable Boolean props) { this.props = props; } - public InstanceContentSettings stickers(Boolean stickers) { - + public InstanceContentSettings stickers(@javax.annotation.Nullable Boolean stickers) { this.stickers = stickers; return this; } - /** + /** * Get stickers * @return stickers - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getStickers() { return stickers; } - - public void setStickers(Boolean stickers) { + public void setStickers(@javax.annotation.Nullable Boolean stickers) { this.stickers = stickers; } @@ -257,10 +238,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -269,38 +247,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("drones"); - openapiFields.add("emoji"); - openapiFields.add("pedestals"); - openapiFields.add("prints"); - openapiFields.add("props"); - openapiFields.add("stickers"); + openapiFields = new HashSet(Arrays.asList("drones", "emoji", "pedestals", "prints", "props", "stickers")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InstanceContentSettings - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InstanceContentSettings.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InstanceContentSettings is not found in the empty JSON string", InstanceContentSettings.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InstanceContentSettings + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InstanceContentSettings.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InstanceContentSettings is not found in the empty JSON string", InstanceContentSettings.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InstanceContentSettings.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InstanceContentSettings` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InstanceContentSettings` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -323,31 +296,31 @@ public void write(JsonWriter out, InstanceContentSettings value) throws IOExcept @Override public InstanceContentSettings read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InstanceContentSettings given an JSON string - * - * @param jsonString JSON string - * @return An instance of InstanceContentSettings - * @throws IOException if the JSON string is invalid with respect to InstanceContentSettings - */ + /** + * Create an instance of InstanceContentSettings given an JSON string + * + * @param jsonString JSON string + * @return An instance of InstanceContentSettings + * @throws IOException if the JSON string is invalid with respect to InstanceContentSettings + */ public static InstanceContentSettings fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InstanceContentSettings.class); } - /** - * Convert an instance of InstanceContentSettings to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InstanceContentSettings to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InstancePlatforms.java b/src/main/java/io/github/vrchatapi/model/InstancePlatforms.java index a8cfd4d4..1c9d90e1 100644 --- a/src/main/java/io/github/vrchatapi/model/InstancePlatforms.java +++ b/src/main/java/io/github/vrchatapi/model/InstancePlatforms.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,91 +47,82 @@ /** * InstancePlatforms */ -@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 InstancePlatforms { public static final String SERIALIZED_NAME_ANDROID = "android"; @SerializedName(SERIALIZED_NAME_ANDROID) + @javax.annotation.Nonnull private Integer android; public static final String SERIALIZED_NAME_IOS = "ios"; @SerializedName(SERIALIZED_NAME_IOS) + @javax.annotation.Nullable private Integer ios; public static final String SERIALIZED_NAME_STANDALONEWINDOWS = "standalonewindows"; @SerializedName(SERIALIZED_NAME_STANDALONEWINDOWS) + @javax.annotation.Nonnull private Integer standalonewindows; public InstancePlatforms() { } - public InstancePlatforms android(Integer android) { - + public InstancePlatforms android(@javax.annotation.Nonnull Integer android) { this.android = android; return this; } - /** + /** * Get android * minimum: 0 * @return android - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "1", required = true, value = "") - public Integer getAndroid() { return android; } - - public void setAndroid(Integer android) { + public void setAndroid(@javax.annotation.Nonnull Integer android) { this.android = android; } - public InstancePlatforms ios(Integer ios) { - + public InstancePlatforms ios(@javax.annotation.Nullable Integer ios) { this.ios = ios; return this; } - /** + /** * Get ios * minimum: 0 * @return ios - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1", value = "") - public Integer getIos() { return ios; } - - public void setIos(Integer ios) { + public void setIos(@javax.annotation.Nullable Integer ios) { this.ios = ios; } - public InstancePlatforms standalonewindows(Integer standalonewindows) { - + public InstancePlatforms standalonewindows(@javax.annotation.Nonnull Integer standalonewindows) { this.standalonewindows = standalonewindows; return this; } - /** + /** * Get standalonewindows * minimum: 0 * @return standalonewindows - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "5", required = true, value = "") - public Integer getStandalonewindows() { return standalonewindows; } - - public void setStandalonewindows(Integer standalonewindows) { + public void setStandalonewindows(@javax.annotation.Nonnull Integer standalonewindows) { this.standalonewindows = standalonewindows; } @@ -172,10 +163,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -184,44 +172,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("android"); - openapiFields.add("ios"); - openapiFields.add("standalonewindows"); + openapiFields = new HashSet(Arrays.asList("android", "ios", "standalonewindows")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("android"); - openapiRequiredFields.add("standalonewindows"); + openapiRequiredFields = new HashSet(Arrays.asList("android", "standalonewindows")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InstancePlatforms - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InstancePlatforms.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InstancePlatforms is not found in the empty JSON string", InstancePlatforms.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InstancePlatforms + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InstancePlatforms.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InstancePlatforms is not found in the empty JSON string", InstancePlatforms.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InstancePlatforms.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InstancePlatforms` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InstancePlatforms` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InstancePlatforms.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -244,31 +228,31 @@ public void write(JsonWriter out, InstancePlatforms value) throws IOException { @Override public InstancePlatforms read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InstancePlatforms given an JSON string - * - * @param jsonString JSON string - * @return An instance of InstancePlatforms - * @throws IOException if the JSON string is invalid with respect to InstancePlatforms - */ + /** + * Create an instance of InstancePlatforms given an JSON string + * + * @param jsonString JSON string + * @return An instance of InstancePlatforms + * @throws IOException if the JSON string is invalid with respect to InstancePlatforms + */ public static InstancePlatforms fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InstancePlatforms.class); } - /** - * Convert an instance of InstancePlatforms to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InstancePlatforms to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InstanceRegion.java b/src/main/java/io/github/vrchatapi/model/InstanceRegion.java index 81d87e91..2aac76ab 100644 --- a/src/main/java/io/github/vrchatapi/model/InstanceRegion.java +++ b/src/main/java/io/github/vrchatapi/model/InstanceRegion.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -75,5 +74,10 @@ public InstanceRegion read(final JsonReader jsonReader) throws IOException { return InstanceRegion.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InstanceRegion.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/InstanceShortNameResponse.java b/src/main/java/io/github/vrchatapi/model/InstanceShortNameResponse.java index 3a090b5b..58482cae 100644 --- a/src/main/java/io/github/vrchatapi/model/InstanceShortNameResponse.java +++ b/src/main/java/io/github/vrchatapi/model/InstanceShortNameResponse.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,61 +48,55 @@ /** * InstanceShortNameResponse */ -@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 InstanceShortNameResponse { public static final String SERIALIZED_NAME_SECURE_NAME = "secureName"; @SerializedName(SERIALIZED_NAME_SECURE_NAME) + @javax.annotation.Nonnull private String secureName; public static final String SERIALIZED_NAME_SHORT_NAME = "shortName"; @SerializedName(SERIALIZED_NAME_SHORT_NAME) + @javax.annotation.Nullable private String shortName; public InstanceShortNameResponse() { } - public InstanceShortNameResponse secureName(String secureName) { - + public InstanceShortNameResponse secureName(@javax.annotation.Nonnull String secureName) { this.secureName = secureName; return this; } - /** + /** * Get secureName * @return secureName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "7eavhhng", required = true, value = "") - public String getSecureName() { return secureName; } - - public void setSecureName(String secureName) { + public void setSecureName(@javax.annotation.Nonnull String secureName) { this.secureName = secureName; } - public InstanceShortNameResponse shortName(String shortName) { - + public InstanceShortNameResponse shortName(@javax.annotation.Nullable String shortName) { this.shortName = shortName; return this; } - /** + /** * Get shortName * @return shortName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "02u7yz8j", value = "") - public String getShortName() { return shortName; } - - public void setShortName(String shortName) { + public void setShortName(@javax.annotation.Nullable String shortName) { this.shortName = shortName; } @@ -152,10 +146,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -164,47 +155,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("secureName"); - openapiFields.add("shortName"); + openapiFields = new HashSet(Arrays.asList("secureName", "shortName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("secureName"); + openapiRequiredFields = new HashSet(Arrays.asList("secureName")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InstanceShortNameResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InstanceShortNameResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InstanceShortNameResponse is not found in the empty JSON string", InstanceShortNameResponse.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InstanceShortNameResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InstanceShortNameResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InstanceShortNameResponse is not found in the empty JSON string", InstanceShortNameResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InstanceShortNameResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InstanceShortNameResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InstanceShortNameResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InstanceShortNameResponse.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("secureName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secureName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secureName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `secureName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secureName").toString())); } if ((jsonObj.get("shortName") != null && !jsonObj.get("shortName").isJsonNull()) && !jsonObj.get("shortName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `shortName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shortName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortName").toString())); } } @@ -228,31 +217,31 @@ public void write(JsonWriter out, InstanceShortNameResponse value) throws IOExce @Override public InstanceShortNameResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InstanceShortNameResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of InstanceShortNameResponse - * @throws IOException if the JSON string is invalid with respect to InstanceShortNameResponse - */ + /** + * Create an instance of InstanceShortNameResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of InstanceShortNameResponse + * @throws IOException if the JSON string is invalid with respect to InstanceShortNameResponse + */ public static InstanceShortNameResponse fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InstanceShortNameResponse.class); } - /** - * Convert an instance of InstanceShortNameResponse to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InstanceShortNameResponse to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InstanceType.java b/src/main/java/io/github/vrchatapi/model/InstanceType.java index 834542a5..a8be7a88 100644 --- a/src/main/java/io/github/vrchatapi/model/InstanceType.java +++ b/src/main/java/io/github/vrchatapi/model/InstanceType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -75,5 +74,10 @@ public InstanceType read(final JsonReader jsonReader) throws IOException { return InstanceType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InstanceType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/Inventory.java b/src/main/java/io/github/vrchatapi/model/Inventory.java index 3335eedc..eccbfda7 100644 --- a/src/main/java/io/github/vrchatapi/model/Inventory.java +++ b/src/main/java/io/github/vrchatapi/model/Inventory.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InventoryItem; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,66 +50,63 @@ /** * Inventory */ -@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 Inventory { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull private List data = new ArrayList<>(); public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) + @javax.annotation.Nonnull private Integer totalCount; public Inventory() { } - public Inventory data(List data) { - + public Inventory data(@javax.annotation.Nonnull List data) { this.data = data; return this; } public Inventory addDataItem(InventoryItem dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } this.data.add(dataItem); return this; } - /** + /** * Get data * @return data - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getData() { return data; } - - public void setData(List data) { + public void setData(@javax.annotation.Nonnull List data) { this.data = data; } - public Inventory totalCount(Integer totalCount) { - + public Inventory totalCount(@javax.annotation.Nonnull Integer totalCount) { this.totalCount = totalCount; return this; } - /** + /** * Get totalCount * @return totalCount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTotalCount() { return totalCount; } - - public void setTotalCount(Integer totalCount) { + public void setTotalCount(@javax.annotation.Nonnull Integer totalCount) { this.totalCount = totalCount; } @@ -148,10 +145,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -160,53 +154,50 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("totalCount"); + openapiFields = new HashSet(Arrays.asList("data", "totalCount")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("totalCount"); + openapiRequiredFields = new HashSet(Arrays.asList("data", "totalCount")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Inventory - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Inventory.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Inventory is not found in the empty JSON string", Inventory.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Inventory + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Inventory.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Inventory is not found in the empty JSON string", Inventory.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Inventory.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Inventory` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Inventory` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Inventory.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null) { + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + InventoryItem.validateJsonElement(jsonArraydata.get(i)); + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - InventoryItem.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -229,31 +220,31 @@ public void write(JsonWriter out, Inventory value) throws IOException { @Override public Inventory read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Inventory given an JSON string - * - * @param jsonString JSON string - * @return An instance of Inventory - * @throws IOException if the JSON string is invalid with respect to Inventory - */ + /** + * Create an instance of Inventory given an JSON string + * + * @param jsonString JSON string + * @return An instance of Inventory + * @throws IOException if the JSON string is invalid with respect to Inventory + */ public static Inventory fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Inventory.class); } - /** - * Convert an instance of Inventory to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Inventory to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InventoryConsumptionResults.java b/src/main/java/io/github/vrchatapi/model/InventoryConsumptionResults.java index 5b280721..61062df5 100644 --- a/src/main/java/io/github/vrchatapi/model/InventoryConsumptionResults.java +++ b/src/main/java/io/github/vrchatapi/model/InventoryConsumptionResults.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InventoryItem; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,98 +50,95 @@ /** * InventoryConsumptionResults */ -@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 InventoryConsumptionResults { public static final String SERIALIZED_NAME_ERRORS = "errors"; @SerializedName(SERIALIZED_NAME_ERRORS) + @javax.annotation.Nonnull private List errors = new ArrayList<>(); public static final String SERIALIZED_NAME_INVENTORY_ITEMS = "inventoryItems"; @SerializedName(SERIALIZED_NAME_INVENTORY_ITEMS) + @javax.annotation.Nonnull private List inventoryItems = new ArrayList<>(); public static final String SERIALIZED_NAME_INVENTORY_ITEMS_CREATED = "inventoryItemsCreated"; @SerializedName(SERIALIZED_NAME_INVENTORY_ITEMS_CREATED) + @javax.annotation.Nonnull private Integer inventoryItemsCreated; public InventoryConsumptionResults() { } - public InventoryConsumptionResults errors(List errors) { - + public InventoryConsumptionResults errors(@javax.annotation.Nonnull List errors) { this.errors = errors; return this; } public InventoryConsumptionResults addErrorsItem(Object errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } this.errors.add(errorsItem); return this; } - /** + /** * Get errors * @return errors - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getErrors() { return errors; } - - public void setErrors(List errors) { + public void setErrors(@javax.annotation.Nonnull List errors) { this.errors = errors; } - public InventoryConsumptionResults inventoryItems(List inventoryItems) { - + public InventoryConsumptionResults inventoryItems(@javax.annotation.Nonnull List inventoryItems) { this.inventoryItems = inventoryItems; return this; } public InventoryConsumptionResults addInventoryItemsItem(InventoryItem inventoryItemsItem) { + if (this.inventoryItems == null) { + this.inventoryItems = new ArrayList<>(); + } this.inventoryItems.add(inventoryItemsItem); return this; } - /** + /** * Get inventoryItems * @return inventoryItems - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getInventoryItems() { return inventoryItems; } - - public void setInventoryItems(List inventoryItems) { + public void setInventoryItems(@javax.annotation.Nonnull List inventoryItems) { this.inventoryItems = inventoryItems; } - public InventoryConsumptionResults inventoryItemsCreated(Integer inventoryItemsCreated) { - + public InventoryConsumptionResults inventoryItemsCreated(@javax.annotation.Nonnull Integer inventoryItemsCreated) { this.inventoryItemsCreated = inventoryItemsCreated; return this; } - /** + /** * Get inventoryItemsCreated * @return inventoryItemsCreated - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getInventoryItemsCreated() { return inventoryItemsCreated; } - - public void setInventoryItemsCreated(Integer inventoryItemsCreated) { + public void setInventoryItemsCreated(@javax.annotation.Nonnull Integer inventoryItemsCreated) { this.inventoryItemsCreated = inventoryItemsCreated; } @@ -182,10 +179,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -194,61 +188,56 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("errors"); - openapiFields.add("inventoryItems"); - openapiFields.add("inventoryItemsCreated"); + openapiFields = new HashSet(Arrays.asList("errors", "inventoryItems", "inventoryItemsCreated")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("errors"); - openapiRequiredFields.add("inventoryItems"); - openapiRequiredFields.add("inventoryItemsCreated"); + openapiRequiredFields = new HashSet(Arrays.asList("errors", "inventoryItems", "inventoryItemsCreated")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InventoryConsumptionResults - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InventoryConsumptionResults.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InventoryConsumptionResults is not found in the empty JSON string", InventoryConsumptionResults.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InventoryConsumptionResults + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InventoryConsumptionResults.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InventoryConsumptionResults is not found in the empty JSON string", InventoryConsumptionResults.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InventoryConsumptionResults.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InventoryConsumptionResults` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InventoryConsumptionResults` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InventoryConsumptionResults.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("errors") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } - // ensure the json data is an array - if (!jsonObj.get("inventoryItems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `inventoryItems` to be an array in the JSON string but got `%s`", jsonObj.get("inventoryItems").toString())); + if (jsonObj.get("inventoryItems") != null) { + if (!jsonObj.get("inventoryItems").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `inventoryItems` to be an array in the JSON string but got `%s`", jsonObj.get("inventoryItems").toString())); + } + JsonArray jsonArrayinventoryItems = jsonObj.getAsJsonArray("inventoryItems"); + // validate the required field `inventoryItems` (array) + for (int i = 0; i < jsonArrayinventoryItems.size(); i++) { + InventoryItem.validateJsonElement(jsonArrayinventoryItems.get(i)); + } } - - JsonArray jsonArrayinventoryItems = jsonObj.getAsJsonArray("inventoryItems"); - // validate the required field `inventoryItems` (array) - for (int i = 0; i < jsonArrayinventoryItems.size(); i++) { - InventoryItem.validateJsonObject(jsonArrayinventoryItems.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -271,31 +260,31 @@ public void write(JsonWriter out, InventoryConsumptionResults value) throws IOEx @Override public InventoryConsumptionResults read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InventoryConsumptionResults given an JSON string - * - * @param jsonString JSON string - * @return An instance of InventoryConsumptionResults - * @throws IOException if the JSON string is invalid with respect to InventoryConsumptionResults - */ + /** + * Create an instance of InventoryConsumptionResults given an JSON string + * + * @param jsonString JSON string + * @return An instance of InventoryConsumptionResults + * @throws IOException if the JSON string is invalid with respect to InventoryConsumptionResults + */ public static InventoryConsumptionResults fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InventoryConsumptionResults.class); } - /** - * Convert an instance of InventoryConsumptionResults to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InventoryConsumptionResults to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributes1Validator.java b/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributes1Validator.java deleted file mode 100644 index 11341a8e..00000000 --- a/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributes1Validator.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * VRChat API Documentation - * - * The version of the OpenAPI document: 1.20.7 - * 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.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.github.vrchatapi.JSON; - -/** - * InventoryDefaultAttributes1Validator - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InventoryDefaultAttributes1Validator { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public InventoryDefaultAttributes1Validator() { - } - - public InventoryDefaultAttributes1Validator type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InventoryDefaultAttributes1Validator inventoryDefaultAttributes1Validator = (InventoryDefaultAttributes1Validator) o; - return Objects.equals(this.type, inventoryDefaultAttributes1Validator.type); - } - - @Override - public int hashCode() { - return Objects.hash(type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InventoryDefaultAttributes1Validator {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InventoryDefaultAttributes1Validator - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InventoryDefaultAttributes1Validator.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InventoryDefaultAttributes1Validator is not found in the empty JSON string", InventoryDefaultAttributes1Validator.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!InventoryDefaultAttributes1Validator.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InventoryDefaultAttributes1Validator` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InventoryDefaultAttributes1Validator.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InventoryDefaultAttributes1Validator' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InventoryDefaultAttributes1Validator.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InventoryDefaultAttributes1Validator value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public InventoryDefaultAttributes1Validator read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InventoryDefaultAttributes1Validator given an JSON string - * - * @param jsonString JSON string - * @return An instance of InventoryDefaultAttributes1Validator - * @throws IOException if the JSON string is invalid with respect to InventoryDefaultAttributes1Validator - */ - public static InventoryDefaultAttributes1Validator fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InventoryDefaultAttributes1Validator.class); - } - - /** - * Convert an instance of InventoryDefaultAttributes1Validator to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributes1.java b/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributesValue.java similarity index 51% rename from src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributes1.java rename to src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributesValue.java index 0856bac6..93c83e9a 100644 --- a/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributes1.java +++ b/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributesValue.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.github.vrchatapi.model.InventoryDefaultAttributes1Validator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.github.vrchatapi.model.InventoryDefaultAttributesValueValidator; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,75 +32,71 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; /** - * InventoryDefaultAttributes1 + * InventoryDefaultAttributesValue */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InventoryDefaultAttributes1 { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class InventoryDefaultAttributesValue { public static final String SERIALIZED_NAME_DEFAULT_VALUE = "defaultValue"; @SerializedName(SERIALIZED_NAME_DEFAULT_VALUE) + @javax.annotation.Nullable private String defaultValue; public static final String SERIALIZED_NAME_VALIDATOR = "validator"; @SerializedName(SERIALIZED_NAME_VALIDATOR) - private InventoryDefaultAttributes1Validator validator; + @javax.annotation.Nullable + private InventoryDefaultAttributesValueValidator validator; - public InventoryDefaultAttributes1() { + public InventoryDefaultAttributesValue() { } - public InventoryDefaultAttributes1 defaultValue(String defaultValue) { - + public InventoryDefaultAttributesValue defaultValue(@javax.annotation.Nullable String defaultValue) { this.defaultValue = defaultValue; return this; } - /** + /** * Get defaultValue * @return defaultValue - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDefaultValue() { return defaultValue; } - - public void setDefaultValue(String defaultValue) { + public void setDefaultValue(@javax.annotation.Nullable String defaultValue) { this.defaultValue = defaultValue; } - public InventoryDefaultAttributes1 validator(InventoryDefaultAttributes1Validator validator) { - + public InventoryDefaultAttributesValue validator(@javax.annotation.Nullable InventoryDefaultAttributesValueValidator validator) { this.validator = validator; return this; } - /** + /** * Get validator * @return validator - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public InventoryDefaultAttributes1Validator getValidator() { + public InventoryDefaultAttributesValueValidator getValidator() { return validator; } - - public void setValidator(InventoryDefaultAttributes1Validator validator) { + public void setValidator(@javax.annotation.Nullable InventoryDefaultAttributesValueValidator validator) { this.validator = validator; } @@ -116,9 +110,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - InventoryDefaultAttributes1 inventoryDefaultAttributes1 = (InventoryDefaultAttributes1) o; - return Objects.equals(this.defaultValue, inventoryDefaultAttributes1.defaultValue) && - Objects.equals(this.validator, inventoryDefaultAttributes1.validator); + InventoryDefaultAttributesValue inventoryDefaultAttributesValue = (InventoryDefaultAttributesValue) o; + return Objects.equals(this.defaultValue, inventoryDefaultAttributesValue.defaultValue) && + Objects.equals(this.validator, inventoryDefaultAttributesValue.validator); } @Override @@ -129,7 +123,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class InventoryDefaultAttributes1 {\n"); + sb.append("class InventoryDefaultAttributesValue {\n"); sb.append(" defaultValue: ").append(toIndentedString(defaultValue)).append("\n"); sb.append(" validator: ").append(toIndentedString(validator)).append("\n"); sb.append("}"); @@ -141,10 +135,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,40 +144,39 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("defaultValue"); - openapiFields.add("validator"); + openapiFields = new HashSet(Arrays.asList("defaultValue", "validator")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InventoryDefaultAttributes1 - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InventoryDefaultAttributes1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InventoryDefaultAttributes1 is not found in the empty JSON string", InventoryDefaultAttributes1.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InventoryDefaultAttributesValue + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InventoryDefaultAttributesValue.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InventoryDefaultAttributesValue is not found in the empty JSON string", InventoryDefaultAttributesValue.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!InventoryDefaultAttributes1.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InventoryDefaultAttributes1` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + for (Map.Entry entry : entries) { + if (!InventoryDefaultAttributesValue.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InventoryDefaultAttributesValue` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("defaultValue") != null && !jsonObj.get("defaultValue").isJsonNull()) && !jsonObj.get("defaultValue").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `defaultValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("defaultValue").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `defaultValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("defaultValue").toString())); } // validate the optional field `validator` if (jsonObj.get("validator") != null && !jsonObj.get("validator").isJsonNull()) { - InventoryDefaultAttributes1Validator.validateJsonObject(jsonObj.getAsJsonObject("validator")); + InventoryDefaultAttributesValueValidator.validateJsonElement(jsonObj.get("validator")); } } @@ -194,47 +184,47 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!InventoryDefaultAttributes1.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InventoryDefaultAttributes1' and its subtypes + if (!InventoryDefaultAttributesValue.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InventoryDefaultAttributesValue' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InventoryDefaultAttributes1.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InventoryDefaultAttributesValue.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, InventoryDefaultAttributes1 value) throws IOException { + public void write(JsonWriter out, InventoryDefaultAttributesValue value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public InventoryDefaultAttributes1 read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + public InventoryDefaultAttributesValue read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InventoryDefaultAttributes1 given an JSON string - * - * @param jsonString JSON string - * @return An instance of InventoryDefaultAttributes1 - * @throws IOException if the JSON string is invalid with respect to InventoryDefaultAttributes1 - */ - public static InventoryDefaultAttributes1 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InventoryDefaultAttributes1.class); + /** + * Create an instance of InventoryDefaultAttributesValue given an JSON string + * + * @param jsonString JSON string + * @return An instance of InventoryDefaultAttributesValue + * @throws IOException if the JSON string is invalid with respect to InventoryDefaultAttributesValue + */ + public static InventoryDefaultAttributesValue fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InventoryDefaultAttributesValue.class); } - /** - * Convert an instance of InventoryDefaultAttributes1 to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InventoryDefaultAttributesValue to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributesValueValidator.java b/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributesValueValidator.java new file mode 100644 index 00000000..5cadfede --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributesValueValidator.java @@ -0,0 +1,201 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * InventoryDefaultAttributesValueValidator + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class InventoryDefaultAttributesValueValidator { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public InventoryDefaultAttributesValueValidator() { + } + + public InventoryDefaultAttributesValueValidator type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InventoryDefaultAttributesValueValidator inventoryDefaultAttributesValueValidator = (InventoryDefaultAttributesValueValidator) o; + return Objects.equals(this.type, inventoryDefaultAttributesValueValidator.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InventoryDefaultAttributesValueValidator {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InventoryDefaultAttributesValueValidator + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InventoryDefaultAttributesValueValidator.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InventoryDefaultAttributesValueValidator is not found in the empty JSON string", InventoryDefaultAttributesValueValidator.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InventoryDefaultAttributesValueValidator.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InventoryDefaultAttributesValueValidator` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InventoryDefaultAttributesValueValidator.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InventoryDefaultAttributesValueValidator' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InventoryDefaultAttributesValueValidator.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InventoryDefaultAttributesValueValidator value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InventoryDefaultAttributesValueValidator read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InventoryDefaultAttributesValueValidator given an JSON string + * + * @param jsonString JSON string + * @return An instance of InventoryDefaultAttributesValueValidator + * @throws IOException if the JSON string is invalid with respect to InventoryDefaultAttributesValueValidator + */ + public static InventoryDefaultAttributesValueValidator fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InventoryDefaultAttributesValueValidator.class); + } + + /** + * Convert an instance of InventoryDefaultAttributesValueValidator to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/InventoryDrop.java b/src/main/java/io/github/vrchatapi/model/InventoryDrop.java index 7beb9654..64053b76 100644 --- a/src/main/java/io/github/vrchatapi/model/InventoryDrop.java +++ b/src/main/java/io/github/vrchatapi/model/InventoryDrop.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,18 +13,16 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InventoryNotificationDetails; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,395 +51,359 @@ /** * InventoryDrop */ -@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 InventoryDrop { public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nonnull private String authorId; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DROP_EXPIRY_DATE = "dropExpiryDate"; @SerializedName(SERIALIZED_NAME_DROP_EXPIRY_DATE) + @javax.annotation.Nullable private OffsetDateTime dropExpiryDate; public static final String SERIALIZED_NAME_END_DROP_DATE = "endDropDate"; @SerializedName(SERIALIZED_NAME_END_DROP_DATE) + @javax.annotation.Nonnull private OffsetDateTime endDropDate; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IS_DISABLED = "isDisabled"; @SerializedName(SERIALIZED_NAME_IS_DISABLED) + @javax.annotation.Nonnull private Boolean isDisabled; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_NOTIFICATION_DETAILS = "notificationDetails"; @SerializedName(SERIALIZED_NAME_NOTIFICATION_DETAILS) + @javax.annotation.Nonnull private InventoryNotificationDetails notificationDetails; public static final String SERIALIZED_NAME_START_DROP_DATE = "startDropDate"; @SerializedName(SERIALIZED_NAME_START_DROP_DATE) + @javax.annotation.Nonnull private OffsetDateTime startDropDate; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private String status; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TARGET_GROUP = "targetGroup"; @SerializedName(SERIALIZED_NAME_TARGET_GROUP) + @javax.annotation.Nonnull private String targetGroup; public static final String SERIALIZED_NAME_TEMPLATE_IDS = "templateIds"; @SerializedName(SERIALIZED_NAME_TEMPLATE_IDS) + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public InventoryDrop() { } - public InventoryDrop authorId(String authorId) { - + public InventoryDrop authorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; } - public InventoryDrop createdAt(OffsetDateTime createdAt) { - + public InventoryDrop createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2025-06-10T20:37:31.837Z", required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public InventoryDrop dropExpiryDate(OffsetDateTime dropExpiryDate) { - + public InventoryDrop dropExpiryDate(@javax.annotation.Nullable OffsetDateTime dropExpiryDate) { this.dropExpiryDate = dropExpiryDate; return this; } - /** + /** * Get dropExpiryDate * @return dropExpiryDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getDropExpiryDate() { return dropExpiryDate; } - - public void setDropExpiryDate(OffsetDateTime dropExpiryDate) { + public void setDropExpiryDate(@javax.annotation.Nullable OffsetDateTime dropExpiryDate) { this.dropExpiryDate = dropExpiryDate; } - public InventoryDrop endDropDate(OffsetDateTime endDropDate) { - + public InventoryDrop endDropDate(@javax.annotation.Nonnull OffsetDateTime endDropDate) { this.endDropDate = endDropDate; return this; } - /** + /** * Get endDropDate * @return endDropDate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2184-07-24T00:00Z", required = true, value = "") - public OffsetDateTime getEndDropDate() { return endDropDate; } - - public void setEndDropDate(OffsetDateTime endDropDate) { + public void setEndDropDate(@javax.annotation.Nonnull OffsetDateTime endDropDate) { this.endDropDate = endDropDate; } - public InventoryDrop id(String id) { - + public InventoryDrop id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "invd_ee3a8f7f-1454-4748-a935-99bf9865f33d", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public InventoryDrop isDisabled(Boolean isDisabled) { - + public InventoryDrop isDisabled(@javax.annotation.Nonnull Boolean isDisabled) { this.isDisabled = isDisabled; return this; } - /** + /** * Get isDisabled * @return isDisabled - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsDisabled() { return isDisabled; } - - public void setIsDisabled(Boolean isDisabled) { + public void setIsDisabled(@javax.annotation.Nonnull Boolean isDisabled) { this.isDisabled = isDisabled; } - public InventoryDrop name(String name) { - + public InventoryDrop name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public InventoryDrop notificationDetails(InventoryNotificationDetails notificationDetails) { - + public InventoryDrop notificationDetails(@javax.annotation.Nonnull InventoryNotificationDetails notificationDetails) { this.notificationDetails = notificationDetails; return this; } - /** + /** * Get notificationDetails * @return notificationDetails - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InventoryNotificationDetails getNotificationDetails() { return notificationDetails; } - - public void setNotificationDetails(InventoryNotificationDetails notificationDetails) { + public void setNotificationDetails(@javax.annotation.Nonnull InventoryNotificationDetails notificationDetails) { this.notificationDetails = notificationDetails; } - public InventoryDrop startDropDate(OffsetDateTime startDropDate) { - + public InventoryDrop startDropDate(@javax.annotation.Nonnull OffsetDateTime startDropDate) { this.startDropDate = startDropDate; return this; } - /** + /** * Get startDropDate * @return startDropDate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2025-06-09T10:00Z", required = true, value = "") - public OffsetDateTime getStartDropDate() { return startDropDate; } - - public void setStartDropDate(OffsetDateTime startDropDate) { + public void setStartDropDate(@javax.annotation.Nonnull OffsetDateTime startDropDate) { this.startDropDate = startDropDate; } - public InventoryDrop status(String status) { - + public InventoryDrop status(@javax.annotation.Nonnull String status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "active", required = true, value = "") - public String getStatus() { return status; } - - public void setStatus(String status) { + public void setStatus(@javax.annotation.Nonnull String status) { this.status = status; } - public InventoryDrop tags(List tags) { - + public InventoryDrop tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public InventoryDrop addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public InventoryDrop targetGroup(String targetGroup) { - + public InventoryDrop targetGroup(@javax.annotation.Nonnull String targetGroup) { this.targetGroup = targetGroup; return this; } - /** + /** * Get targetGroup * @return targetGroup - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "everyone", required = true, value = "") - public String getTargetGroup() { return targetGroup; } - - public void setTargetGroup(String targetGroup) { + public void setTargetGroup(@javax.annotation.Nonnull String targetGroup) { this.targetGroup = targetGroup; } - public InventoryDrop templateIds(List templateIds) { - + public InventoryDrop templateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } public InventoryDrop addTemplateIdsItem(String templateIdsItem) { + if (this.templateIds == null) { + this.templateIds = new ArrayList<>(); + } this.templateIds.add(templateIdsItem); return this; } - /** + /** * Get templateIds * @return templateIds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTemplateIds() { return templateIds; } - - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public InventoryDrop updatedAt(OffsetDateTime updatedAt) { - + public InventoryDrop updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2025-06-10T20:37:31.837Z", required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -502,10 +466,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -514,95 +475,68 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authorId"); - openapiFields.add("created_at"); - openapiFields.add("dropExpiryDate"); - openapiFields.add("endDropDate"); - openapiFields.add("id"); - openapiFields.add("isDisabled"); - openapiFields.add("name"); - openapiFields.add("notificationDetails"); - openapiFields.add("startDropDate"); - openapiFields.add("status"); - openapiFields.add("tags"); - openapiFields.add("targetGroup"); - openapiFields.add("templateIds"); - openapiFields.add("updated_at"); + openapiFields = new HashSet(Arrays.asList("authorId", "created_at", "dropExpiryDate", "endDropDate", "id", "isDisabled", "name", "notificationDetails", "startDropDate", "status", "tags", "targetGroup", "templateIds", "updated_at")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("authorId"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("dropExpiryDate"); - openapiRequiredFields.add("endDropDate"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("isDisabled"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("notificationDetails"); - openapiRequiredFields.add("startDropDate"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("targetGroup"); - openapiRequiredFields.add("templateIds"); - openapiRequiredFields.add("updated_at"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InventoryDrop - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InventoryDrop.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InventoryDrop is not found in the empty JSON string", InventoryDrop.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("authorId", "created_at", "dropExpiryDate", "endDropDate", "id", "isDisabled", "name", "notificationDetails", "startDropDate", "status", "tags", "targetGroup", "templateIds", "updated_at")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InventoryDrop + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InventoryDrop.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InventoryDrop is not found in the empty JSON string", InventoryDrop.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InventoryDrop.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InventoryDrop` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InventoryDrop` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InventoryDrop.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the required field `notificationDetails` - InventoryNotificationDetails.validateJsonObject(jsonObj.getAsJsonObject("notificationDetails")); + InventoryNotificationDetails.validateJsonElement(jsonObj.get("notificationDetails")); if (!jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("targetGroup").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `targetGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetGroup").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `targetGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetGroup").toString())); } // ensure the required json array is present if (jsonObj.get("templateIds") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("templateIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `templateIds` to be an array in the JSON string but got `%s`", jsonObj.get("templateIds").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `templateIds` to be an array in the JSON string but got `%s`", jsonObj.get("templateIds").toString())); } } @@ -626,31 +560,31 @@ public void write(JsonWriter out, InventoryDrop value) throws IOException { @Override public InventoryDrop read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InventoryDrop given an JSON string - * - * @param jsonString JSON string - * @return An instance of InventoryDrop - * @throws IOException if the JSON string is invalid with respect to InventoryDrop - */ + /** + * Create an instance of InventoryDrop given an JSON string + * + * @param jsonString JSON string + * @return An instance of InventoryDrop + * @throws IOException if the JSON string is invalid with respect to InventoryDrop + */ public static InventoryDrop fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InventoryDrop.class); } - /** - * Convert an instance of InventoryDrop to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InventoryDrop to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InventoryEquipSlot.java b/src/main/java/io/github/vrchatapi/model/InventoryEquipSlot.java index 43743c33..fe9c654b 100644 --- a/src/main/java/io/github/vrchatapi/model/InventoryEquipSlot.java +++ b/src/main/java/io/github/vrchatapi/model/InventoryEquipSlot.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -72,5 +72,10 @@ public InventoryEquipSlot read(final JsonReader jsonReader) throws IOException { return InventoryEquipSlot.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InventoryEquipSlot.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/InventoryFlag.java b/src/main/java/io/github/vrchatapi/model/InventoryFlag.java index b0af33af..5199636f 100644 --- a/src/main/java/io/github/vrchatapi/model/InventoryFlag.java +++ b/src/main/java/io/github/vrchatapi/model/InventoryFlag.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -80,5 +80,10 @@ public InventoryFlag read(final JsonReader jsonReader) throws IOException { return InventoryFlag.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InventoryFlag.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/InventoryItem.java b/src/main/java/io/github/vrchatapi/model/InventoryItem.java index c59bcdfe..62b53a17 100644 --- a/src/main/java/io/github/vrchatapi/model/InventoryItem.java +++ b/src/main/java/io/github/vrchatapi/model/InventoryItem.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,22 +13,20 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.github.vrchatapi.model.InventoryDefaultAttributes1; +import io.github.vrchatapi.model.InventoryDefaultAttributesValue; import io.github.vrchatapi.model.InventoryEquipSlot; import io.github.vrchatapi.model.InventoryItemType; import io.github.vrchatapi.model.InventoryMetadata; import io.github.vrchatapi.model.InventoryUserAttributes; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -44,13 +42,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -58,238 +58,248 @@ /** * InventoryItem */ -@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 InventoryItem { public static final String SERIALIZED_NAME_COLLECTIONS = "collections"; @SerializedName(SERIALIZED_NAME_COLLECTIONS) + @javax.annotation.Nonnull private List collections = new ArrayList<>(); public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DEFAULT_ATTRIBUTES = "defaultAttributes"; @SerializedName(SERIALIZED_NAME_DEFAULT_ATTRIBUTES) - private Map defaultAttributes = new HashMap<>(); + @javax.annotation.Nonnull + private Map defaultAttributes = new HashMap<>(); public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_EQUIP_SLOT = "equipSlot"; @SerializedName(SERIALIZED_NAME_EQUIP_SLOT) + @javax.annotation.Nullable private InventoryEquipSlot equipSlot = InventoryEquipSlot.EMPTY; public static final String SERIALIZED_NAME_EQUIP_SLOTS = "equipSlots"; @SerializedName(SERIALIZED_NAME_EQUIP_SLOTS) - private List equipSlots = null; + @javax.annotation.Nullable + private List equipSlots = new ArrayList<>(); public static final String SERIALIZED_NAME_EXPIRY_DATE = "expiryDate"; @SerializedName(SERIALIZED_NAME_EXPIRY_DATE) + @javax.annotation.Nullable private OffsetDateTime expiryDate; public static final String SERIALIZED_NAME_FLAGS = "flags"; @SerializedName(SERIALIZED_NAME_FLAGS) + @javax.annotation.Nonnull private List flags = new ArrayList<>(); public static final String SERIALIZED_NAME_HOLDER_ID = "holderId"; @SerializedName(SERIALIZED_NAME_HOLDER_ID) + @javax.annotation.Nonnull private String holderId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_IS_ARCHIVED = "isArchived"; @SerializedName(SERIALIZED_NAME_IS_ARCHIVED) + @javax.annotation.Nonnull private Boolean isArchived; public static final String SERIALIZED_NAME_IS_SEEN = "isSeen"; @SerializedName(SERIALIZED_NAME_IS_SEEN) + @javax.annotation.Nonnull private Boolean isSeen; public static final String SERIALIZED_NAME_ITEM_TYPE = "itemType"; @SerializedName(SERIALIZED_NAME_ITEM_TYPE) + @javax.annotation.Nonnull private InventoryItemType itemType = InventoryItemType.BUNDLE; public static final String SERIALIZED_NAME_ITEM_TYPE_LABEL = "itemTypeLabel"; @SerializedName(SERIALIZED_NAME_ITEM_TYPE_LABEL) + @javax.annotation.Nonnull private String itemTypeLabel; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull private InventoryMetadata metadata; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_QUANTIFIABLE = "quantifiable"; @SerializedName(SERIALIZED_NAME_QUANTIFIABLE) + @javax.annotation.Nonnull private Boolean quantifiable; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TEMPLATE_ID = "templateId"; @SerializedName(SERIALIZED_NAME_TEMPLATE_ID) + @javax.annotation.Nonnull private String templateId; public static final String SERIALIZED_NAME_TEMPLATE_CREATED_AT = "template_created_at"; @SerializedName(SERIALIZED_NAME_TEMPLATE_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime templateCreatedAt; public static final String SERIALIZED_NAME_TEMPLATE_UPDATED_AT = "template_updated_at"; @SerializedName(SERIALIZED_NAME_TEMPLATE_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime templateUpdatedAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_USER_ATTRIBUTES = "userAttributes"; @SerializedName(SERIALIZED_NAME_USER_ATTRIBUTES) + @javax.annotation.Nonnull private InventoryUserAttributes userAttributes; public static final String SERIALIZED_NAME_VALIDATE_USER_ATTRIBUTES = "validateUserAttributes"; @SerializedName(SERIALIZED_NAME_VALIDATE_USER_ATTRIBUTES) + @javax.annotation.Nonnull private Boolean validateUserAttributes; public InventoryItem() { } - public InventoryItem collections(List collections) { - + public InventoryItem collections(@javax.annotation.Nonnull List collections) { this.collections = collections; return this; } public InventoryItem addCollectionsItem(String collectionsItem) { + if (this.collections == null) { + this.collections = new ArrayList<>(); + } this.collections.add(collectionsItem); return this; } - /** + /** * Get collections * @return collections - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getCollections() { return collections; } - - public void setCollections(List collections) { + public void setCollections(@javax.annotation.Nonnull List collections) { this.collections = collections; } - public InventoryItem createdAt(OffsetDateTime createdAt) { - + public InventoryItem createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2025-06-13T05:00:45.455Z", required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public InventoryItem defaultAttributes(Map defaultAttributes) { - + public InventoryItem defaultAttributes(@javax.annotation.Nonnull Map defaultAttributes) { this.defaultAttributes = defaultAttributes; return this; } - public InventoryItem putDefaultAttributesItem(String key, InventoryDefaultAttributes1 defaultAttributesItem) { + public InventoryItem putDefaultAttributesItem(String key, InventoryDefaultAttributesValue defaultAttributesItem) { + if (this.defaultAttributes == null) { + this.defaultAttributes = new HashMap<>(); + } this.defaultAttributes.put(key, defaultAttributesItem); return this; } - /** + /** * Get defaultAttributes * @return defaultAttributes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public Map getDefaultAttributes() { + public Map getDefaultAttributes() { return defaultAttributes; } - - public void setDefaultAttributes(Map defaultAttributes) { + public void setDefaultAttributes(@javax.annotation.Nonnull Map defaultAttributes) { this.defaultAttributes = defaultAttributes; } - public InventoryItem description(String description) { - + public InventoryItem description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public InventoryItem equipSlot(InventoryEquipSlot equipSlot) { - + public InventoryItem equipSlot(@javax.annotation.Nullable InventoryEquipSlot equipSlot) { this.equipSlot = equipSlot; return this; } - /** + /** * Get equipSlot * @return equipSlot - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InventoryEquipSlot getEquipSlot() { return equipSlot; } - - public void setEquipSlot(InventoryEquipSlot equipSlot) { + public void setEquipSlot(@javax.annotation.Nullable InventoryEquipSlot equipSlot) { this.equipSlot = equipSlot; } - public InventoryItem equipSlots(List equipSlots) { - + public InventoryItem equipSlots(@javax.annotation.Nullable List equipSlots) { this.equipSlots = equipSlots; return this; } @@ -302,466 +312,393 @@ public InventoryItem addEquipSlotsItem(InventoryEquipSlot equipSlotsItem) { return this; } - /** + /** * Get equipSlots * @return equipSlots - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getEquipSlots() { return equipSlots; } - - public void setEquipSlots(List equipSlots) { + public void setEquipSlots(@javax.annotation.Nullable List equipSlots) { this.equipSlots = equipSlots; } - public InventoryItem expiryDate(OffsetDateTime expiryDate) { - + public InventoryItem expiryDate(@javax.annotation.Nullable OffsetDateTime expiryDate) { this.expiryDate = expiryDate; return this; } - /** + /** * Get expiryDate * @return expiryDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "2025-06-13T05:00:45.455Z", value = "") - public OffsetDateTime getExpiryDate() { return expiryDate; } - - public void setExpiryDate(OffsetDateTime expiryDate) { + public void setExpiryDate(@javax.annotation.Nullable OffsetDateTime expiryDate) { this.expiryDate = expiryDate; } - public InventoryItem flags(List flags) { - + public InventoryItem flags(@javax.annotation.Nonnull List flags) { this.flags = flags; return this; } public InventoryItem addFlagsItem(String flagsItem) { + if (this.flags == null) { + this.flags = new ArrayList<>(); + } this.flags.add(flagsItem); return this; } - /** + /** * Get flags * @return flags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getFlags() { return flags; } - - public void setFlags(List flags) { + public void setFlags(@javax.annotation.Nonnull List flags) { this.flags = flags; } - public InventoryItem holderId(String holderId) { - + public InventoryItem holderId(@javax.annotation.Nonnull String holderId) { this.holderId = holderId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return holderId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getHolderId() { return holderId; } - - public void setHolderId(String holderId) { + public void setHolderId(@javax.annotation.Nonnull String holderId) { this.holderId = holderId; } - public InventoryItem id(String id) { - + public InventoryItem id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "inv_10bce5b0-2d2b-44e0-900d-db6534615162", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public InventoryItem imageUrl(String imageUrl) { - + public InventoryItem imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public InventoryItem isArchived(Boolean isArchived) { - + public InventoryItem isArchived(@javax.annotation.Nonnull Boolean isArchived) { this.isArchived = isArchived; return this; } - /** + /** * Get isArchived * @return isArchived - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsArchived() { return isArchived; } - - public void setIsArchived(Boolean isArchived) { + public void setIsArchived(@javax.annotation.Nonnull Boolean isArchived) { this.isArchived = isArchived; } - public InventoryItem isSeen(Boolean isSeen) { - + public InventoryItem isSeen(@javax.annotation.Nonnull Boolean isSeen) { this.isSeen = isSeen; return this; } - /** + /** * Get isSeen * @return isSeen - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsSeen() { return isSeen; } - - public void setIsSeen(Boolean isSeen) { + public void setIsSeen(@javax.annotation.Nonnull Boolean isSeen) { this.isSeen = isSeen; } - public InventoryItem itemType(InventoryItemType itemType) { - + public InventoryItem itemType(@javax.annotation.Nonnull InventoryItemType itemType) { this.itemType = itemType; return this; } - /** + /** * Get itemType * @return itemType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InventoryItemType getItemType() { return itemType; } - - public void setItemType(InventoryItemType itemType) { + public void setItemType(@javax.annotation.Nonnull InventoryItemType itemType) { this.itemType = itemType; } - public InventoryItem itemTypeLabel(String itemTypeLabel) { - + public InventoryItem itemTypeLabel(@javax.annotation.Nonnull String itemTypeLabel) { this.itemTypeLabel = itemTypeLabel; return this; } - /** + /** * Get itemTypeLabel * @return itemTypeLabel - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getItemTypeLabel() { return itemTypeLabel; } - - public void setItemTypeLabel(String itemTypeLabel) { + public void setItemTypeLabel(@javax.annotation.Nonnull String itemTypeLabel) { this.itemTypeLabel = itemTypeLabel; } - public InventoryItem metadata(InventoryMetadata metadata) { - + public InventoryItem metadata(@javax.annotation.Nonnull InventoryMetadata metadata) { this.metadata = metadata; return this; } - /** + /** * Get metadata * @return metadata - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InventoryMetadata getMetadata() { return metadata; } - - public void setMetadata(InventoryMetadata metadata) { + public void setMetadata(@javax.annotation.Nonnull InventoryMetadata metadata) { this.metadata = metadata; } - public InventoryItem name(String name) { - + public InventoryItem name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public InventoryItem quantifiable(Boolean quantifiable) { - + public InventoryItem quantifiable(@javax.annotation.Nonnull Boolean quantifiable) { this.quantifiable = quantifiable; return this; } - /** + /** * Get quantifiable * @return quantifiable - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getQuantifiable() { return quantifiable; } - - public void setQuantifiable(Boolean quantifiable) { + public void setQuantifiable(@javax.annotation.Nonnull Boolean quantifiable) { this.quantifiable = quantifiable; } - public InventoryItem tags(List tags) { - + public InventoryItem tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public InventoryItem addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public InventoryItem templateId(String templateId) { - + public InventoryItem templateId(@javax.annotation.Nonnull String templateId) { this.templateId = templateId; return this; } - /** + /** * Get templateId * @return templateId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "invt_b80ce14b-038b-4f56-b970-d232771d62e3", required = true, value = "") - public String getTemplateId() { return templateId; } - - public void setTemplateId(String templateId) { + public void setTemplateId(@javax.annotation.Nonnull String templateId) { this.templateId = templateId; } - public InventoryItem templateCreatedAt(OffsetDateTime templateCreatedAt) { - + public InventoryItem templateCreatedAt(@javax.annotation.Nonnull OffsetDateTime templateCreatedAt) { this.templateCreatedAt = templateCreatedAt; return this; } - /** + /** * Get templateCreatedAt * @return templateCreatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2025-06-09T16:31:40.785Z", required = true, value = "") - public OffsetDateTime getTemplateCreatedAt() { return templateCreatedAt; } - - public void setTemplateCreatedAt(OffsetDateTime templateCreatedAt) { + public void setTemplateCreatedAt(@javax.annotation.Nonnull OffsetDateTime templateCreatedAt) { this.templateCreatedAt = templateCreatedAt; } - public InventoryItem templateUpdatedAt(OffsetDateTime templateUpdatedAt) { - + public InventoryItem templateUpdatedAt(@javax.annotation.Nonnull OffsetDateTime templateUpdatedAt) { this.templateUpdatedAt = templateUpdatedAt; return this; } - /** + /** * Get templateUpdatedAt * @return templateUpdatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2025-06-25T00:34:14.578Z", required = true, value = "") - public OffsetDateTime getTemplateUpdatedAt() { return templateUpdatedAt; } - - public void setTemplateUpdatedAt(OffsetDateTime templateUpdatedAt) { + public void setTemplateUpdatedAt(@javax.annotation.Nonnull OffsetDateTime templateUpdatedAt) { this.templateUpdatedAt = templateUpdatedAt; } - public InventoryItem updatedAt(OffsetDateTime updatedAt) { - + public InventoryItem updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2025-06-25T00:34:15.965Z", required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public InventoryItem userAttributes(InventoryUserAttributes userAttributes) { - + public InventoryItem userAttributes(@javax.annotation.Nonnull InventoryUserAttributes userAttributes) { this.userAttributes = userAttributes; return this; } - /** + /** * Get userAttributes * @return userAttributes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InventoryUserAttributes getUserAttributes() { return userAttributes; } - - public void setUserAttributes(InventoryUserAttributes userAttributes) { + public void setUserAttributes(@javax.annotation.Nonnull InventoryUserAttributes userAttributes) { this.userAttributes = userAttributes; } - public InventoryItem validateUserAttributes(Boolean validateUserAttributes) { - + public InventoryItem validateUserAttributes(@javax.annotation.Nonnull Boolean validateUserAttributes) { this.validateUserAttributes = validateUserAttributes; return this; } - /** + /** * Get validateUserAttributes * @return validateUserAttributes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getValidateUserAttributes() { return validateUserAttributes; } - - public void setValidateUserAttributes(Boolean validateUserAttributes) { + public void setValidateUserAttributes(@javax.annotation.Nonnull Boolean validateUserAttributes) { this.validateUserAttributes = validateUserAttributes; } @@ -857,10 +794,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -869,133 +803,93 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("collections"); - openapiFields.add("created_at"); - openapiFields.add("defaultAttributes"); - openapiFields.add("description"); - openapiFields.add("equipSlot"); - openapiFields.add("equipSlots"); - openapiFields.add("expiryDate"); - openapiFields.add("flags"); - openapiFields.add("holderId"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("isArchived"); - openapiFields.add("isSeen"); - openapiFields.add("itemType"); - openapiFields.add("itemTypeLabel"); - openapiFields.add("metadata"); - openapiFields.add("name"); - openapiFields.add("quantifiable"); - openapiFields.add("tags"); - openapiFields.add("templateId"); - openapiFields.add("template_created_at"); - openapiFields.add("template_updated_at"); - openapiFields.add("updated_at"); - openapiFields.add("userAttributes"); - openapiFields.add("validateUserAttributes"); + openapiFields = new HashSet(Arrays.asList("collections", "created_at", "defaultAttributes", "description", "equipSlot", "equipSlots", "expiryDate", "flags", "holderId", "id", "imageUrl", "isArchived", "isSeen", "itemType", "itemTypeLabel", "metadata", "name", "quantifiable", "tags", "templateId", "template_created_at", "template_updated_at", "updated_at", "userAttributes", "validateUserAttributes")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("collections"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("defaultAttributes"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("flags"); - openapiRequiredFields.add("holderId"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("isArchived"); - openapiRequiredFields.add("isSeen"); - openapiRequiredFields.add("itemType"); - openapiRequiredFields.add("itemTypeLabel"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("quantifiable"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("templateId"); - openapiRequiredFields.add("template_created_at"); - openapiRequiredFields.add("template_updated_at"); - openapiRequiredFields.add("updated_at"); - openapiRequiredFields.add("userAttributes"); - openapiRequiredFields.add("validateUserAttributes"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InventoryItem - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InventoryItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InventoryItem is not found in the empty JSON string", InventoryItem.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("collections", "created_at", "defaultAttributes", "description", "flags", "holderId", "id", "imageUrl", "isArchived", "isSeen", "itemType", "itemTypeLabel", "metadata", "name", "quantifiable", "tags", "templateId", "template_created_at", "template_updated_at", "updated_at", "userAttributes", "validateUserAttributes")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InventoryItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InventoryItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InventoryItem is not found in the empty JSON string", InventoryItem.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InventoryItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InventoryItem` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InventoryItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InventoryItem.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("collections") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("collections").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `collections` to be an array in the JSON string but got `%s`", jsonObj.get("collections").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `collections` to be an array in the JSON string but got `%s`", jsonObj.get("collections").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the optional field `equipSlot` + if (jsonObj.get("equipSlot") != null && !jsonObj.get("equipSlot").isJsonNull()) { + InventoryEquipSlot.validateJsonElement(jsonObj.get("equipSlot")); } // ensure the optional json data is an array if present - if (jsonObj.get("equipSlots") != null && !jsonObj.get("equipSlots").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `equipSlots` to be an array in the JSON string but got `%s`", jsonObj.get("equipSlots").toString())); + if (jsonObj.get("equipSlots") != null && !jsonObj.get("equipSlots").isJsonNull() && !jsonObj.get("equipSlots").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `equipSlots` to be an array in the JSON string but got `%s`", jsonObj.get("equipSlots").toString())); } // ensure the required json array is present if (jsonObj.get("flags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("flags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `flags` to be an array in the JSON string but got `%s`", jsonObj.get("flags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `flags` to be an array in the JSON string but got `%s`", jsonObj.get("flags").toString())); } if (!jsonObj.get("holderId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `holderId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("holderId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `holderId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("holderId").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } + // validate the required field `itemType` + InventoryItemType.validateJsonElement(jsonObj.get("itemType")); if (!jsonObj.get("itemTypeLabel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `itemTypeLabel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("itemTypeLabel").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `itemTypeLabel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("itemTypeLabel").toString())); } // validate the required field `metadata` - InventoryMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + InventoryMetadata.validateJsonElement(jsonObj.get("metadata")); if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("templateId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `templateId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("templateId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `templateId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("templateId").toString())); } // validate the required field `userAttributes` - InventoryUserAttributes.validateJsonObject(jsonObj.getAsJsonObject("userAttributes")); + InventoryUserAttributes.validateJsonElement(jsonObj.get("userAttributes")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -1018,31 +912,31 @@ public void write(JsonWriter out, InventoryItem value) throws IOException { @Override public InventoryItem read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InventoryItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of InventoryItem - * @throws IOException if the JSON string is invalid with respect to InventoryItem - */ + /** + * Create an instance of InventoryItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of InventoryItem + * @throws IOException if the JSON string is invalid with respect to InventoryItem + */ public static InventoryItem fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InventoryItem.class); } - /** - * Convert an instance of InventoryItem to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InventoryItem to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InventoryItemType.java b/src/main/java/io/github/vrchatapi/model/InventoryItemType.java index ddd94818..3e65a009 100644 --- a/src/main/java/io/github/vrchatapi/model/InventoryItemType.java +++ b/src/main/java/io/github/vrchatapi/model/InventoryItemType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -78,5 +78,10 @@ public InventoryItemType read(final JsonReader jsonReader) throws IOException { return InventoryItemType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InventoryItemType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/InventoryMetadata.java b/src/main/java/io/github/vrchatapi/model/InventoryMetadata.java index b74ee5e1..6363cf92 100644 --- a/src/main/java/io/github/vrchatapi/model/InventoryMetadata.java +++ b/src/main/java/io/github/vrchatapi/model/InventoryMetadata.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,160 +49,147 @@ /** * InventoryMetadata */ -@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 InventoryMetadata { public static final String SERIALIZED_NAME_ANIMATED = "animated"; @SerializedName(SERIALIZED_NAME_ANIMATED) + @javax.annotation.Nullable private Boolean animated; public static final String SERIALIZED_NAME_ANIMATION_STYLE = "animationStyle"; @SerializedName(SERIALIZED_NAME_ANIMATION_STYLE) + @javax.annotation.Nullable private String animationStyle; public static final String SERIALIZED_NAME_ASSET_BUNDLE_ID = "assetBundleId"; @SerializedName(SERIALIZED_NAME_ASSET_BUNDLE_ID) + @javax.annotation.Nullable private String assetBundleId; public static final String SERIALIZED_NAME_FILE_ID = "fileId"; @SerializedName(SERIALIZED_NAME_FILE_ID) + @javax.annotation.Nullable private String fileId; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_INVENTORY_ITEMS_TO_INSTANTIATE = "inventoryItemsToInstantiate"; @SerializedName(SERIALIZED_NAME_INVENTORY_ITEMS_TO_INSTANTIATE) - private List inventoryItemsToInstantiate = null; + @javax.annotation.Nullable + private List inventoryItemsToInstantiate = new ArrayList<>(); public static final String SERIALIZED_NAME_MASK_TAG = "maskTag"; @SerializedName(SERIALIZED_NAME_MASK_TAG) + @javax.annotation.Nullable private String maskTag; public static final String SERIALIZED_NAME_PROP_ID = "propId"; @SerializedName(SERIALIZED_NAME_PROP_ID) + @javax.annotation.Nullable private String propId; public InventoryMetadata() { } - public InventoryMetadata animated(Boolean animated) { - + public InventoryMetadata animated(@javax.annotation.Nullable Boolean animated) { this.animated = animated; return this; } - /** + /** * Get animated * @return animated - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getAnimated() { return animated; } - - public void setAnimated(Boolean animated) { + public void setAnimated(@javax.annotation.Nullable Boolean animated) { this.animated = animated; } - public InventoryMetadata animationStyle(String animationStyle) { - + public InventoryMetadata animationStyle(@javax.annotation.Nullable String animationStyle) { this.animationStyle = animationStyle; return this; } - /** + /** * Get animationStyle * @return animationStyle - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAnimationStyle() { return animationStyle; } - - public void setAnimationStyle(String animationStyle) { + public void setAnimationStyle(@javax.annotation.Nullable String animationStyle) { this.animationStyle = animationStyle; } - public InventoryMetadata assetBundleId(String assetBundleId) { - + public InventoryMetadata assetBundleId(@javax.annotation.Nullable String assetBundleId) { this.assetBundleId = assetBundleId; return this; } - /** + /** * Get assetBundleId * @return assetBundleId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAssetBundleId() { return assetBundleId; } - - public void setAssetBundleId(String assetBundleId) { + public void setAssetBundleId(@javax.annotation.Nullable String assetBundleId) { this.assetBundleId = assetBundleId; } - public InventoryMetadata fileId(String fileId) { - + public InventoryMetadata fileId(@javax.annotation.Nullable String fileId) { this.fileId = fileId; return this; } - /** + /** * Get fileId * @return fileId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getFileId() { return fileId; } - - public void setFileId(String fileId) { + public void setFileId(@javax.annotation.Nullable String fileId) { this.fileId = fileId; } - public InventoryMetadata imageUrl(String imageUrl) { - + public InventoryMetadata imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public InventoryMetadata inventoryItemsToInstantiate(List inventoryItemsToInstantiate) { - + public InventoryMetadata inventoryItemsToInstantiate(@javax.annotation.Nullable List inventoryItemsToInstantiate) { this.inventoryItemsToInstantiate = inventoryItemsToInstantiate; return this; } @@ -215,65 +202,54 @@ public InventoryMetadata addInventoryItemsToInstantiateItem(String inventoryItem return this; } - /** + /** * Only in bundles * @return inventoryItemsToInstantiate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only in bundles") - public List getInventoryItemsToInstantiate() { return inventoryItemsToInstantiate; } - - public void setInventoryItemsToInstantiate(List inventoryItemsToInstantiate) { + public void setInventoryItemsToInstantiate(@javax.annotation.Nullable List inventoryItemsToInstantiate) { this.inventoryItemsToInstantiate = inventoryItemsToInstantiate; } - public InventoryMetadata maskTag(String maskTag) { - + public InventoryMetadata maskTag(@javax.annotation.Nullable String maskTag) { this.maskTag = maskTag; return this; } - /** + /** * Get maskTag * @return maskTag - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getMaskTag() { return maskTag; } - - public void setMaskTag(String maskTag) { + public void setMaskTag(@javax.annotation.Nullable String maskTag) { this.maskTag = maskTag; } - public InventoryMetadata propId(String propId) { - + public InventoryMetadata propId(@javax.annotation.Nullable String propId) { this.propId = propId; return this; } - /** + /** * Get propId * @return propId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "prop_829ba6f6-b837-49d9-b9a9-056b82103b58", value = "") - public String getPropId() { return propId; } - - public void setPropId(String propId) { + public void setPropId(@javax.annotation.Nullable String propId) { this.propId = propId; } @@ -324,10 +300,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -336,61 +309,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("animated"); - openapiFields.add("animationStyle"); - openapiFields.add("assetBundleId"); - openapiFields.add("fileId"); - openapiFields.add("imageUrl"); - openapiFields.add("inventoryItemsToInstantiate"); - openapiFields.add("maskTag"); - openapiFields.add("propId"); + openapiFields = new HashSet(Arrays.asList("animated", "animationStyle", "assetBundleId", "fileId", "imageUrl", "inventoryItemsToInstantiate", "maskTag", "propId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InventoryMetadata - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InventoryMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InventoryMetadata is not found in the empty JSON string", InventoryMetadata.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InventoryMetadata + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InventoryMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InventoryMetadata is not found in the empty JSON string", InventoryMetadata.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InventoryMetadata.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InventoryMetadata` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InventoryMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("animationStyle") != null && !jsonObj.get("animationStyle").isJsonNull()) && !jsonObj.get("animationStyle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `animationStyle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("animationStyle").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `animationStyle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("animationStyle").toString())); } if ((jsonObj.get("assetBundleId") != null && !jsonObj.get("assetBundleId").isJsonNull()) && !jsonObj.get("assetBundleId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetBundleId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetBundleId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetBundleId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetBundleId").toString())); } if ((jsonObj.get("fileId") != null && !jsonObj.get("fileId").isJsonNull()) && !jsonObj.get("fileId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileId").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("inventoryItemsToInstantiate") != null && !jsonObj.get("inventoryItemsToInstantiate").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `inventoryItemsToInstantiate` to be an array in the JSON string but got `%s`", jsonObj.get("inventoryItemsToInstantiate").toString())); + if (jsonObj.get("inventoryItemsToInstantiate") != null && !jsonObj.get("inventoryItemsToInstantiate").isJsonNull() && !jsonObj.get("inventoryItemsToInstantiate").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `inventoryItemsToInstantiate` to be an array in the JSON string but got `%s`", jsonObj.get("inventoryItemsToInstantiate").toString())); } if ((jsonObj.get("maskTag") != null && !jsonObj.get("maskTag").isJsonNull()) && !jsonObj.get("maskTag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maskTag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskTag").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `maskTag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maskTag").toString())); } if ((jsonObj.get("propId") != null && !jsonObj.get("propId").isJsonNull()) && !jsonObj.get("propId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `propId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `propId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propId").toString())); } } @@ -414,31 +380,31 @@ public void write(JsonWriter out, InventoryMetadata value) throws IOException { @Override public InventoryMetadata read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InventoryMetadata given an JSON string - * - * @param jsonString JSON string - * @return An instance of InventoryMetadata - * @throws IOException if the JSON string is invalid with respect to InventoryMetadata - */ + /** + * Create an instance of InventoryMetadata given an JSON string + * + * @param jsonString JSON string + * @return An instance of InventoryMetadata + * @throws IOException if the JSON string is invalid with respect to InventoryMetadata + */ public static InventoryMetadata fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InventoryMetadata.class); } - /** - * Convert an instance of InventoryMetadata to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InventoryMetadata to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InventoryNotificationDetails.java b/src/main/java/io/github/vrchatapi/model/InventoryNotificationDetails.java index b77ad4bf..98b19f38 100644 --- a/src/main/java/io/github/vrchatapi/model/InventoryNotificationDetails.java +++ b/src/main/java/io/github/vrchatapi/model/InventoryNotificationDetails.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,88 +47,79 @@ /** * InventoryNotificationDetails */ -@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 InventoryNotificationDetails { public static final String SERIALIZED_NAME_BODY = "body"; @SerializedName(SERIALIZED_NAME_BODY) + @javax.annotation.Nonnull private String body; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nonnull private String title; public InventoryNotificationDetails() { } - public InventoryNotificationDetails body(String body) { - + public InventoryNotificationDetails body(@javax.annotation.Nonnull String body) { this.body = body; return this; } - /** + /** * Get body * @return body - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getBody() { return body; } - - public void setBody(String body) { + public void setBody(@javax.annotation.Nonnull String body) { this.body = body; } - public InventoryNotificationDetails imageUrl(String imageUrl) { - + public InventoryNotificationDetails imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public InventoryNotificationDetails title(String title) { - + public InventoryNotificationDetails title(@javax.annotation.Nonnull String title) { this.title = title; return this; } - /** + /** * Get title * @return title - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getTitle() { return title; } - - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nonnull String title) { this.title = title; } @@ -169,10 +160,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -181,53 +169,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("body"); - openapiFields.add("imageUrl"); - openapiFields.add("title"); + openapiFields = new HashSet(Arrays.asList("body", "imageUrl", "title")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("body"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("title"); + openapiRequiredFields = new HashSet(Arrays.asList("body", "imageUrl", "title")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InventoryNotificationDetails - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InventoryNotificationDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InventoryNotificationDetails is not found in the empty JSON string", InventoryNotificationDetails.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InventoryNotificationDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InventoryNotificationDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InventoryNotificationDetails is not found in the empty JSON string", InventoryNotificationDetails.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InventoryNotificationDetails.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InventoryNotificationDetails` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InventoryNotificationDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InventoryNotificationDetails.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("body").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `body` to be a primitive type in the JSON string but got `%s`", jsonObj.get("body").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `body` to be a primitive type in the JSON string but got `%s`", jsonObj.get("body").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } } @@ -251,31 +234,31 @@ public void write(JsonWriter out, InventoryNotificationDetails value) throws IOE @Override public InventoryNotificationDetails read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InventoryNotificationDetails given an JSON string - * - * @param jsonString JSON string - * @return An instance of InventoryNotificationDetails - * @throws IOException if the JSON string is invalid with respect to InventoryNotificationDetails - */ + /** + * Create an instance of InventoryNotificationDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of InventoryNotificationDetails + * @throws IOException if the JSON string is invalid with respect to InventoryNotificationDetails + */ public static InventoryNotificationDetails fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InventoryNotificationDetails.class); } - /** - * Convert an instance of InventoryNotificationDetails to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InventoryNotificationDetails to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InventorySpawn.java b/src/main/java/io/github/vrchatapi/model/InventorySpawn.java index 0e5952ff..7e93a95d 100644 --- a/src/main/java/io/github/vrchatapi/model/InventorySpawn.java +++ b/src/main/java/io/github/vrchatapi/model/InventorySpawn.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * InventorySpawn */ -@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 InventorySpawn { public static final String SERIALIZED_NAME_TOKEN = "token"; @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nonnull private String token; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nonnull private Integer version; public InventorySpawn() { } - public InventorySpawn token(String token) { - + public InventorySpawn token(@javax.annotation.Nonnull String token) { this.token = token; return this; } - /** + /** * Get token * @return token - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getToken() { return token; } - - public void setToken(String token) { + public void setToken(@javax.annotation.Nonnull String token) { this.token = token; } - public InventorySpawn version(Integer version) { - + public InventorySpawn version(@javax.annotation.Nonnull Integer version) { this.version = version; return this; } - /** + /** * Get version * @return version - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nonnull Integer version) { this.version = version; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,45 +143,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("token"); - openapiFields.add("version"); + openapiFields = new HashSet(Arrays.asList("token", "version")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("token"); - openapiRequiredFields.add("version"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InventorySpawn - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InventorySpawn.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InventorySpawn is not found in the empty JSON string", InventorySpawn.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("token", "version")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InventorySpawn + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InventorySpawn.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InventorySpawn is not found in the empty JSON string", InventorySpawn.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InventorySpawn.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InventorySpawn` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InventorySpawn` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InventorySpawn.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); } } @@ -214,31 +202,31 @@ public void write(JsonWriter out, InventorySpawn value) throws IOException { @Override public InventorySpawn read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InventorySpawn given an JSON string - * - * @param jsonString JSON string - * @return An instance of InventorySpawn - * @throws IOException if the JSON string is invalid with respect to InventorySpawn - */ + /** + * Create an instance of InventorySpawn given an JSON string + * + * @param jsonString JSON string + * @return An instance of InventorySpawn + * @throws IOException if the JSON string is invalid with respect to InventorySpawn + */ public static InventorySpawn fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InventorySpawn.class); } - /** - * Convert an instance of InventorySpawn to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InventorySpawn to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InventoryTemplate.java b/src/main/java/io/github/vrchatapi/model/InventoryTemplate.java index 6159e894..a907b8a8 100644 --- a/src/main/java/io/github/vrchatapi/model/InventoryTemplate.java +++ b/src/main/java/io/github/vrchatapi/model/InventoryTemplate.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,11 +21,10 @@ import io.github.vrchatapi.model.InventoryItemType; import io.github.vrchatapi.model.InventoryMetadata; import io.github.vrchatapi.model.InventoryNotificationDetails; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -39,13 +37,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -53,513 +53,471 @@ /** * InventoryTemplate */ -@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 InventoryTemplate { public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nonnull private String authorId; public static final String SERIALIZED_NAME_COLLECTIONS = "collections"; @SerializedName(SERIALIZED_NAME_COLLECTIONS) + @javax.annotation.Nonnull private List collections = new ArrayList<>(); public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DEFAULT_ATTRIBUTES = "defaultAttributes"; @SerializedName(SERIALIZED_NAME_DEFAULT_ATTRIBUTES) + @javax.annotation.Nonnull private Object defaultAttributes; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_EQUIP_SLOTS = "equipSlots"; @SerializedName(SERIALIZED_NAME_EQUIP_SLOTS) + @javax.annotation.Nonnull private List equipSlots = new ArrayList<>(); public static final String SERIALIZED_NAME_FLAGS = "flags"; @SerializedName(SERIALIZED_NAME_FLAGS) + @javax.annotation.Nonnull private List flags = new ArrayList<>(); public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_ITEM_TYPE = "itemType"; @SerializedName(SERIALIZED_NAME_ITEM_TYPE) + @javax.annotation.Nonnull private InventoryItemType itemType = InventoryItemType.BUNDLE; public static final String SERIALIZED_NAME_ITEM_TYPE_LABEL = "itemTypeLabel"; @SerializedName(SERIALIZED_NAME_ITEM_TYPE_LABEL) + @javax.annotation.Nonnull private String itemTypeLabel; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable private InventoryMetadata metadata; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_NOTIFICATION_DETAILS = "notificationDetails"; @SerializedName(SERIALIZED_NAME_NOTIFICATION_DETAILS) + @javax.annotation.Nullable private InventoryNotificationDetails notificationDetails; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private String status; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_VALIDATE_USER_ATTRIBUTES = "validateUserAttributes"; @SerializedName(SERIALIZED_NAME_VALIDATE_USER_ATTRIBUTES) + @javax.annotation.Nonnull private Boolean validateUserAttributes; public InventoryTemplate() { } - public InventoryTemplate authorId(String authorId) { - + public InventoryTemplate authorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; } - public InventoryTemplate collections(List collections) { - + public InventoryTemplate collections(@javax.annotation.Nonnull List collections) { this.collections = collections; return this; } public InventoryTemplate addCollectionsItem(String collectionsItem) { + if (this.collections == null) { + this.collections = new ArrayList<>(); + } this.collections.add(collectionsItem); return this; } - /** + /** * Get collections * @return collections - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getCollections() { return collections; } - - public void setCollections(List collections) { + public void setCollections(@javax.annotation.Nonnull List collections) { this.collections = collections; } - public InventoryTemplate createdAt(OffsetDateTime createdAt) { - + public InventoryTemplate createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2025-06-12T20:21:15.056Z", required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public InventoryTemplate defaultAttributes(Object defaultAttributes) { - + public InventoryTemplate defaultAttributes(@javax.annotation.Nonnull Object defaultAttributes) { this.defaultAttributes = defaultAttributes; return this; } - /** + /** * Get defaultAttributes * @return defaultAttributes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Object getDefaultAttributes() { return defaultAttributes; } - - public void setDefaultAttributes(Object defaultAttributes) { + public void setDefaultAttributes(@javax.annotation.Nonnull Object defaultAttributes) { this.defaultAttributes = defaultAttributes; } - public InventoryTemplate description(String description) { - + public InventoryTemplate description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public InventoryTemplate equipSlots(List equipSlots) { - + public InventoryTemplate equipSlots(@javax.annotation.Nonnull List equipSlots) { this.equipSlots = equipSlots; return this; } public InventoryTemplate addEquipSlotsItem(String equipSlotsItem) { + if (this.equipSlots == null) { + this.equipSlots = new ArrayList<>(); + } this.equipSlots.add(equipSlotsItem); return this; } - /** + /** * Get equipSlots * @return equipSlots - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getEquipSlots() { return equipSlots; } - - public void setEquipSlots(List equipSlots) { + public void setEquipSlots(@javax.annotation.Nonnull List equipSlots) { this.equipSlots = equipSlots; } - public InventoryTemplate flags(List flags) { - + public InventoryTemplate flags(@javax.annotation.Nonnull List flags) { this.flags = flags; return this; } public InventoryTemplate addFlagsItem(String flagsItem) { + if (this.flags == null) { + this.flags = new ArrayList<>(); + } this.flags.add(flagsItem); return this; } - /** + /** * Get flags * @return flags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getFlags() { return flags; } - - public void setFlags(List flags) { + public void setFlags(@javax.annotation.Nonnull List flags) { this.flags = flags; } - public InventoryTemplate id(String id) { - + public InventoryTemplate id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "invt_b80ce14b-038b-4f56-b970-d232771d62e3", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public InventoryTemplate imageUrl(String imageUrl) { - + public InventoryTemplate imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public InventoryTemplate itemType(InventoryItemType itemType) { - + public InventoryTemplate itemType(@javax.annotation.Nonnull InventoryItemType itemType) { this.itemType = itemType; return this; } - /** + /** * Get itemType * @return itemType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InventoryItemType getItemType() { return itemType; } - - public void setItemType(InventoryItemType itemType) { + public void setItemType(@javax.annotation.Nonnull InventoryItemType itemType) { this.itemType = itemType; } - public InventoryTemplate itemTypeLabel(String itemTypeLabel) { - + public InventoryTemplate itemTypeLabel(@javax.annotation.Nonnull String itemTypeLabel) { this.itemTypeLabel = itemTypeLabel; return this; } - /** + /** * Get itemTypeLabel * @return itemTypeLabel - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getItemTypeLabel() { return itemTypeLabel; } - - public void setItemTypeLabel(String itemTypeLabel) { + public void setItemTypeLabel(@javax.annotation.Nonnull String itemTypeLabel) { this.itemTypeLabel = itemTypeLabel; } - public InventoryTemplate metadata(InventoryMetadata metadata) { - + public InventoryTemplate metadata(@javax.annotation.Nullable InventoryMetadata metadata) { this.metadata = metadata; return this; } - /** + /** * Get metadata * @return metadata - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InventoryMetadata getMetadata() { return metadata; } - - public void setMetadata(InventoryMetadata metadata) { + public void setMetadata(@javax.annotation.Nullable InventoryMetadata metadata) { this.metadata = metadata; } - public InventoryTemplate name(String name) { - + public InventoryTemplate name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public InventoryTemplate notificationDetails(InventoryNotificationDetails notificationDetails) { - + public InventoryTemplate notificationDetails(@javax.annotation.Nullable InventoryNotificationDetails notificationDetails) { this.notificationDetails = notificationDetails; return this; } - /** + /** * Get notificationDetails * @return notificationDetails - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InventoryNotificationDetails getNotificationDetails() { return notificationDetails; } - - public void setNotificationDetails(InventoryNotificationDetails notificationDetails) { + public void setNotificationDetails(@javax.annotation.Nullable InventoryNotificationDetails notificationDetails) { this.notificationDetails = notificationDetails; } - public InventoryTemplate status(String status) { - + public InventoryTemplate status(@javax.annotation.Nonnull String status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "live", required = true, value = "") - public String getStatus() { return status; } - - public void setStatus(String status) { + public void setStatus(@javax.annotation.Nonnull String status) { this.status = status; } - public InventoryTemplate tags(List tags) { - + public InventoryTemplate tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public InventoryTemplate addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public InventoryTemplate updatedAt(OffsetDateTime updatedAt) { - + public InventoryTemplate updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2025-06-10T20:37:31.837Z", required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public InventoryTemplate validateUserAttributes(Boolean validateUserAttributes) { - + public InventoryTemplate validateUserAttributes(@javax.annotation.Nonnull Boolean validateUserAttributes) { this.validateUserAttributes = validateUserAttributes; return this; } - /** + /** * Get validateUserAttributes * @return validateUserAttributes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getValidateUserAttributes() { return validateUserAttributes; } - - public void setValidateUserAttributes(Boolean validateUserAttributes) { + public void setValidateUserAttributes(@javax.annotation.Nonnull Boolean validateUserAttributes) { this.validateUserAttributes = validateUserAttributes; } @@ -630,10 +588,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -642,125 +597,94 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authorId"); - openapiFields.add("collections"); - openapiFields.add("created_at"); - openapiFields.add("defaultAttributes"); - openapiFields.add("description"); - openapiFields.add("equipSlots"); - openapiFields.add("flags"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("itemType"); - openapiFields.add("itemTypeLabel"); - openapiFields.add("metadata"); - openapiFields.add("name"); - openapiFields.add("notificationDetails"); - openapiFields.add("status"); - openapiFields.add("tags"); - openapiFields.add("updated_at"); - openapiFields.add("validateUserAttributes"); + openapiFields = new HashSet(Arrays.asList("authorId", "collections", "created_at", "defaultAttributes", "description", "equipSlots", "flags", "id", "imageUrl", "itemType", "itemTypeLabel", "metadata", "name", "notificationDetails", "status", "tags", "updated_at", "validateUserAttributes")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("authorId"); - openapiRequiredFields.add("collections"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("defaultAttributes"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("equipSlots"); - openapiRequiredFields.add("flags"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("itemType"); - openapiRequiredFields.add("itemTypeLabel"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("updated_at"); - openapiRequiredFields.add("validateUserAttributes"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InventoryTemplate - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InventoryTemplate.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InventoryTemplate is not found in the empty JSON string", InventoryTemplate.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("authorId", "collections", "created_at", "defaultAttributes", "description", "equipSlots", "flags", "id", "imageUrl", "itemType", "itemTypeLabel", "name", "status", "tags", "updated_at", "validateUserAttributes")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InventoryTemplate + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InventoryTemplate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InventoryTemplate is not found in the empty JSON string", InventoryTemplate.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InventoryTemplate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InventoryTemplate` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InventoryTemplate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InventoryTemplate.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } // ensure the required json array is present if (jsonObj.get("collections") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("collections").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `collections` to be an array in the JSON string but got `%s`", jsonObj.get("collections").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `collections` to be an array in the JSON string but got `%s`", jsonObj.get("collections").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the required json array is present if (jsonObj.get("equipSlots") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("equipSlots").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `equipSlots` to be an array in the JSON string but got `%s`", jsonObj.get("equipSlots").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `equipSlots` to be an array in the JSON string but got `%s`", jsonObj.get("equipSlots").toString())); } // ensure the required json array is present if (jsonObj.get("flags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("flags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `flags` to be an array in the JSON string but got `%s`", jsonObj.get("flags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `flags` to be an array in the JSON string but got `%s`", jsonObj.get("flags").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } + // validate the required field `itemType` + InventoryItemType.validateJsonElement(jsonObj.get("itemType")); if (!jsonObj.get("itemTypeLabel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `itemTypeLabel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("itemTypeLabel").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `itemTypeLabel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("itemTypeLabel").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - InventoryMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + InventoryMetadata.validateJsonElement(jsonObj.get("metadata")); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `notificationDetails` if (jsonObj.get("notificationDetails") != null && !jsonObj.get("notificationDetails").isJsonNull()) { - InventoryNotificationDetails.validateJsonObject(jsonObj.getAsJsonObject("notificationDetails")); + InventoryNotificationDetails.validateJsonElement(jsonObj.get("notificationDetails")); } if (!jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -784,31 +708,31 @@ public void write(JsonWriter out, InventoryTemplate value) throws IOException { @Override public InventoryTemplate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InventoryTemplate given an JSON string - * - * @param jsonString JSON string - * @return An instance of InventoryTemplate - * @throws IOException if the JSON string is invalid with respect to InventoryTemplate - */ + /** + * Create an instance of InventoryTemplate given an JSON string + * + * @param jsonString JSON string + * @return An instance of InventoryTemplate + * @throws IOException if the JSON string is invalid with respect to InventoryTemplate + */ public static InventoryTemplate fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InventoryTemplate.class); } - /** - * Convert an instance of InventoryTemplate to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InventoryTemplate to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InventoryUserAttributes.java b/src/main/java/io/github/vrchatapi/model/InventoryUserAttributes.java index f08bc0c9..15f337f3 100644 --- a/src/main/java/io/github/vrchatapi/model/InventoryUserAttributes.java +++ b/src/main/java/io/github/vrchatapi/model/InventoryUserAttributes.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,88 +47,79 @@ /** * InventoryUserAttributes */ -@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 InventoryUserAttributes { public static final String SERIALIZED_NAME_PRIMARY_COLOR = "primaryColor"; @SerializedName(SERIALIZED_NAME_PRIMARY_COLOR) + @javax.annotation.Nullable private String primaryColor; public static final String SERIALIZED_NAME_SECONDARY_COLOR = "secondaryColor"; @SerializedName(SERIALIZED_NAME_SECONDARY_COLOR) + @javax.annotation.Nullable private String secondaryColor; public static final String SERIALIZED_NAME_TRAIL_COLOR = "trailColor"; @SerializedName(SERIALIZED_NAME_TRAIL_COLOR) + @javax.annotation.Nullable private String trailColor; public InventoryUserAttributes() { } - public InventoryUserAttributes primaryColor(String primaryColor) { - + public InventoryUserAttributes primaryColor(@javax.annotation.Nullable String primaryColor) { this.primaryColor = primaryColor; return this; } - /** + /** * Get primaryColor * @return primaryColor - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPrimaryColor() { return primaryColor; } - - public void setPrimaryColor(String primaryColor) { + public void setPrimaryColor(@javax.annotation.Nullable String primaryColor) { this.primaryColor = primaryColor; } - public InventoryUserAttributes secondaryColor(String secondaryColor) { - + public InventoryUserAttributes secondaryColor(@javax.annotation.Nullable String secondaryColor) { this.secondaryColor = secondaryColor; return this; } - /** + /** * Get secondaryColor * @return secondaryColor - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getSecondaryColor() { return secondaryColor; } - - public void setSecondaryColor(String secondaryColor) { + public void setSecondaryColor(@javax.annotation.Nullable String secondaryColor) { this.secondaryColor = secondaryColor; } - public InventoryUserAttributes trailColor(String trailColor) { - + public InventoryUserAttributes trailColor(@javax.annotation.Nullable String trailColor) { this.trailColor = trailColor; return this; } - /** + /** * Get trailColor * @return trailColor - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getTrailColor() { return trailColor; } - - public void setTrailColor(String trailColor) { + public void setTrailColor(@javax.annotation.Nullable String trailColor) { this.trailColor = trailColor; } @@ -169,10 +160,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -181,43 +169,41 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("primaryColor"); - openapiFields.add("secondaryColor"); - openapiFields.add("trailColor"); + openapiFields = new HashSet(Arrays.asList("primaryColor", "secondaryColor", "trailColor")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InventoryUserAttributes - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InventoryUserAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InventoryUserAttributes is not found in the empty JSON string", InventoryUserAttributes.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InventoryUserAttributes + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InventoryUserAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InventoryUserAttributes is not found in the empty JSON string", InventoryUserAttributes.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InventoryUserAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InventoryUserAttributes` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InventoryUserAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("primaryColor") != null && !jsonObj.get("primaryColor").isJsonNull()) && !jsonObj.get("primaryColor").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `primaryColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryColor").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `primaryColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryColor").toString())); } if ((jsonObj.get("secondaryColor") != null && !jsonObj.get("secondaryColor").isJsonNull()) && !jsonObj.get("secondaryColor").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secondaryColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondaryColor").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `secondaryColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondaryColor").toString())); } if ((jsonObj.get("trailColor") != null && !jsonObj.get("trailColor").isJsonNull()) && !jsonObj.get("trailColor").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `trailColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trailColor").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `trailColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trailColor").toString())); } } @@ -241,31 +227,31 @@ public void write(JsonWriter out, InventoryUserAttributes value) throws IOExcept @Override public InventoryUserAttributes read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InventoryUserAttributes given an JSON string - * - * @param jsonString JSON string - * @return An instance of InventoryUserAttributes - * @throws IOException if the JSON string is invalid with respect to InventoryUserAttributes - */ + /** + * Create an instance of InventoryUserAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of InventoryUserAttributes + * @throws IOException if the JSON string is invalid with respect to InventoryUserAttributes + */ public static InventoryUserAttributes fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InventoryUserAttributes.class); } - /** - * Convert an instance of InventoryUserAttributes to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InventoryUserAttributes to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InviteMessage.java b/src/main/java/io/github/vrchatapi/model/InviteMessage.java index 2464057c..bed6975e 100644 --- a/src/main/java/io/github/vrchatapi/model/InviteMessage.java +++ b/src/main/java/io/github/vrchatapi/model/InviteMessage.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InviteMessageType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,200 +49,178 @@ /** * */ -@ApiModel(description = "") -@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 InviteMessage { public static final String SERIALIZED_NAME_CAN_BE_UPDATED = "canBeUpdated"; @SerializedName(SERIALIZED_NAME_CAN_BE_UPDATED) + @javax.annotation.Nonnull private Boolean canBeUpdated = true; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull private String message; public static final String SERIALIZED_NAME_MESSAGE_TYPE = "messageType"; @SerializedName(SERIALIZED_NAME_MESSAGE_TYPE) + @javax.annotation.Nonnull private InviteMessageType messageType = InviteMessageType.MESSAGE; public static final String SERIALIZED_NAME_REMAINING_COOLDOWN_MINUTES = "remainingCooldownMinutes"; @SerializedName(SERIALIZED_NAME_REMAINING_COOLDOWN_MINUTES) + @javax.annotation.Nonnull private Integer remainingCooldownMinutes = 0; public static final String SERIALIZED_NAME_SLOT = "slot"; @SerializedName(SERIALIZED_NAME_SLOT) + @javax.annotation.Nonnull private Integer slot; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public InviteMessage() { } - public InviteMessage canBeUpdated(Boolean canBeUpdated) { - + public InviteMessage canBeUpdated(@javax.annotation.Nonnull Boolean canBeUpdated) { this.canBeUpdated = canBeUpdated; return this; } - /** + /** * Get canBeUpdated * @return canBeUpdated - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getCanBeUpdated() { return canBeUpdated; } - - public void setCanBeUpdated(Boolean canBeUpdated) { + public void setCanBeUpdated(@javax.annotation.Nonnull Boolean canBeUpdated) { this.canBeUpdated = canBeUpdated; } - public InviteMessage id(String id) { - + public InviteMessage id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "invm_24a1c14d-5e24-48e5-90e3-c3f712420ffa", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public InviteMessage message(String message) { - + public InviteMessage message(@javax.annotation.Nonnull String message) { this.message = message; return this; } - /** + /** * Get message * @return message - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getMessage() { return message; } - - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nonnull String message) { this.message = message; } - public InviteMessage messageType(InviteMessageType messageType) { - + public InviteMessage messageType(@javax.annotation.Nonnull InviteMessageType messageType) { this.messageType = messageType; return this; } - /** + /** * Get messageType * @return messageType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InviteMessageType getMessageType() { return messageType; } - - public void setMessageType(InviteMessageType messageType) { + public void setMessageType(@javax.annotation.Nonnull InviteMessageType messageType) { this.messageType = messageType; } - public InviteMessage remainingCooldownMinutes(Integer remainingCooldownMinutes) { - + public InviteMessage remainingCooldownMinutes(@javax.annotation.Nonnull Integer remainingCooldownMinutes) { this.remainingCooldownMinutes = remainingCooldownMinutes; return this; } - /** + /** * Changes to 60 when updated, although probably server-side configurable. * minimum: 0 * @return remainingCooldownMinutes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Changes to 60 when updated, although probably server-side configurable.") - public Integer getRemainingCooldownMinutes() { return remainingCooldownMinutes; } - - public void setRemainingCooldownMinutes(Integer remainingCooldownMinutes) { + public void setRemainingCooldownMinutes(@javax.annotation.Nonnull Integer remainingCooldownMinutes) { this.remainingCooldownMinutes = remainingCooldownMinutes; } - public InviteMessage slot(Integer slot) { - + public InviteMessage slot(@javax.annotation.Nonnull Integer slot) { this.slot = slot; return this; } - /** + /** * Get slot * minimum: 0 * maximum: 11 * @return slot - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getSlot() { return slot; } - - public void setSlot(Integer slot) { + public void setSlot(@javax.annotation.Nonnull Integer slot) { this.slot = slot; } - public InviteMessage updatedAt(OffsetDateTime updatedAt) { - + public InviteMessage updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -291,10 +269,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -303,59 +278,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("canBeUpdated"); - openapiFields.add("id"); - openapiFields.add("message"); - openapiFields.add("messageType"); - openapiFields.add("remainingCooldownMinutes"); - openapiFields.add("slot"); - openapiFields.add("updatedAt"); + openapiFields = new HashSet(Arrays.asList("canBeUpdated", "id", "message", "messageType", "remainingCooldownMinutes", "slot", "updatedAt")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("canBeUpdated"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("message"); - openapiRequiredFields.add("messageType"); - openapiRequiredFields.add("remainingCooldownMinutes"); - openapiRequiredFields.add("slot"); - openapiRequiredFields.add("updatedAt"); + openapiRequiredFields = new HashSet(Arrays.asList("canBeUpdated", "id", "message", "messageType", "remainingCooldownMinutes", "slot", "updatedAt")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InviteMessage - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InviteMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InviteMessage is not found in the empty JSON string", InviteMessage.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InviteMessage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InviteMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InviteMessage is not found in the empty JSON string", InviteMessage.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InviteMessage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InviteMessage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InviteMessage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InviteMessage.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } + // validate the required field `messageType` + InviteMessageType.validateJsonElement(jsonObj.get("messageType")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -378,31 +342,31 @@ public void write(JsonWriter out, InviteMessage value) throws IOException { @Override public InviteMessage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InviteMessage given an JSON string - * - * @param jsonString JSON string - * @return An instance of InviteMessage - * @throws IOException if the JSON string is invalid with respect to InviteMessage - */ + /** + * Create an instance of InviteMessage given an JSON string + * + * @param jsonString JSON string + * @return An instance of InviteMessage + * @throws IOException if the JSON string is invalid with respect to InviteMessage + */ public static InviteMessage fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InviteMessage.class); } - /** - * Convert an instance of InviteMessage to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InviteMessage to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InviteMessageType.java b/src/main/java/io/github/vrchatapi/model/InviteMessageType.java index c8796f7f..bd14e6ea 100644 --- a/src/main/java/io/github/vrchatapi/model/InviteMessageType.java +++ b/src/main/java/io/github/vrchatapi/model/InviteMessageType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -33,7 +32,7 @@ public enum InviteMessageType { REQUEST("request"), - REQUESTRESPONSE("requestResponse"), + REQUEST_RESPONSE("requestResponse"), RESPONSE("response"); @@ -73,5 +72,10 @@ public InviteMessageType read(final JsonReader jsonReader) throws IOException { return InviteMessageType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InviteMessageType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/InviteRequest.java b/src/main/java/io/github/vrchatapi/model/InviteRequest.java index b0a14408..0881bbae 100644 --- a/src/main/java/io/github/vrchatapi/model/InviteRequest.java +++ b/src/main/java/io/github/vrchatapi/model/InviteRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,63 +47,57 @@ /** * InviteRequest */ -@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 InviteRequest { public static final String SERIALIZED_NAME_INSTANCE_ID = "instanceId"; @SerializedName(SERIALIZED_NAME_INSTANCE_ID) + @javax.annotation.Nonnull private String instanceId; public static final String SERIALIZED_NAME_MESSAGE_SLOT = "messageSlot"; @SerializedName(SERIALIZED_NAME_MESSAGE_SLOT) + @javax.annotation.Nullable private Integer messageSlot; public InviteRequest() { } - public InviteRequest instanceId(String instanceId) { - + public InviteRequest instanceId(@javax.annotation.Nonnull String instanceId) { this.instanceId = instanceId; return this; } - /** + /** * InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. * @return instanceId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)", required = true, value = "InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance.") - public String getInstanceId() { return instanceId; } - - public void setInstanceId(String instanceId) { + public void setInstanceId(@javax.annotation.Nonnull String instanceId) { this.instanceId = instanceId; } - public InviteRequest messageSlot(Integer messageSlot) { - + public InviteRequest messageSlot(@javax.annotation.Nullable Integer messageSlot) { this.messageSlot = messageSlot; return this; } - /** + /** * Get messageSlot * minimum: 0 * maximum: 11 * @return messageSlot - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getMessageSlot() { return messageSlot; } - - public void setMessageSlot(Integer messageSlot) { + public void setMessageSlot(@javax.annotation.Nullable Integer messageSlot) { this.messageSlot = messageSlot; } @@ -142,10 +136,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -154,44 +145,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("instanceId"); - openapiFields.add("messageSlot"); + openapiFields = new HashSet(Arrays.asList("instanceId", "messageSlot")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("instanceId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InviteRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InviteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InviteRequest is not found in the empty JSON string", InviteRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("instanceId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InviteRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InviteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InviteRequest is not found in the empty JSON string", InviteRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InviteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InviteRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InviteRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InviteRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("instanceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `instanceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `instanceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceId").toString())); } } @@ -215,31 +204,31 @@ public void write(JsonWriter out, InviteRequest value) throws IOException { @Override public InviteRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InviteRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of InviteRequest - * @throws IOException if the JSON string is invalid with respect to InviteRequest - */ + /** + * Create an instance of InviteRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of InviteRequest + * @throws IOException if the JSON string is invalid with respect to InviteRequest + */ public static InviteRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InviteRequest.class); } - /** - * Convert an instance of InviteRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InviteRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InviteResponse.java b/src/main/java/io/github/vrchatapi/model/InviteResponse.java index d1aab535..af864019 100644 --- a/src/main/java/io/github/vrchatapi/model/InviteResponse.java +++ b/src/main/java/io/github/vrchatapi/model/InviteResponse.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,36 +47,33 @@ /** * InviteResponse */ -@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 InviteResponse { public static final String SERIALIZED_NAME_RESPONSE_SLOT = "responseSlot"; @SerializedName(SERIALIZED_NAME_RESPONSE_SLOT) + @javax.annotation.Nonnull private Integer responseSlot; public InviteResponse() { } - public InviteResponse responseSlot(Integer responseSlot) { - + public InviteResponse responseSlot(@javax.annotation.Nonnull Integer responseSlot) { this.responseSlot = responseSlot; return this; } - /** + /** * Get responseSlot * minimum: 0 * maximum: 11 * @return responseSlot - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getResponseSlot() { return responseSlot; } - - public void setResponseSlot(Integer responseSlot) { + public void setResponseSlot(@javax.annotation.Nonnull Integer responseSlot) { this.responseSlot = responseSlot; } @@ -113,10 +110,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -125,41 +119,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("responseSlot"); + openapiFields = new HashSet(Arrays.asList("responseSlot")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("responseSlot"); + openapiRequiredFields = new HashSet(Arrays.asList("responseSlot")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InviteResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InviteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InviteResponse is not found in the empty JSON string", InviteResponse.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InviteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InviteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InviteResponse is not found in the empty JSON string", InviteResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InviteResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InviteResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InviteResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InviteResponse.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -182,31 +175,31 @@ public void write(JsonWriter out, InviteResponse value) throws IOException { @Override public InviteResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InviteResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of InviteResponse - * @throws IOException if the JSON string is invalid with respect to InviteResponse - */ + /** + * Create an instance of InviteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of InviteResponse + * @throws IOException if the JSON string is invalid with respect to InviteResponse + */ public static InviteResponse fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InviteResponse.class); } - /** - * Convert an instance of InviteResponse to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InviteResponse to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/InviteUserWithPhotoRequest.java b/src/main/java/io/github/vrchatapi/model/InviteUserWithPhotoRequest.java index 11d697b7..7cf463bf 100644 --- a/src/main/java/io/github/vrchatapi/model/InviteUserWithPhotoRequest.java +++ b/src/main/java/io/github/vrchatapi/model/InviteUserWithPhotoRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InviteRequest; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,61 +49,55 @@ /** * InviteUserWithPhotoRequest */ -@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 InviteUserWithPhotoRequest { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull private InviteRequest data; public static final String SERIALIZED_NAME_IMAGE = "image"; @SerializedName(SERIALIZED_NAME_IMAGE) + @javax.annotation.Nonnull private File image; public InviteUserWithPhotoRequest() { } - public InviteUserWithPhotoRequest data(InviteRequest data) { - + public InviteUserWithPhotoRequest data(@javax.annotation.Nonnull InviteRequest data) { this.data = data; return this; } - /** + /** * Get data * @return data - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InviteRequest getData() { return data; } - - public void setData(InviteRequest data) { + public void setData(@javax.annotation.Nonnull InviteRequest data) { this.data = data; } - public InviteUserWithPhotoRequest image(File image) { - + public InviteUserWithPhotoRequest image(@javax.annotation.Nonnull File image) { this.image = image; return this; } - /** + /** * The binary blob of the png file. * @return image - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The binary blob of the png file.") - public File getImage() { return image; } - - public void setImage(File image) { + public void setImage(@javax.annotation.Nonnull File image) { this.image = image; } @@ -142,10 +136,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -154,45 +145,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("image"); + openapiFields = new HashSet(Arrays.asList("data", "image")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("image"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InviteUserWithPhotoRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!InviteUserWithPhotoRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InviteUserWithPhotoRequest is not found in the empty JSON string", InviteUserWithPhotoRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("data", "image")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InviteUserWithPhotoRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InviteUserWithPhotoRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in InviteUserWithPhotoRequest is not found in the empty JSON string", InviteUserWithPhotoRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!InviteUserWithPhotoRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InviteUserWithPhotoRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `InviteUserWithPhotoRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InviteUserWithPhotoRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `data` - InviteRequest.validateJsonObject(jsonObj.getAsJsonObject("data")); + InviteRequest.validateJsonElement(jsonObj.get("data")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -215,31 +203,31 @@ public void write(JsonWriter out, InviteUserWithPhotoRequest value) throws IOExc @Override public InviteUserWithPhotoRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of InviteUserWithPhotoRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of InviteUserWithPhotoRequest - * @throws IOException if the JSON string is invalid with respect to InviteUserWithPhotoRequest - */ + /** + * Create an instance of InviteUserWithPhotoRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of InviteUserWithPhotoRequest + * @throws IOException if the JSON string is invalid with respect to InviteUserWithPhotoRequest + */ public static InviteUserWithPhotoRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, InviteUserWithPhotoRequest.class); } - /** - * Convert an instance of InviteUserWithPhotoRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of InviteUserWithPhotoRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Jam.java b/src/main/java/io/github/vrchatapi/model/Jam.java index 9260590a..01299a61 100644 --- a/src/main/java/io/github/vrchatapi/model/Jam.java +++ b/src/main/java/io/github/vrchatapi/model/Jam.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.JamStateChangeDates; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,278 +49,247 @@ /** * */ -@ApiModel(description = "") -@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 Jam { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IS_VISIBLE = "isVisible"; @SerializedName(SERIALIZED_NAME_IS_VISIBLE) + @javax.annotation.Nonnull private Boolean isVisible; public static final String SERIALIZED_NAME_MORE_INFO = "moreInfo"; @SerializedName(SERIALIZED_NAME_MORE_INFO) + @javax.annotation.Nonnull private String moreInfo; public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nonnull private String state; public static final String SERIALIZED_NAME_STATE_CHANGE_DATES = "stateChangeDates"; @SerializedName(SERIALIZED_NAME_STATE_CHANGE_DATES) + @javax.annotation.Nonnull private JamStateChangeDates stateChangeDates; public static final String SERIALIZED_NAME_SUBMISSION_CONTENT_GATE_DATE = "submissionContentGateDate"; @SerializedName(SERIALIZED_NAME_SUBMISSION_CONTENT_GATE_DATE) + @javax.annotation.Nullable private OffsetDateTime submissionContentGateDate; public static final String SERIALIZED_NAME_SUBMISSION_CONTENT_GATED = "submissionContentGated"; @SerializedName(SERIALIZED_NAME_SUBMISSION_CONTENT_GATED) + @javax.annotation.Nonnull private Boolean submissionContentGated; public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nonnull private String title; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public Jam() { } - public Jam description(String description) { - + public Jam description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public Jam id(String id) { - + public Jam id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "jam_0b7e3f6d-4647-4648-b2a1-1431e76906d9", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Jam isVisible(Boolean isVisible) { - + public Jam isVisible(@javax.annotation.Nonnull Boolean isVisible) { this.isVisible = isVisible; return this; } - /** + /** * Get isVisible * @return isVisible - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsVisible() { return isVisible; } - - public void setIsVisible(Boolean isVisible) { + public void setIsVisible(@javax.annotation.Nonnull Boolean isVisible) { this.isVisible = isVisible; } - public Jam moreInfo(String moreInfo) { - + public Jam moreInfo(@javax.annotation.Nonnull String moreInfo) { this.moreInfo = moreInfo; return this; } - /** + /** * Get moreInfo * @return moreInfo - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getMoreInfo() { return moreInfo; } - - public void setMoreInfo(String moreInfo) { + public void setMoreInfo(@javax.annotation.Nonnull String moreInfo) { this.moreInfo = moreInfo; } - public Jam state(String state) { - + public Jam state(@javax.annotation.Nonnull String state) { this.state = state; return this; } - /** + /** * One of: - submissions_open - closed * @return state - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "One of: - submissions_open - closed") - public String getState() { return state; } - - public void setState(String state) { + public void setState(@javax.annotation.Nonnull String state) { this.state = state; } - public Jam stateChangeDates(JamStateChangeDates stateChangeDates) { - + public Jam stateChangeDates(@javax.annotation.Nonnull JamStateChangeDates stateChangeDates) { this.stateChangeDates = stateChangeDates; return this; } - /** + /** * Get stateChangeDates * @return stateChangeDates - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public JamStateChangeDates getStateChangeDates() { return stateChangeDates; } - - public void setStateChangeDates(JamStateChangeDates stateChangeDates) { + public void setStateChangeDates(@javax.annotation.Nonnull JamStateChangeDates stateChangeDates) { this.stateChangeDates = stateChangeDates; } - public Jam submissionContentGateDate(OffsetDateTime submissionContentGateDate) { - + public Jam submissionContentGateDate(@javax.annotation.Nullable OffsetDateTime submissionContentGateDate) { this.submissionContentGateDate = submissionContentGateDate; return this; } - /** + /** * Get submissionContentGateDate * @return submissionContentGateDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getSubmissionContentGateDate() { return submissionContentGateDate; } - - public void setSubmissionContentGateDate(OffsetDateTime submissionContentGateDate) { + public void setSubmissionContentGateDate(@javax.annotation.Nullable OffsetDateTime submissionContentGateDate) { this.submissionContentGateDate = submissionContentGateDate; } - public Jam submissionContentGated(Boolean submissionContentGated) { - + public Jam submissionContentGated(@javax.annotation.Nonnull Boolean submissionContentGated) { this.submissionContentGated = submissionContentGated; return this; } - /** + /** * Get submissionContentGated * @return submissionContentGated - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getSubmissionContentGated() { return submissionContentGated; } - - public void setSubmissionContentGated(Boolean submissionContentGated) { + public void setSubmissionContentGated(@javax.annotation.Nonnull Boolean submissionContentGated) { this.submissionContentGated = submissionContentGated; } - public Jam title(String title) { - + public Jam title(@javax.annotation.Nonnull String title) { this.title = title; return this; } - /** + /** * Get title * @return title - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getTitle() { return title; } - - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nonnull String title) { this.title = title; } - public Jam updatedAt(OffsetDateTime updatedAt) { - + public Jam updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -375,10 +344,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -387,75 +353,56 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("isVisible"); - openapiFields.add("moreInfo"); - openapiFields.add("state"); - openapiFields.add("stateChangeDates"); - openapiFields.add("submissionContentGateDate"); - openapiFields.add("submissionContentGated"); - openapiFields.add("title"); - openapiFields.add("updated_at"); + openapiFields = new HashSet(Arrays.asList("description", "id", "isVisible", "moreInfo", "state", "stateChangeDates", "submissionContentGateDate", "submissionContentGated", "title", "updated_at")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("isVisible"); - openapiRequiredFields.add("moreInfo"); - openapiRequiredFields.add("state"); - openapiRequiredFields.add("stateChangeDates"); - openapiRequiredFields.add("submissionContentGateDate"); - openapiRequiredFields.add("submissionContentGated"); - openapiRequiredFields.add("title"); - openapiRequiredFields.add("updated_at"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Jam - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Jam.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Jam is not found in the empty JSON string", Jam.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("description", "id", "isVisible", "moreInfo", "state", "stateChangeDates", "submissionContentGateDate", "submissionContentGated", "title", "updated_at")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Jam + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Jam.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Jam is not found in the empty JSON string", Jam.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Jam.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Jam` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Jam` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Jam.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("moreInfo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `moreInfo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("moreInfo").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `moreInfo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("moreInfo").toString())); } if (!jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } // validate the required field `stateChangeDates` - JamStateChangeDates.validateJsonObject(jsonObj.getAsJsonObject("stateChangeDates")); + JamStateChangeDates.validateJsonElement(jsonObj.get("stateChangeDates")); if (!jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } } @@ -479,31 +426,31 @@ public void write(JsonWriter out, Jam value) throws IOException { @Override public Jam read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Jam given an JSON string - * - * @param jsonString JSON string - * @return An instance of Jam - * @throws IOException if the JSON string is invalid with respect to Jam - */ + /** + * Create an instance of Jam given an JSON string + * + * @param jsonString JSON string + * @return An instance of Jam + * @throws IOException if the JSON string is invalid with respect to Jam + */ public static Jam fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Jam.class); } - /** - * Convert an instance of Jam to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Jam to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/JamStateChangeDates.java b/src/main/java/io/github/vrchatapi/model/JamStateChangeDates.java index 01244f17..b84c29cc 100644 --- a/src/main/java/io/github/vrchatapi/model/JamStateChangeDates.java +++ b/src/main/java/io/github/vrchatapi/model/JamStateChangeDates.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,115 +49,103 @@ /** * JamStateChangeDates */ -@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 JamStateChangeDates { public static final String SERIALIZED_NAME_CLOSED = "closed"; @SerializedName(SERIALIZED_NAME_CLOSED) + @javax.annotation.Nullable private OffsetDateTime closed; public static final String SERIALIZED_NAME_SUBMISSIONS_CLOSED = "submissionsClosed"; @SerializedName(SERIALIZED_NAME_SUBMISSIONS_CLOSED) + @javax.annotation.Nullable private OffsetDateTime submissionsClosed; public static final String SERIALIZED_NAME_SUBMISSIONS_OPENED = "submissionsOpened"; @SerializedName(SERIALIZED_NAME_SUBMISSIONS_OPENED) + @javax.annotation.Nullable private OffsetDateTime submissionsOpened; public static final String SERIALIZED_NAME_WINNERS_SELECTED = "winnersSelected"; @SerializedName(SERIALIZED_NAME_WINNERS_SELECTED) + @javax.annotation.Nullable private OffsetDateTime winnersSelected; public JamStateChangeDates() { } - public JamStateChangeDates closed(OffsetDateTime closed) { - + public JamStateChangeDates closed(@javax.annotation.Nullable OffsetDateTime closed) { this.closed = closed; return this; } - /** + /** * Get closed * @return closed - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getClosed() { return closed; } - - public void setClosed(OffsetDateTime closed) { + public void setClosed(@javax.annotation.Nullable OffsetDateTime closed) { this.closed = closed; } - public JamStateChangeDates submissionsClosed(OffsetDateTime submissionsClosed) { - + public JamStateChangeDates submissionsClosed(@javax.annotation.Nullable OffsetDateTime submissionsClosed) { this.submissionsClosed = submissionsClosed; return this; } - /** + /** * Get submissionsClosed * @return submissionsClosed - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getSubmissionsClosed() { return submissionsClosed; } - - public void setSubmissionsClosed(OffsetDateTime submissionsClosed) { + public void setSubmissionsClosed(@javax.annotation.Nullable OffsetDateTime submissionsClosed) { this.submissionsClosed = submissionsClosed; } - public JamStateChangeDates submissionsOpened(OffsetDateTime submissionsOpened) { - + public JamStateChangeDates submissionsOpened(@javax.annotation.Nullable OffsetDateTime submissionsOpened) { this.submissionsOpened = submissionsOpened; return this; } - /** + /** * Get submissionsOpened * @return submissionsOpened - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getSubmissionsOpened() { return submissionsOpened; } - - public void setSubmissionsOpened(OffsetDateTime submissionsOpened) { + public void setSubmissionsOpened(@javax.annotation.Nullable OffsetDateTime submissionsOpened) { this.submissionsOpened = submissionsOpened; } - public JamStateChangeDates winnersSelected(OffsetDateTime winnersSelected) { - + public JamStateChangeDates winnersSelected(@javax.annotation.Nullable OffsetDateTime winnersSelected) { this.winnersSelected = winnersSelected; return this; } - /** + /** * Get winnersSelected * @return winnersSelected - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getWinnersSelected() { return winnersSelected; } - - public void setWinnersSelected(OffsetDateTime winnersSelected) { + public void setWinnersSelected(@javax.annotation.Nullable OffsetDateTime winnersSelected) { this.winnersSelected = winnersSelected; } @@ -211,10 +199,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -223,36 +208,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("closed"); - openapiFields.add("submissionsClosed"); - openapiFields.add("submissionsOpened"); - openapiFields.add("winnersSelected"); + openapiFields = new HashSet(Arrays.asList("closed", "submissionsClosed", "submissionsOpened", "winnersSelected")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to JamStateChangeDates - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!JamStateChangeDates.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in JamStateChangeDates is not found in the empty JSON string", JamStateChangeDates.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JamStateChangeDates + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JamStateChangeDates.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in JamStateChangeDates is not found in the empty JSON string", JamStateChangeDates.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!JamStateChangeDates.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JamStateChangeDates` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `JamStateChangeDates` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -275,31 +257,31 @@ public void write(JsonWriter out, JamStateChangeDates value) throws IOException @Override public JamStateChangeDates read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of JamStateChangeDates given an JSON string - * - * @param jsonString JSON string - * @return An instance of JamStateChangeDates - * @throws IOException if the JSON string is invalid with respect to JamStateChangeDates - */ + /** + * Create an instance of JamStateChangeDates given an JSON string + * + * @param jsonString JSON string + * @return An instance of JamStateChangeDates + * @throws IOException if the JSON string is invalid with respect to JamStateChangeDates + */ public static JamStateChangeDates fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, JamStateChangeDates.class); } - /** - * Convert an instance of JamStateChangeDates to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of JamStateChangeDates to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/JamSubmission.java b/src/main/java/io/github/vrchatapi/model/JamSubmission.java index 5f9840af..a2cac628 100644 --- a/src/main/java/io/github/vrchatapi/model/JamSubmission.java +++ b/src/main/java/io/github/vrchatapi/model/JamSubmission.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,198 +48,176 @@ /** * */ -@ApiModel(description = "") -@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 JamSubmission { public static final String SERIALIZED_NAME_CONTENT_ID = "contentId"; @SerializedName(SERIALIZED_NAME_CONTENT_ID) + @javax.annotation.Nonnull private String contentId; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_JAM_ID = "jamId"; @SerializedName(SERIALIZED_NAME_JAM_ID) + @javax.annotation.Nonnull private String jamId; public static final String SERIALIZED_NAME_RATING_SCORE = "ratingScore"; @SerializedName(SERIALIZED_NAME_RATING_SCORE) + @javax.annotation.Nullable private Integer ratingScore; public static final String SERIALIZED_NAME_SUBMITTER_ID = "submitterId"; @SerializedName(SERIALIZED_NAME_SUBMITTER_ID) + @javax.annotation.Nonnull private String submitterId; public JamSubmission() { } - public JamSubmission contentId(String contentId) { - + public JamSubmission contentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; return this; } - /** + /** * Either world ID or avatar ID * @return contentId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Either world ID or avatar ID") - public String getContentId() { return contentId; } - - public void setContentId(String contentId) { + public void setContentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; } - public JamSubmission createdAt(OffsetDateTime createdAt) { - + public JamSubmission createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public JamSubmission description(String description) { - + public JamSubmission description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public JamSubmission id(String id) { - + public JamSubmission id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "jsub_f01f44fa-89fa-443c-ab4c-7fed9245970f", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public JamSubmission jamId(String jamId) { - + public JamSubmission jamId(@javax.annotation.Nonnull String jamId) { this.jamId = jamId; return this; } - /** + /** * Get jamId * @return jamId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "jam_0b7e3f6d-4647-4648-b2a1-1431e76906d9", required = true, value = "") - public String getJamId() { return jamId; } - - public void setJamId(String jamId) { + public void setJamId(@javax.annotation.Nonnull String jamId) { this.jamId = jamId; } - public JamSubmission ratingScore(Integer ratingScore) { - + public JamSubmission ratingScore(@javax.annotation.Nullable Integer ratingScore) { this.ratingScore = ratingScore; return this; } - /** + /** * Get ratingScore * minimum: 0 * @return ratingScore - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getRatingScore() { return ratingScore; } - - public void setRatingScore(Integer ratingScore) { + public void setRatingScore(@javax.annotation.Nullable Integer ratingScore) { this.ratingScore = ratingScore; } - public JamSubmission submitterId(String submitterId) { - + public JamSubmission submitterId(@javax.annotation.Nonnull String submitterId) { this.submitterId = submitterId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return submitterId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getSubmitterId() { return submitterId; } - - public void setSubmitterId(String submitterId) { + public void setSubmitterId(@javax.annotation.Nonnull String submitterId) { this.submitterId = submitterId; } @@ -288,10 +266,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -300,66 +275,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("contentId"); - openapiFields.add("created_at"); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("jamId"); - openapiFields.add("ratingScore"); - openapiFields.add("submitterId"); + openapiFields = new HashSet(Arrays.asList("contentId", "created_at", "description", "id", "jamId", "ratingScore", "submitterId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("contentId"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("jamId"); - openapiRequiredFields.add("submitterId"); + openapiRequiredFields = new HashSet(Arrays.asList("contentId", "created_at", "description", "id", "jamId", "submitterId")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to JamSubmission - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!JamSubmission.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in JamSubmission is not found in the empty JSON string", JamSubmission.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JamSubmission + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JamSubmission.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in JamSubmission is not found in the empty JSON string", JamSubmission.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!JamSubmission.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JamSubmission` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `JamSubmission` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : JamSubmission.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("contentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("jamId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jamId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jamId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `jamId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jamId").toString())); } if (!jsonObj.get("submitterId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `submitterId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("submitterId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `submitterId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("submitterId").toString())); } } @@ -383,31 +346,31 @@ public void write(JsonWriter out, JamSubmission value) throws IOException { @Override public JamSubmission read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of JamSubmission given an JSON string - * - * @param jsonString JSON string - * @return An instance of JamSubmission - * @throws IOException if the JSON string is invalid with respect to JamSubmission - */ + /** + * Create an instance of JamSubmission given an JSON string + * + * @param jsonString JSON string + * @return An instance of JamSubmission + * @throws IOException if the JSON string is invalid with respect to JamSubmission + */ public static JamSubmission fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, JamSubmission.class); } - /** - * Convert an instance of JamSubmission to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of JamSubmission to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/JoinGroupRequest.java b/src/main/java/io/github/vrchatapi/model/JoinGroupRequest.java index 6ef2d540..bff1aafe 100644 --- a/src/main/java/io/github/vrchatapi/model/JoinGroupRequest.java +++ b/src/main/java/io/github/vrchatapi/model/JoinGroupRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * JoinGroupRequest */ -@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 JoinGroupRequest { public static final String SERIALIZED_NAME_INVITE_ID = "inviteId"; @SerializedName(SERIALIZED_NAME_INVITE_ID) + @javax.annotation.Nullable private String inviteId; public JoinGroupRequest() { } - public JoinGroupRequest inviteId(String inviteId) { - + public JoinGroupRequest inviteId(@javax.annotation.Nullable String inviteId) { this.inviteId = inviteId; return this; } - /** + /** * Get inviteId * @return inviteId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getInviteId() { return inviteId; } - - public void setInviteId(String inviteId) { + public void setInviteId(@javax.annotation.Nullable String inviteId) { this.inviteId = inviteId; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,35 +117,35 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("inviteId"); + openapiFields = new HashSet(Arrays.asList("inviteId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to JoinGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!JoinGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in JoinGroupRequest is not found in the empty JSON string", JoinGroupRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JoinGroupRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JoinGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in JoinGroupRequest is not found in the empty JSON string", JoinGroupRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!JoinGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JoinGroupRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `JoinGroupRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("inviteId") != null && !jsonObj.get("inviteId").isJsonNull()) && !jsonObj.get("inviteId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `inviteId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inviteId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `inviteId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inviteId").toString())); } } @@ -175,31 +169,31 @@ public void write(JsonWriter out, JoinGroupRequest value) throws IOException { @Override public JoinGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of JoinGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of JoinGroupRequest - * @throws IOException if the JSON string is invalid with respect to JoinGroupRequest - */ + /** + * Create an instance of JoinGroupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of JoinGroupRequest + * @throws IOException if the JSON string is invalid with respect to JoinGroupRequest + */ public static JoinGroupRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, JoinGroupRequest.class); } - /** - * Convert an instance of JoinGroupRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of JoinGroupRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/License.java b/src/main/java/io/github/vrchatapi/model/License.java index cdaa705e..8d1eac63 100644 --- a/src/main/java/io/github/vrchatapi/model/License.java +++ b/src/main/java/io/github/vrchatapi/model/License.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,9 +20,8 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.LicenseAction; import io.github.vrchatapi.model.LicenseType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,115 +49,103 @@ /** * License */ -@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 License { public static final String SERIALIZED_NAME_FOR_ACTION = "forAction"; @SerializedName(SERIALIZED_NAME_FOR_ACTION) + @javax.annotation.Nonnull private LicenseAction forAction = LicenseAction.HAVE; public static final String SERIALIZED_NAME_FOR_ID = "forId"; @SerializedName(SERIALIZED_NAME_FOR_ID) + @javax.annotation.Nonnull private String forId; public static final String SERIALIZED_NAME_FOR_NAME = "forName"; @SerializedName(SERIALIZED_NAME_FOR_NAME) + @javax.annotation.Nonnull private String forName; public static final String SERIALIZED_NAME_FOR_TYPE = "forType"; @SerializedName(SERIALIZED_NAME_FOR_TYPE) + @javax.annotation.Nonnull private LicenseType forType = LicenseType.PERMISSION; public License() { } - public License forAction(LicenseAction forAction) { - + public License forAction(@javax.annotation.Nonnull LicenseAction forAction) { this.forAction = forAction; return this; } - /** + /** * Get forAction * @return forAction - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public LicenseAction getForAction() { return forAction; } - - public void setForAction(LicenseAction forAction) { + public void setForAction(@javax.annotation.Nonnull LicenseAction forAction) { this.forAction = forAction; } - public License forId(String forId) { - + public License forId(@javax.annotation.Nonnull String forId) { this.forId = forId; return this; } - /** + /** * Either a AvatarID, LicenseGroupID, PermissionID or ProductID. This depends on the `forType` field. * @return forId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Either a AvatarID, LicenseGroupID, PermissionID or ProductID. This depends on the `forType` field.") - public String getForId() { return forId; } - - public void setForId(String forId) { + public void setForId(@javax.annotation.Nonnull String forId) { this.forId = forId; } - public License forName(String forName) { - + public License forName(@javax.annotation.Nonnull String forName) { this.forName = forName; return this; } - /** + /** * Get forName * @return forName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getForName() { return forName; } - - public void setForName(String forName) { + public void setForName(@javax.annotation.Nonnull String forName) { this.forName = forName; } - public License forType(LicenseType forType) { - + public License forType(@javax.annotation.Nonnull LicenseType forType) { this.forType = forType; return this; } - /** + /** * Get forType * @return forType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public LicenseType getForType() { return forType; } - - public void setForType(LicenseType forType) { + public void setForType(@javax.annotation.Nonnull LicenseType forType) { this.forType = forType; } @@ -200,10 +188,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -212,53 +197,50 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("forAction"); - openapiFields.add("forId"); - openapiFields.add("forName"); - openapiFields.add("forType"); + openapiFields = new HashSet(Arrays.asList("forAction", "forId", "forName", "forType")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("forAction"); - openapiRequiredFields.add("forId"); - openapiRequiredFields.add("forName"); - openapiRequiredFields.add("forType"); + openapiRequiredFields = new HashSet(Arrays.asList("forAction", "forId", "forName", "forType")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to License - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!License.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in License is not found in the empty JSON string", License.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to License + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!License.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in License is not found in the empty JSON string", License.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!License.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `License` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `License` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : License.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `forAction` + LicenseAction.validateJsonElement(jsonObj.get("forAction")); if (!jsonObj.get("forId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `forId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("forId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `forId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("forId").toString())); } if (!jsonObj.get("forName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `forName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("forName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `forName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("forName").toString())); } + // validate the required field `forType` + LicenseType.validateJsonElement(jsonObj.get("forType")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -281,31 +263,31 @@ public void write(JsonWriter out, License value) throws IOException { @Override public License read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of License given an JSON string - * - * @param jsonString JSON string - * @return An instance of License - * @throws IOException if the JSON string is invalid with respect to License - */ + /** + * Create an instance of License given an JSON string + * + * @param jsonString JSON string + * @return An instance of License + * @throws IOException if the JSON string is invalid with respect to License + */ public static License fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, License.class); } - /** - * Convert an instance of License to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of License to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/LicenseAction.java b/src/main/java/io/github/vrchatapi/model/LicenseAction.java index d7ceb348..01471279 100644 --- a/src/main/java/io/github/vrchatapi/model/LicenseAction.java +++ b/src/main/java/io/github/vrchatapi/model/LicenseAction.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +68,10 @@ public LicenseAction read(final JsonReader jsonReader) throws IOException { return LicenseAction.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LicenseAction.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/LicenseGroup.java b/src/main/java/io/github/vrchatapi/model/LicenseGroup.java index d366a96b..c8f24d5f 100644 --- a/src/main/java/io/github/vrchatapi/model/LicenseGroup.java +++ b/src/main/java/io/github/vrchatapi/model/LicenseGroup.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.License; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,121 +50,111 @@ /** * */ -@ApiModel(description = "") -@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 LicenseGroup { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_LICENSES = "licenses"; @SerializedName(SERIALIZED_NAME_LICENSES) + @javax.annotation.Nonnull private List licenses = new ArrayList<>(); public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public LicenseGroup() { } - public LicenseGroup description(String description) { - + public LicenseGroup description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public LicenseGroup id(String id) { - + public LicenseGroup id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "lgrp_608513da-b213-4e15-80af-bd88c27f0979", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public LicenseGroup licenses(List licenses) { - + public LicenseGroup licenses(@javax.annotation.Nonnull List licenses) { this.licenses = licenses; return this; } public LicenseGroup addLicensesItem(License licensesItem) { + if (this.licenses == null) { + this.licenses = new ArrayList<>(); + } this.licenses.add(licensesItem); return this; } - /** + /** * Get licenses * @return licenses - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getLicenses() { return licenses; } - - public void setLicenses(List licenses) { + public void setLicenses(@javax.annotation.Nonnull List licenses) { this.licenses = licenses; } - public LicenseGroup name(String name) { - + public LicenseGroup name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } @@ -207,10 +197,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -219,65 +206,58 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("licenses"); - openapiFields.add("name"); + openapiFields = new HashSet(Arrays.asList("description", "id", "licenses", "name")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("licenses"); - openapiRequiredFields.add("name"); + openapiRequiredFields = new HashSet(Arrays.asList("description", "id", "licenses", "name")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LicenseGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LicenseGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LicenseGroup is not found in the empty JSON string", LicenseGroup.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LicenseGroup + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LicenseGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LicenseGroup is not found in the empty JSON string", LicenseGroup.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!LicenseGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LicenseGroup` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `LicenseGroup` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : LicenseGroup.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("licenses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `licenses` to be an array in the JSON string but got `%s`", jsonObj.get("licenses").toString())); + if (jsonObj.get("licenses") != null) { + if (!jsonObj.get("licenses").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `licenses` to be an array in the JSON string but got `%s`", jsonObj.get("licenses").toString())); + } + JsonArray jsonArraylicenses = jsonObj.getAsJsonArray("licenses"); + // validate the required field `licenses` (array) + for (int i = 0; i < jsonArraylicenses.size(); i++) { + License.validateJsonElement(jsonArraylicenses.get(i)); + } } - - JsonArray jsonArraylicenses = jsonObj.getAsJsonArray("licenses"); - // validate the required field `licenses` (array) - for (int i = 0; i < jsonArraylicenses.size(); i++) { - License.validateJsonObject(jsonArraylicenses.get(i).getAsJsonObject()); - }; if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } @@ -301,31 +281,31 @@ public void write(JsonWriter out, LicenseGroup value) throws IOException { @Override public LicenseGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of LicenseGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of LicenseGroup - * @throws IOException if the JSON string is invalid with respect to LicenseGroup - */ + /** + * Create an instance of LicenseGroup given an JSON string + * + * @param jsonString JSON string + * @return An instance of LicenseGroup + * @throws IOException if the JSON string is invalid with respect to LicenseGroup + */ public static LicenseGroup fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, LicenseGroup.class); } - /** - * Convert an instance of LicenseGroup to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of LicenseGroup to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/LicenseType.java b/src/main/java/io/github/vrchatapi/model/LicenseType.java index a81a07ce..074a0f4c 100644 --- a/src/main/java/io/github/vrchatapi/model/LicenseType.java +++ b/src/main/java/io/github/vrchatapi/model/LicenseType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -30,7 +30,7 @@ public enum LicenseType { AVATAR("avatar"), - LICENSEGROUP("licenseGroup"), + LICENSE_GROUP("licenseGroup"), PERMISSION("permission"), @@ -72,5 +72,10 @@ public LicenseType read(final JsonReader jsonReader) throws IOException { return LicenseType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LicenseType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/LimitedGroup.java b/src/main/java/io/github/vrchatapi/model/LimitedGroup.java index 715a2b18..dfa2f342 100644 --- a/src/main/java/io/github/vrchatapi/model/LimitedGroup.java +++ b/src/main/java/io/github/vrchatapi/model/LimitedGroup.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,11 +20,10 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupGallery; import io.github.vrchatapi.model.GroupMemberStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -39,13 +37,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -53,196 +53,192 @@ /** * LimitedGroup */ -@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 LimitedGroup { public static final String SERIALIZED_NAME_BANNER_ID = "bannerId"; @SerializedName(SERIALIZED_NAME_BANNER_ID) + @javax.annotation.Nullable private String bannerId; public static final String SERIALIZED_NAME_BANNER_URL = "bannerUrl"; @SerializedName(SERIALIZED_NAME_BANNER_URL) + @javax.annotation.Nullable private String bannerUrl; public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_DISCRIMINATOR = "discriminator"; @SerializedName(SERIALIZED_NAME_DISCRIMINATOR) + @javax.annotation.Nullable private String discriminator; public static final String SERIALIZED_NAME_GALLERIES = "galleries"; @SerializedName(SERIALIZED_NAME_GALLERIES) - private List galleries = null; + @javax.annotation.Nullable + private List galleries = new ArrayList<>(); public static final String SERIALIZED_NAME_ICON_ID = "iconId"; @SerializedName(SERIALIZED_NAME_ICON_ID) + @javax.annotation.Nullable private String iconId; public static final String SERIALIZED_NAME_ICON_URL = "iconUrl"; @SerializedName(SERIALIZED_NAME_ICON_URL) + @javax.annotation.Nullable private String iconUrl; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IS_SEARCHABLE = "isSearchable"; @SerializedName(SERIALIZED_NAME_IS_SEARCHABLE) + @javax.annotation.Nullable private Boolean isSearchable; public static final String SERIALIZED_NAME_MEMBER_COUNT = "memberCount"; @SerializedName(SERIALIZED_NAME_MEMBER_COUNT) + @javax.annotation.Nullable private Integer memberCount; public static final String SERIALIZED_NAME_MEMBERSHIP_STATUS = "membershipStatus"; @SerializedName(SERIALIZED_NAME_MEMBERSHIP_STATUS) + @javax.annotation.Nullable private GroupMemberStatus membershipStatus = GroupMemberStatus.INACTIVE; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable private String ownerId; public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) + @javax.annotation.Nullable private String rules; public static final String SERIALIZED_NAME_SHORT_CODE = "shortCode"; @SerializedName(SERIALIZED_NAME_SHORT_CODE) + @javax.annotation.Nullable private String shortCode; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public LimitedGroup() { } - public LimitedGroup bannerId(String bannerId) { - + public LimitedGroup bannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; return this; } - /** + /** * Get bannerId * @return bannerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBannerId() { return bannerId; } - - public void setBannerId(String bannerId) { + public void setBannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; } - public LimitedGroup bannerUrl(String bannerUrl) { - + public LimitedGroup bannerUrl(@javax.annotation.Nullable String bannerUrl) { this.bannerUrl = bannerUrl; return this; } - /** + /** * Get bannerUrl * @return bannerUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBannerUrl() { return bannerUrl; } - - public void setBannerUrl(String bannerUrl) { + public void setBannerUrl(@javax.annotation.Nullable String bannerUrl) { this.bannerUrl = bannerUrl; } - public LimitedGroup createdAt(OffsetDateTime createdAt) { - + public LimitedGroup createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public LimitedGroup description(String description) { - + public LimitedGroup description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public LimitedGroup discriminator(String discriminator) { - + public LimitedGroup discriminator(@javax.annotation.Nullable String discriminator) { this.discriminator = discriminator; return this; } - /** + /** * Get discriminator * @return discriminator - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "0000", value = "") - public String getDiscriminator() { return discriminator; } - - public void setDiscriminator(String discriminator) { + public void setDiscriminator(@javax.annotation.Nullable String discriminator) { this.discriminator = discriminator; } - public LimitedGroup galleries(List galleries) { - + public LimitedGroup galleries(@javax.annotation.Nullable List galleries) { this.galleries = galleries; return this; } @@ -255,255 +251,211 @@ public LimitedGroup addGalleriesItem(GroupGallery galleriesItem) { return this; } - /** + /** * * @return galleries - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getGalleries() { return galleries; } - - public void setGalleries(List galleries) { + public void setGalleries(@javax.annotation.Nullable List galleries) { this.galleries = galleries; } - public LimitedGroup iconId(String iconId) { - + public LimitedGroup iconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; return this; } - /** + /** * Get iconId * @return iconId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIconId() { return iconId; } - - public void setIconId(String iconId) { + public void setIconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; } - public LimitedGroup iconUrl(String iconUrl) { - + public LimitedGroup iconUrl(@javax.annotation.Nullable String iconUrl) { this.iconUrl = iconUrl; return this; } - /** + /** * Get iconUrl * @return iconUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIconUrl() { return iconUrl; } - - public void setIconUrl(String iconUrl) { + public void setIconUrl(@javax.annotation.Nullable String iconUrl) { this.iconUrl = iconUrl; } - public LimitedGroup id(String id) { - + public LimitedGroup id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public LimitedGroup isSearchable(Boolean isSearchable) { - + public LimitedGroup isSearchable(@javax.annotation.Nullable Boolean isSearchable) { this.isSearchable = isSearchable; return this; } - /** + /** * Get isSearchable * @return isSearchable - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsSearchable() { return isSearchable; } - - public void setIsSearchable(Boolean isSearchable) { + public void setIsSearchable(@javax.annotation.Nullable Boolean isSearchable) { this.isSearchable = isSearchable; } - public LimitedGroup memberCount(Integer memberCount) { - + public LimitedGroup memberCount(@javax.annotation.Nullable Integer memberCount) { this.memberCount = memberCount; return this; } - /** + /** * Get memberCount * @return memberCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getMemberCount() { return memberCount; } - - public void setMemberCount(Integer memberCount) { + public void setMemberCount(@javax.annotation.Nullable Integer memberCount) { this.memberCount = memberCount; } - public LimitedGroup membershipStatus(GroupMemberStatus membershipStatus) { - + public LimitedGroup membershipStatus(@javax.annotation.Nullable GroupMemberStatus membershipStatus) { this.membershipStatus = membershipStatus; return this; } - /** + /** * Get membershipStatus * @return membershipStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupMemberStatus getMembershipStatus() { return membershipStatus; } - - public void setMembershipStatus(GroupMemberStatus membershipStatus) { + public void setMembershipStatus(@javax.annotation.Nullable GroupMemberStatus membershipStatus) { this.membershipStatus = membershipStatus; } - public LimitedGroup name(String name) { - + public LimitedGroup name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public LimitedGroup ownerId(String ownerId) { - + public LimitedGroup ownerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return ownerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getOwnerId() { return ownerId; } - - public void setOwnerId(String ownerId) { + public void setOwnerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; } - public LimitedGroup rules(String rules) { - + public LimitedGroup rules(@javax.annotation.Nullable String rules) { this.rules = rules; return this; } - /** + /** * Get rules * @return rules - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getRules() { return rules; } - - public void setRules(String rules) { + public void setRules(@javax.annotation.Nullable String rules) { this.rules = rules; } - public LimitedGroup shortCode(String shortCode) { - + public LimitedGroup shortCode(@javax.annotation.Nullable String shortCode) { this.shortCode = shortCode; return this; } - /** + /** * Get shortCode * @return shortCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "VRCHAT", value = "") - public String getShortCode() { return shortCode; } - - public void setShortCode(String shortCode) { + public void setShortCode(@javax.annotation.Nullable String shortCode) { this.shortCode = shortCode; } - public LimitedGroup tags(List tags) { - + public LimitedGroup tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -516,19 +468,16 @@ public LimitedGroup addTagsItem(String tagsItem) { return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } @@ -608,10 +557,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -620,99 +566,87 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bannerId"); - openapiFields.add("bannerUrl"); - openapiFields.add("createdAt"); - openapiFields.add("description"); - openapiFields.add("discriminator"); - openapiFields.add("galleries"); - openapiFields.add("iconId"); - openapiFields.add("iconUrl"); - openapiFields.add("id"); - openapiFields.add("isSearchable"); - openapiFields.add("memberCount"); - openapiFields.add("membershipStatus"); - openapiFields.add("name"); - openapiFields.add("ownerId"); - openapiFields.add("rules"); - openapiFields.add("shortCode"); - openapiFields.add("tags"); + openapiFields = new HashSet(Arrays.asList("bannerId", "bannerUrl", "createdAt", "description", "discriminator", "galleries", "iconId", "iconUrl", "id", "isSearchable", "memberCount", "membershipStatus", "name", "ownerId", "rules", "shortCode", "tags")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LimitedGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LimitedGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LimitedGroup is not found in the empty JSON string", LimitedGroup.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LimitedGroup + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LimitedGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LimitedGroup is not found in the empty JSON string", LimitedGroup.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!LimitedGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LimitedGroup` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `LimitedGroup` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("bannerId") != null && !jsonObj.get("bannerId").isJsonNull()) && !jsonObj.get("bannerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); } if ((jsonObj.get("bannerUrl") != null && !jsonObj.get("bannerUrl").isJsonNull()) && !jsonObj.get("bannerUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bannerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerUrl").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("discriminator") != null && !jsonObj.get("discriminator").isJsonNull()) && !jsonObj.get("discriminator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `discriminator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discriminator").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `discriminator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discriminator").toString())); } if (jsonObj.get("galleries") != null && !jsonObj.get("galleries").isJsonNull()) { JsonArray jsonArraygalleries = jsonObj.getAsJsonArray("galleries"); if (jsonArraygalleries != null) { // ensure the json data is an array if (!jsonObj.get("galleries").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `galleries` to be an array in the JSON string but got `%s`", jsonObj.get("galleries").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `galleries` to be an array in the JSON string but got `%s`", jsonObj.get("galleries").toString())); } // validate the optional field `galleries` (array) for (int i = 0; i < jsonArraygalleries.size(); i++) { - GroupGallery.validateJsonObject(jsonArraygalleries.get(i).getAsJsonObject()); + GroupGallery.validateJsonElement(jsonArraygalleries.get(i)); }; } } if ((jsonObj.get("iconId") != null && !jsonObj.get("iconId").isJsonNull()) && !jsonObj.get("iconId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); } if ((jsonObj.get("iconUrl") != null && !jsonObj.get("iconUrl").isJsonNull()) && !jsonObj.get("iconUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + // validate the optional field `membershipStatus` + if (jsonObj.get("membershipStatus") != null && !jsonObj.get("membershipStatus").isJsonNull()) { + GroupMemberStatus.validateJsonElement(jsonObj.get("membershipStatus")); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); } if ((jsonObj.get("rules") != null && !jsonObj.get("rules").isJsonNull()) && !jsonObj.get("rules").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `rules` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rules").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `rules` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rules").toString())); } if ((jsonObj.get("shortCode") != null && !jsonObj.get("shortCode").isJsonNull()) && !jsonObj.get("shortCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -736,31 +670,31 @@ public void write(JsonWriter out, LimitedGroup value) throws IOException { @Override public LimitedGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of LimitedGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of LimitedGroup - * @throws IOException if the JSON string is invalid with respect to LimitedGroup - */ + /** + * Create an instance of LimitedGroup given an JSON string + * + * @param jsonString JSON string + * @return An instance of LimitedGroup + * @throws IOException if the JSON string is invalid with respect to LimitedGroup + */ public static LimitedGroup fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, LimitedGroup.class); } - /** - * Convert an instance of LimitedGroup to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of LimitedGroup to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/LimitedUnityPackage.java b/src/main/java/io/github/vrchatapi/model/LimitedUnityPackage.java index 4563052a..6145c2b8 100644 --- a/src/main/java/io/github/vrchatapi/model/LimitedUnityPackage.java +++ b/src/main/java/io/github/vrchatapi/model/LimitedUnityPackage.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,89 +48,79 @@ /** * */ -@ApiModel(description = "") -@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 LimitedUnityPackage { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nonnull private String platform; public static final String SERIALIZED_NAME_UNITY_VERSION = "unityVersion"; @SerializedName(SERIALIZED_NAME_UNITY_VERSION) + @javax.annotation.Nonnull private String unityVersion; public LimitedUnityPackage() { } - public LimitedUnityPackage createdAt(OffsetDateTime createdAt) { - + public LimitedUnityPackage createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public LimitedUnityPackage platform(String platform) { - + public LimitedUnityPackage platform(@javax.annotation.Nonnull String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows", required = true, value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nonnull String platform) { this.platform = platform; } - public LimitedUnityPackage unityVersion(String unityVersion) { - + public LimitedUnityPackage unityVersion(@javax.annotation.Nonnull String unityVersion) { this.unityVersion = unityVersion; return this; } - /** + /** * Get unityVersion * @return unityVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2022.3.6f1", required = true, value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nonnull String unityVersion) { this.unityVersion = unityVersion; } @@ -171,10 +161,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -183,50 +170,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("platform"); - openapiFields.add("unityVersion"); + openapiFields = new HashSet(Arrays.asList("created_at", "platform", "unityVersion")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("platform"); - openapiRequiredFields.add("unityVersion"); + openapiRequiredFields = new HashSet(Arrays.asList("created_at", "platform", "unityVersion")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LimitedUnityPackage - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LimitedUnityPackage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LimitedUnityPackage is not found in the empty JSON string", LimitedUnityPackage.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LimitedUnityPackage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LimitedUnityPackage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LimitedUnityPackage is not found in the empty JSON string", LimitedUnityPackage.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!LimitedUnityPackage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LimitedUnityPackage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `LimitedUnityPackage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : LimitedUnityPackage.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if (!jsonObj.get("unityVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); } } @@ -250,31 +232,31 @@ public void write(JsonWriter out, LimitedUnityPackage value) throws IOException @Override public LimitedUnityPackage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of LimitedUnityPackage given an JSON string - * - * @param jsonString JSON string - * @return An instance of LimitedUnityPackage - * @throws IOException if the JSON string is invalid with respect to LimitedUnityPackage - */ + /** + * Create an instance of LimitedUnityPackage given an JSON string + * + * @param jsonString JSON string + * @return An instance of LimitedUnityPackage + * @throws IOException if the JSON string is invalid with respect to LimitedUnityPackage + */ public static LimitedUnityPackage fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, LimitedUnityPackage.class); } - /** - * Convert an instance of LimitedUnityPackage to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of LimitedUnityPackage to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/LimitedUserFriend.java b/src/main/java/io/github/vrchatapi/model/LimitedUserFriend.java index 06bd9f3e..7a9a57c9 100644 --- a/src/main/java/io/github/vrchatapi/model/LimitedUserFriend.java +++ b/src/main/java/io/github/vrchatapi/model/LimitedUserFriend.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,11 +20,10 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.DeveloperType; import io.github.vrchatapi.model.UserStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -38,13 +36,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -52,129 +52,146 @@ /** * User object received when querying your friends list */ -@ApiModel(description = "User object received when querying your friends list") -@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 LimitedUserFriend { public static final String SERIALIZED_NAME_BIO = "bio"; @SerializedName(SERIALIZED_NAME_BIO) + @javax.annotation.Nullable private String bio; public static final String SERIALIZED_NAME_BIO_LINKS = "bioLinks"; @SerializedName(SERIALIZED_NAME_BIO_LINKS) - private List bioLinks = null; + @javax.annotation.Nullable + private List bioLinks = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL = "currentAvatarImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL) + @javax.annotation.Nullable private String currentAvatarImageUrl; public static final String SERIALIZED_NAME_CURRENT_AVATAR_TAGS = "currentAvatarTags"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_TAGS) - private List currentAvatarTags = null; + @javax.annotation.Nullable + private List currentAvatarTags = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL = "currentAvatarThumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nullable private String currentAvatarThumbnailImageUrl; public static final String SERIALIZED_NAME_DEVELOPER_TYPE = "developerType"; @SerializedName(SERIALIZED_NAME_DEVELOPER_TYPE) + @javax.annotation.Nonnull private DeveloperType developerType = DeveloperType.NONE; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_FRIEND_KEY = "friendKey"; @SerializedName(SERIALIZED_NAME_FRIEND_KEY) + @javax.annotation.Nonnull private String friendKey; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_IS_FRIEND = "isFriend"; @SerializedName(SERIALIZED_NAME_IS_FRIEND) + @javax.annotation.Nonnull private Boolean isFriend; public static final String SERIALIZED_NAME_LAST_ACTIVITY = "last_activity"; @SerializedName(SERIALIZED_NAME_LAST_ACTIVITY) + @javax.annotation.Nullable private OffsetDateTime lastActivity; public static final String SERIALIZED_NAME_LAST_LOGIN = "last_login"; @SerializedName(SERIALIZED_NAME_LAST_LOGIN) + @javax.annotation.Nullable private OffsetDateTime lastLogin; public static final String SERIALIZED_NAME_LAST_MOBILE = "last_mobile"; @SerializedName(SERIALIZED_NAME_LAST_MOBILE) + @javax.annotation.Nullable private OffsetDateTime lastMobile; public static final String SERIALIZED_NAME_LAST_PLATFORM = "last_platform"; @SerializedName(SERIALIZED_NAME_LAST_PLATFORM) + @javax.annotation.Nonnull private String lastPlatform; public static final String SERIALIZED_NAME_LOCATION = "location"; @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nonnull private String location; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nonnull private String platform; public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE = "profilePicOverride"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE) + @javax.annotation.Nullable private String profilePicOverride; public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE_THUMBNAIL = "profilePicOverrideThumbnail"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE_THUMBNAIL) + @javax.annotation.Nullable private String profilePicOverrideThumbnail; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private UserStatus status = UserStatus.OFFLINE; public static final String SERIALIZED_NAME_STATUS_DESCRIPTION = "statusDescription"; @SerializedName(SERIALIZED_NAME_STATUS_DESCRIPTION) + @javax.annotation.Nonnull private String statusDescription; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_USER_ICON = "userIcon"; @SerializedName(SERIALIZED_NAME_USER_ICON) + @javax.annotation.Nullable private String userIcon; public LimitedUserFriend() { } - public LimitedUserFriend bio(String bio) { - + public LimitedUserFriend bio(@javax.annotation.Nullable String bio) { this.bio = bio; return this; } - /** + /** * Get bio * @return bio - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBio() { return bio; } - - public void setBio(String bio) { + public void setBio(@javax.annotation.Nullable String bio) { this.bio = bio; } - public LimitedUserFriend bioLinks(List bioLinks) { - + public LimitedUserFriend bioLinks(@javax.annotation.Nullable List bioLinks) { this.bioLinks = bioLinks; return this; } @@ -187,48 +204,40 @@ public LimitedUserFriend addBioLinksItem(String bioLinksItem) { return this; } - /** + /** * * @return bioLinks - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getBioLinks() { return bioLinks; } - - public void setBioLinks(List bioLinks) { + public void setBioLinks(@javax.annotation.Nullable List bioLinks) { this.bioLinks = bioLinks; } - public LimitedUserFriend currentAvatarImageUrl(String currentAvatarImageUrl) { - + public LimitedUserFriend currentAvatarImageUrl(@javax.annotation.Nullable String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarImageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/file/file_ae46d521-7281-4b38-b365-804b32a1d6a7/1/file", value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarImageUrl() { return currentAvatarImageUrl; } - - public void setCurrentAvatarImageUrl(String currentAvatarImageUrl) { + public void setCurrentAvatarImageUrl(@javax.annotation.Nullable String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; } - public LimitedUserFriend currentAvatarTags(List currentAvatarTags) { - + public LimitedUserFriend currentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; return this; } @@ -241,461 +250,385 @@ public LimitedUserFriend addCurrentAvatarTagsItem(String currentAvatarTagsItem) return this; } - /** + /** * Get currentAvatarTags * @return currentAvatarTags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getCurrentAvatarTags() { return currentAvatarTags; } - - public void setCurrentAvatarTags(List currentAvatarTags) { + public void setCurrentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; } - public LimitedUserFriend currentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { - + public LimitedUserFriend currentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarThumbnailImageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/image/file_aae83ed9-d42d-4d72-9f4b-9f1e41ed17e1/1/256", value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarThumbnailImageUrl() { return currentAvatarThumbnailImageUrl; } - - public void setCurrentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; } - public LimitedUserFriend developerType(DeveloperType developerType) { - + public LimitedUserFriend developerType(@javax.annotation.Nonnull DeveloperType developerType) { this.developerType = developerType; return this; } - /** + /** * Get developerType * @return developerType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public DeveloperType getDeveloperType() { return developerType; } - - public void setDeveloperType(DeveloperType developerType) { + public void setDeveloperType(@javax.annotation.Nonnull DeveloperType developerType) { this.developerType = developerType; } - public LimitedUserFriend displayName(String displayName) { - + public LimitedUserFriend displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public LimitedUserFriend friendKey(String friendKey) { - + public LimitedUserFriend friendKey(@javax.annotation.Nonnull String friendKey) { this.friendKey = friendKey; return this; } - /** + /** * Get friendKey * @return friendKey - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getFriendKey() { return friendKey; } - - public void setFriendKey(String friendKey) { + public void setFriendKey(@javax.annotation.Nonnull String friendKey) { this.friendKey = friendKey; } - public LimitedUserFriend id(String id) { - + public LimitedUserFriend id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public LimitedUserFriend imageUrl(String imageUrl) { - + public LimitedUserFriend imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public LimitedUserFriend isFriend(Boolean isFriend) { - + public LimitedUserFriend isFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; return this; } - /** + /** * Get isFriend * @return isFriend - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsFriend() { return isFriend; } - - public void setIsFriend(Boolean isFriend) { + public void setIsFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; } - public LimitedUserFriend lastActivity(OffsetDateTime lastActivity) { - + public LimitedUserFriend lastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { this.lastActivity = lastActivity; return this; } - /** + /** * Get lastActivity * @return lastActivity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getLastActivity() { return lastActivity; } - - public void setLastActivity(OffsetDateTime lastActivity) { + public void setLastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { this.lastActivity = lastActivity; } - public LimitedUserFriend lastLogin(OffsetDateTime lastLogin) { - + public LimitedUserFriend lastLogin(@javax.annotation.Nullable OffsetDateTime lastLogin) { this.lastLogin = lastLogin; return this; } - /** + /** * Get lastLogin * @return lastLogin - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getLastLogin() { return lastLogin; } - - public void setLastLogin(OffsetDateTime lastLogin) { + public void setLastLogin(@javax.annotation.Nullable OffsetDateTime lastLogin) { this.lastLogin = lastLogin; } - public LimitedUserFriend lastMobile(OffsetDateTime lastMobile) { - + public LimitedUserFriend lastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { this.lastMobile = lastMobile; return this; } - /** + /** * Get lastMobile * @return lastMobile - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getLastMobile() { return lastMobile; } - - public void setLastMobile(OffsetDateTime lastMobile) { + public void setLastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { this.lastMobile = lastMobile; } - public LimitedUserFriend lastPlatform(String lastPlatform) { - + public LimitedUserFriend lastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return lastPlatform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows", required = true, value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getLastPlatform() { return lastPlatform; } - - public void setLastPlatform(String lastPlatform) { + public void setLastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; } - public LimitedUserFriend location(String location) { - + public LimitedUserFriend location(@javax.annotation.Nonnull String location) { this.location = location; return this; } - /** + /** * Get location * @return location - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getLocation() { return location; } - - public void setLocation(String location) { + public void setLocation(@javax.annotation.Nonnull String location) { this.location = location; } - public LimitedUserFriend platform(String platform) { - + public LimitedUserFriend platform(@javax.annotation.Nonnull String platform) { this.platform = platform; return this; } - /** + /** * Get platform * @return platform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nonnull String platform) { this.platform = platform; } - public LimitedUserFriend profilePicOverride(String profilePicOverride) { - + public LimitedUserFriend profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; return this; } - /** + /** * Get profilePicOverride * @return profilePicOverride - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProfilePicOverride() { return profilePicOverride; } - - public void setProfilePicOverride(String profilePicOverride) { + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; } - public LimitedUserFriend profilePicOverrideThumbnail(String profilePicOverrideThumbnail) { - + public LimitedUserFriend profilePicOverrideThumbnail(@javax.annotation.Nullable String profilePicOverrideThumbnail) { this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; return this; } - /** + /** * Get profilePicOverrideThumbnail * @return profilePicOverrideThumbnail - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProfilePicOverrideThumbnail() { return profilePicOverrideThumbnail; } - - public void setProfilePicOverrideThumbnail(String profilePicOverrideThumbnail) { + public void setProfilePicOverrideThumbnail(@javax.annotation.Nullable String profilePicOverrideThumbnail) { this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; } - public LimitedUserFriend status(UserStatus status) { - + public LimitedUserFriend status(@javax.annotation.Nonnull UserStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public UserStatus getStatus() { return status; } - - public void setStatus(UserStatus status) { + public void setStatus(@javax.annotation.Nonnull UserStatus status) { this.status = status; } - public LimitedUserFriend statusDescription(String statusDescription) { - + public LimitedUserFriend statusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; return this; } - /** + /** * Get statusDescription * @return statusDescription - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getStatusDescription() { return statusDescription; } - - public void setStatusDescription(String statusDescription) { + public void setStatusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; } - public LimitedUserFriend tags(List tags) { - + public LimitedUserFriend tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public LimitedUserFriend addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * <- Always empty. * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "<- Always empty.") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public LimitedUserFriend userIcon(String userIcon) { - + public LimitedUserFriend userIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; return this; } - /** + /** * Get userIcon * @return userIcon - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUserIcon() { return userIcon; } - - public void setUserIcon(String userIcon) { + public void setUserIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; } @@ -776,10 +709,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -788,132 +718,99 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bio"); - openapiFields.add("bioLinks"); - openapiFields.add("currentAvatarImageUrl"); - openapiFields.add("currentAvatarTags"); - openapiFields.add("currentAvatarThumbnailImageUrl"); - openapiFields.add("developerType"); - openapiFields.add("displayName"); - openapiFields.add("friendKey"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("isFriend"); - openapiFields.add("last_activity"); - openapiFields.add("last_login"); - openapiFields.add("last_mobile"); - openapiFields.add("last_platform"); - openapiFields.add("location"); - openapiFields.add("platform"); - openapiFields.add("profilePicOverride"); - openapiFields.add("profilePicOverrideThumbnail"); - openapiFields.add("status"); - openapiFields.add("statusDescription"); - openapiFields.add("tags"); - openapiFields.add("userIcon"); + openapiFields = new HashSet(Arrays.asList("bio", "bioLinks", "currentAvatarImageUrl", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "developerType", "displayName", "friendKey", "id", "imageUrl", "isFriend", "last_activity", "last_login", "last_mobile", "last_platform", "location", "platform", "profilePicOverride", "profilePicOverrideThumbnail", "status", "statusDescription", "tags", "userIcon")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("developerType"); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("friendKey"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("isFriend"); - openapiRequiredFields.add("last_activity"); - openapiRequiredFields.add("last_login"); - openapiRequiredFields.add("last_mobile"); - openapiRequiredFields.add("last_platform"); - openapiRequiredFields.add("location"); - openapiRequiredFields.add("platform"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("statusDescription"); - openapiRequiredFields.add("tags"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LimitedUserFriend - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LimitedUserFriend.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LimitedUserFriend is not found in the empty JSON string", LimitedUserFriend.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("developerType", "displayName", "friendKey", "id", "imageUrl", "isFriend", "last_activity", "last_login", "last_mobile", "last_platform", "location", "platform", "status", "statusDescription", "tags")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LimitedUserFriend + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LimitedUserFriend.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LimitedUserFriend is not found in the empty JSON string", LimitedUserFriend.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!LimitedUserFriend.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LimitedUserFriend` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `LimitedUserFriend` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : LimitedUserFriend.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("bio") != null && !jsonObj.get("bio").isJsonNull()) && !jsonObj.get("bio").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("bioLinks") != null && !jsonObj.get("bioLinks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); + if (jsonObj.get("bioLinks") != null && !jsonObj.get("bioLinks").isJsonNull() && !jsonObj.get("bioLinks").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); } if ((jsonObj.get("currentAvatarImageUrl") != null && !jsonObj.get("currentAvatarImageUrl").isJsonNull()) && !jsonObj.get("currentAvatarImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("currentAvatarTags") != null && !jsonObj.get("currentAvatarTags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); + if (jsonObj.get("currentAvatarTags") != null && !jsonObj.get("currentAvatarTags").isJsonNull() && !jsonObj.get("currentAvatarTags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); } if ((jsonObj.get("currentAvatarThumbnailImageUrl") != null && !jsonObj.get("currentAvatarThumbnailImageUrl").isJsonNull()) && !jsonObj.get("currentAvatarThumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); } + // validate the required field `developerType` + DeveloperType.validateJsonElement(jsonObj.get("developerType")); if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if (!jsonObj.get("friendKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `friendKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friendKey").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `friendKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friendKey").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("last_platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_platform").toString())); } if (!jsonObj.get("location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); } if (!jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if ((jsonObj.get("profilePicOverride") != null && !jsonObj.get("profilePicOverride").isJsonNull()) && !jsonObj.get("profilePicOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); } if ((jsonObj.get("profilePicOverrideThumbnail") != null && !jsonObj.get("profilePicOverrideThumbnail").isJsonNull()) && !jsonObj.get("profilePicOverrideThumbnail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverrideThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverrideThumbnail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverrideThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverrideThumbnail").toString())); } + // validate the required field `status` + UserStatus.validateJsonElement(jsonObj.get("status")); if (!jsonObj.get("statusDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("userIcon") != null && !jsonObj.get("userIcon").isJsonNull()) && !jsonObj.get("userIcon").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); } } @@ -937,31 +834,31 @@ public void write(JsonWriter out, LimitedUserFriend value) throws IOException { @Override public LimitedUserFriend read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of LimitedUserFriend given an JSON string - * - * @param jsonString JSON string - * @return An instance of LimitedUserFriend - * @throws IOException if the JSON string is invalid with respect to LimitedUserFriend - */ + /** + * Create an instance of LimitedUserFriend given an JSON string + * + * @param jsonString JSON string + * @return An instance of LimitedUserFriend + * @throws IOException if the JSON string is invalid with respect to LimitedUserFriend + */ public static LimitedUserFriend fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, LimitedUserFriend.class); } - /** - * Convert an instance of LimitedUserFriend to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of LimitedUserFriend to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/LimitedUserGroups.java b/src/main/java/io/github/vrchatapi/model/LimitedUserGroups.java index def9c468..cd1d28b3 100644 --- a/src/main/java/io/github/vrchatapi/model/LimitedUserGroups.java +++ b/src/main/java/io/github/vrchatapi/model/LimitedUserGroups.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,493 +49,439 @@ /** * LimitedUserGroups */ -@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 LimitedUserGroups { public static final String SERIALIZED_NAME_BANNER_ID = "bannerId"; @SerializedName(SERIALIZED_NAME_BANNER_ID) + @javax.annotation.Nullable private String bannerId; public static final String SERIALIZED_NAME_BANNER_URL = "bannerUrl"; @SerializedName(SERIALIZED_NAME_BANNER_URL) + @javax.annotation.Nullable private String bannerUrl; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_DISCRIMINATOR = "discriminator"; @SerializedName(SERIALIZED_NAME_DISCRIMINATOR) + @javax.annotation.Nullable private String discriminator; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nullable private String groupId; public static final String SERIALIZED_NAME_ICON_ID = "iconId"; @SerializedName(SERIALIZED_NAME_ICON_ID) + @javax.annotation.Nullable private String iconId; public static final String SERIALIZED_NAME_ICON_URL = "iconUrl"; @SerializedName(SERIALIZED_NAME_ICON_URL) + @javax.annotation.Nullable private String iconUrl; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IS_REPRESENTING = "isRepresenting"; @SerializedName(SERIALIZED_NAME_IS_REPRESENTING) + @javax.annotation.Nullable private Boolean isRepresenting; public static final String SERIALIZED_NAME_LAST_POST_CREATED_AT = "lastPostCreatedAt"; @SerializedName(SERIALIZED_NAME_LAST_POST_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime lastPostCreatedAt; public static final String SERIALIZED_NAME_LAST_POST_READ_AT = "lastPostReadAt"; @SerializedName(SERIALIZED_NAME_LAST_POST_READ_AT) + @javax.annotation.Nullable private OffsetDateTime lastPostReadAt; public static final String SERIALIZED_NAME_MEMBER_COUNT = "memberCount"; @SerializedName(SERIALIZED_NAME_MEMBER_COUNT) + @javax.annotation.Nullable private Integer memberCount; public static final String SERIALIZED_NAME_MEMBER_VISIBILITY = "memberVisibility"; @SerializedName(SERIALIZED_NAME_MEMBER_VISIBILITY) + @javax.annotation.Nullable private String memberVisibility; public static final String SERIALIZED_NAME_MUTUAL_GROUP = "mutualGroup"; @SerializedName(SERIALIZED_NAME_MUTUAL_GROUP) + @javax.annotation.Nullable private Boolean mutualGroup; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable private String ownerId; public static final String SERIALIZED_NAME_PRIVACY = "privacy"; @SerializedName(SERIALIZED_NAME_PRIVACY) + @javax.annotation.Nullable private String privacy; public static final String SERIALIZED_NAME_SHORT_CODE = "shortCode"; @SerializedName(SERIALIZED_NAME_SHORT_CODE) + @javax.annotation.Nullable private String shortCode; public LimitedUserGroups() { } - public LimitedUserGroups bannerId(String bannerId) { - + public LimitedUserGroups bannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; return this; } - /** + /** * Get bannerId * @return bannerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBannerId() { return bannerId; } - - public void setBannerId(String bannerId) { + public void setBannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; } - public LimitedUserGroups bannerUrl(String bannerUrl) { - + public LimitedUserGroups bannerUrl(@javax.annotation.Nullable String bannerUrl) { this.bannerUrl = bannerUrl; return this; } - /** + /** * Get bannerUrl * @return bannerUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBannerUrl() { return bannerUrl; } - - public void setBannerUrl(String bannerUrl) { + public void setBannerUrl(@javax.annotation.Nullable String bannerUrl) { this.bannerUrl = bannerUrl; } - public LimitedUserGroups description(String description) { - + public LimitedUserGroups description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public LimitedUserGroups discriminator(String discriminator) { - + public LimitedUserGroups discriminator(@javax.annotation.Nullable String discriminator) { this.discriminator = discriminator; return this; } - /** + /** * Get discriminator * @return discriminator - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "0000", value = "") - public String getDiscriminator() { return discriminator; } - - public void setDiscriminator(String discriminator) { + public void setDiscriminator(@javax.annotation.Nullable String discriminator) { this.discriminator = discriminator; } - public LimitedUserGroups groupId(String groupId) { - + public LimitedUserGroups groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } - public LimitedUserGroups iconId(String iconId) { - + public LimitedUserGroups iconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; return this; } - /** + /** * Get iconId * @return iconId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIconId() { return iconId; } - - public void setIconId(String iconId) { + public void setIconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; } - public LimitedUserGroups iconUrl(String iconUrl) { - + public LimitedUserGroups iconUrl(@javax.annotation.Nullable String iconUrl) { this.iconUrl = iconUrl; return this; } - /** + /** * Get iconUrl * @return iconUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIconUrl() { return iconUrl; } - - public void setIconUrl(String iconUrl) { + public void setIconUrl(@javax.annotation.Nullable String iconUrl) { this.iconUrl = iconUrl; } - public LimitedUserGroups id(String id) { - + public LimitedUserGroups id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "gmem_95cdb3b4-4643-4eb6-bdab-46a4e1e5ce37", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public LimitedUserGroups isRepresenting(Boolean isRepresenting) { - + public LimitedUserGroups isRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { this.isRepresenting = isRepresenting; return this; } - /** + /** * Get isRepresenting * @return isRepresenting - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsRepresenting() { return isRepresenting; } - - public void setIsRepresenting(Boolean isRepresenting) { + public void setIsRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { this.isRepresenting = isRepresenting; } - public LimitedUserGroups lastPostCreatedAt(OffsetDateTime lastPostCreatedAt) { - + public LimitedUserGroups lastPostCreatedAt(@javax.annotation.Nullable OffsetDateTime lastPostCreatedAt) { this.lastPostCreatedAt = lastPostCreatedAt; return this; } - /** + /** * Get lastPostCreatedAt * @return lastPostCreatedAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getLastPostCreatedAt() { return lastPostCreatedAt; } - - public void setLastPostCreatedAt(OffsetDateTime lastPostCreatedAt) { + public void setLastPostCreatedAt(@javax.annotation.Nullable OffsetDateTime lastPostCreatedAt) { this.lastPostCreatedAt = lastPostCreatedAt; } - public LimitedUserGroups lastPostReadAt(OffsetDateTime lastPostReadAt) { - + public LimitedUserGroups lastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { this.lastPostReadAt = lastPostReadAt; return this; } - /** + /** * Get lastPostReadAt * @return lastPostReadAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getLastPostReadAt() { return lastPostReadAt; } - - public void setLastPostReadAt(OffsetDateTime lastPostReadAt) { + public void setLastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { this.lastPostReadAt = lastPostReadAt; } - public LimitedUserGroups memberCount(Integer memberCount) { - + public LimitedUserGroups memberCount(@javax.annotation.Nullable Integer memberCount) { this.memberCount = memberCount; return this; } - /** + /** * Get memberCount * @return memberCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getMemberCount() { return memberCount; } - - public void setMemberCount(Integer memberCount) { + public void setMemberCount(@javax.annotation.Nullable Integer memberCount) { this.memberCount = memberCount; } - public LimitedUserGroups memberVisibility(String memberVisibility) { - + public LimitedUserGroups memberVisibility(@javax.annotation.Nullable String memberVisibility) { this.memberVisibility = memberVisibility; return this; } - /** + /** * Get memberVisibility * @return memberVisibility - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getMemberVisibility() { return memberVisibility; } - - public void setMemberVisibility(String memberVisibility) { + public void setMemberVisibility(@javax.annotation.Nullable String memberVisibility) { this.memberVisibility = memberVisibility; } - public LimitedUserGroups mutualGroup(Boolean mutualGroup) { - + public LimitedUserGroups mutualGroup(@javax.annotation.Nullable Boolean mutualGroup) { this.mutualGroup = mutualGroup; return this; } - /** + /** * Get mutualGroup * @return mutualGroup - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getMutualGroup() { return mutualGroup; } - - public void setMutualGroup(Boolean mutualGroup) { + public void setMutualGroup(@javax.annotation.Nullable Boolean mutualGroup) { this.mutualGroup = mutualGroup; } - public LimitedUserGroups name(String name) { - + public LimitedUserGroups name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public LimitedUserGroups ownerId(String ownerId) { - + public LimitedUserGroups ownerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return ownerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getOwnerId() { return ownerId; } - - public void setOwnerId(String ownerId) { + public void setOwnerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; } - public LimitedUserGroups privacy(String privacy) { - + public LimitedUserGroups privacy(@javax.annotation.Nullable String privacy) { this.privacy = privacy; return this; } - /** + /** * Get privacy * @return privacy - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPrivacy() { return privacy; } - - public void setPrivacy(String privacy) { + public void setPrivacy(@javax.annotation.Nullable String privacy) { this.privacy = privacy; } - public LimitedUserGroups shortCode(String shortCode) { - + public LimitedUserGroups shortCode(@javax.annotation.Nullable String shortCode) { this.shortCode = shortCode; return this; } - /** + /** * Get shortCode * @return shortCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "VRCHAT", value = "") - public String getShortCode() { return shortCode; } - - public void setShortCode(String shortCode) { + public void setShortCode(@javax.annotation.Nullable String shortCode) { this.shortCode = shortCode; } @@ -617,10 +563,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -629,88 +572,71 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bannerId"); - openapiFields.add("bannerUrl"); - openapiFields.add("description"); - openapiFields.add("discriminator"); - openapiFields.add("groupId"); - openapiFields.add("iconId"); - openapiFields.add("iconUrl"); - openapiFields.add("id"); - openapiFields.add("isRepresenting"); - openapiFields.add("lastPostCreatedAt"); - openapiFields.add("lastPostReadAt"); - openapiFields.add("memberCount"); - openapiFields.add("memberVisibility"); - openapiFields.add("mutualGroup"); - openapiFields.add("name"); - openapiFields.add("ownerId"); - openapiFields.add("privacy"); - openapiFields.add("shortCode"); + openapiFields = new HashSet(Arrays.asList("bannerId", "bannerUrl", "description", "discriminator", "groupId", "iconId", "iconUrl", "id", "isRepresenting", "lastPostCreatedAt", "lastPostReadAt", "memberCount", "memberVisibility", "mutualGroup", "name", "ownerId", "privacy", "shortCode")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LimitedUserGroups - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LimitedUserGroups.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LimitedUserGroups is not found in the empty JSON string", LimitedUserGroups.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LimitedUserGroups + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LimitedUserGroups.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LimitedUserGroups is not found in the empty JSON string", LimitedUserGroups.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!LimitedUserGroups.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LimitedUserGroups` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `LimitedUserGroups` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("bannerId") != null && !jsonObj.get("bannerId").isJsonNull()) && !jsonObj.get("bannerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); } if ((jsonObj.get("bannerUrl") != null && !jsonObj.get("bannerUrl").isJsonNull()) && !jsonObj.get("bannerUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bannerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerUrl").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("discriminator") != null && !jsonObj.get("discriminator").isJsonNull()) && !jsonObj.get("discriminator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `discriminator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discriminator").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `discriminator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discriminator").toString())); } if ((jsonObj.get("groupId") != null && !jsonObj.get("groupId").isJsonNull()) && !jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if ((jsonObj.get("iconId") != null && !jsonObj.get("iconId").isJsonNull()) && !jsonObj.get("iconId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); } if ((jsonObj.get("iconUrl") != null && !jsonObj.get("iconUrl").isJsonNull()) && !jsonObj.get("iconUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("memberVisibility") != null && !jsonObj.get("memberVisibility").isJsonNull()) && !jsonObj.get("memberVisibility").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `memberVisibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memberVisibility").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `memberVisibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memberVisibility").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); } if ((jsonObj.get("privacy") != null && !jsonObj.get("privacy").isJsonNull()) && !jsonObj.get("privacy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `privacy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacy").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `privacy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacy").toString())); } if ((jsonObj.get("shortCode") != null && !jsonObj.get("shortCode").isJsonNull()) && !jsonObj.get("shortCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); } } @@ -734,31 +660,31 @@ public void write(JsonWriter out, LimitedUserGroups value) throws IOException { @Override public LimitedUserGroups read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of LimitedUserGroups given an JSON string - * - * @param jsonString JSON string - * @return An instance of LimitedUserGroups - * @throws IOException if the JSON string is invalid with respect to LimitedUserGroups - */ + /** + * Create an instance of LimitedUserGroups given an JSON string + * + * @param jsonString JSON string + * @return An instance of LimitedUserGroups + * @throws IOException if the JSON string is invalid with respect to LimitedUserGroups + */ public static LimitedUserGroups fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, LimitedUserGroups.class); } - /** - * Convert an instance of LimitedUserGroups to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of LimitedUserGroups to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/LimitedUserInstance.java b/src/main/java/io/github/vrchatapi/model/LimitedUserInstance.java index e1db0b6e..a7a8319c 100644 --- a/src/main/java/io/github/vrchatapi/model/LimitedUserInstance.java +++ b/src/main/java/io/github/vrchatapi/model/LimitedUserInstance.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,11 +22,10 @@ import io.github.vrchatapi.model.DeveloperType; import io.github.vrchatapi.model.UserState; import io.github.vrchatapi.model.UserStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -41,13 +39,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -55,214 +55,223 @@ /** * User object received when querying your own instance */ -@ApiModel(description = "User object received when querying your own instance") -@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 LimitedUserInstance { public static final String SERIALIZED_NAME_AGE_VERIFICATION_STATUS = "ageVerificationStatus"; @SerializedName(SERIALIZED_NAME_AGE_VERIFICATION_STATUS) + @javax.annotation.Nonnull private AgeVerificationStatus ageVerificationStatus; public static final String SERIALIZED_NAME_AGE_VERIFIED = "ageVerified"; @SerializedName(SERIALIZED_NAME_AGE_VERIFIED) + @javax.annotation.Nonnull private Boolean ageVerified; public static final String SERIALIZED_NAME_ALLOW_AVATAR_COPYING = "allowAvatarCopying"; @SerializedName(SERIALIZED_NAME_ALLOW_AVATAR_COPYING) + @javax.annotation.Nonnull private Boolean allowAvatarCopying; public static final String SERIALIZED_NAME_BIO = "bio"; @SerializedName(SERIALIZED_NAME_BIO) + @javax.annotation.Nullable private String bio; public static final String SERIALIZED_NAME_BIO_LINKS = "bioLinks"; @SerializedName(SERIALIZED_NAME_BIO_LINKS) - private List bioLinks = null; + @javax.annotation.Nullable + private List bioLinks = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL = "currentAvatarImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL) + @javax.annotation.Nonnull private String currentAvatarImageUrl; public static final String SERIALIZED_NAME_CURRENT_AVATAR_TAGS = "currentAvatarTags"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_TAGS) + @javax.annotation.Nonnull private List currentAvatarTags = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL = "currentAvatarThumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nonnull private String currentAvatarThumbnailImageUrl; public static final String SERIALIZED_NAME_DATE_JOINED = "date_joined"; @SerializedName(SERIALIZED_NAME_DATE_JOINED) + @javax.annotation.Nullable private OffsetDateTime dateJoined; public static final String SERIALIZED_NAME_DEVELOPER_TYPE = "developerType"; @SerializedName(SERIALIZED_NAME_DEVELOPER_TYPE) + @javax.annotation.Nonnull private DeveloperType developerType = DeveloperType.NONE; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_FRIEND_KEY = "friendKey"; @SerializedName(SERIALIZED_NAME_FRIEND_KEY) + @javax.annotation.Nonnull private String friendKey; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_IS_FRIEND = "isFriend"; @SerializedName(SERIALIZED_NAME_IS_FRIEND) + @javax.annotation.Nonnull private Boolean isFriend; public static final String SERIALIZED_NAME_LAST_ACTIVITY = "last_activity"; @SerializedName(SERIALIZED_NAME_LAST_ACTIVITY) + @javax.annotation.Nullable private OffsetDateTime lastActivity; public static final String SERIALIZED_NAME_LAST_MOBILE = "last_mobile"; @SerializedName(SERIALIZED_NAME_LAST_MOBILE) + @javax.annotation.Nullable private OffsetDateTime lastMobile; public static final String SERIALIZED_NAME_LAST_PLATFORM = "last_platform"; @SerializedName(SERIALIZED_NAME_LAST_PLATFORM) + @javax.annotation.Nonnull private String lastPlatform; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nullable private String platform; public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE = "profilePicOverride"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE) + @javax.annotation.Nullable private String profilePicOverride; public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE_THUMBNAIL = "profilePicOverrideThumbnail"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE_THUMBNAIL) + @javax.annotation.Nullable private String profilePicOverrideThumbnail; public static final String SERIALIZED_NAME_PRONOUNS = "pronouns"; @SerializedName(SERIALIZED_NAME_PRONOUNS) + @javax.annotation.Nonnull private String pronouns; public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable private UserState state = UserState.OFFLINE; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private UserStatus status = UserStatus.OFFLINE; public static final String SERIALIZED_NAME_STATUS_DESCRIPTION = "statusDescription"; @SerializedName(SERIALIZED_NAME_STATUS_DESCRIPTION) + @javax.annotation.Nonnull private String statusDescription; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_USER_ICON = "userIcon"; @SerializedName(SERIALIZED_NAME_USER_ICON) + @javax.annotation.Nullable private String userIcon; public LimitedUserInstance() { } - public LimitedUserInstance ageVerificationStatus(AgeVerificationStatus ageVerificationStatus) { - + public LimitedUserInstance ageVerificationStatus(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { this.ageVerificationStatus = ageVerificationStatus; return this; } - /** + /** * Get ageVerificationStatus * @return ageVerificationStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AgeVerificationStatus getAgeVerificationStatus() { return ageVerificationStatus; } - - public void setAgeVerificationStatus(AgeVerificationStatus ageVerificationStatus) { + public void setAgeVerificationStatus(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { this.ageVerificationStatus = ageVerificationStatus; } - public LimitedUserInstance ageVerified(Boolean ageVerified) { - + public LimitedUserInstance ageVerified(@javax.annotation.Nonnull Boolean ageVerified) { this.ageVerified = ageVerified; return this; } - /** + /** * `true` if, user is age verified (not 18+). * @return ageVerified - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "`true` if, user is age verified (not 18+).") - public Boolean getAgeVerified() { return ageVerified; } - - public void setAgeVerified(Boolean ageVerified) { + public void setAgeVerified(@javax.annotation.Nonnull Boolean ageVerified) { this.ageVerified = ageVerified; } - public LimitedUserInstance allowAvatarCopying(Boolean allowAvatarCopying) { - + public LimitedUserInstance allowAvatarCopying(@javax.annotation.Nonnull Boolean allowAvatarCopying) { this.allowAvatarCopying = allowAvatarCopying; return this; } - /** + /** * Get allowAvatarCopying * @return allowAvatarCopying - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getAllowAvatarCopying() { return allowAvatarCopying; } - - public void setAllowAvatarCopying(Boolean allowAvatarCopying) { + public void setAllowAvatarCopying(@javax.annotation.Nonnull Boolean allowAvatarCopying) { this.allowAvatarCopying = allowAvatarCopying; } - public LimitedUserInstance bio(String bio) { - + public LimitedUserInstance bio(@javax.annotation.Nullable String bio) { this.bio = bio; return this; } - /** + /** * Get bio * @return bio - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBio() { return bio; } - - public void setBio(String bio) { + public void setBio(@javax.annotation.Nullable String bio) { this.bio = bio; } - public LimitedUserInstance bioLinks(List bioLinks) { - + public LimitedUserInstance bioLinks(@javax.annotation.Nullable List bioLinks) { this.bioLinks = bioLinks; return this; } @@ -275,535 +284,450 @@ public LimitedUserInstance addBioLinksItem(String bioLinksItem) { return this; } - /** + /** * * @return bioLinks - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getBioLinks() { return bioLinks; } - - public void setBioLinks(List bioLinks) { + public void setBioLinks(@javax.annotation.Nullable List bioLinks) { this.bioLinks = bioLinks; } - public LimitedUserInstance currentAvatarImageUrl(String currentAvatarImageUrl) { - + public LimitedUserInstance currentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/file/file_ae46d521-7281-4b38-b365-804b32a1d6a7/1/file", required = true, value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarImageUrl() { return currentAvatarImageUrl; } - - public void setCurrentAvatarImageUrl(String currentAvatarImageUrl) { + public void setCurrentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; } - public LimitedUserInstance currentAvatarTags(List currentAvatarTags) { - + public LimitedUserInstance currentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; return this; } public LimitedUserInstance addCurrentAvatarTagsItem(String currentAvatarTagsItem) { + if (this.currentAvatarTags == null) { + this.currentAvatarTags = new ArrayList<>(); + } this.currentAvatarTags.add(currentAvatarTagsItem); return this; } - /** + /** * Get currentAvatarTags * @return currentAvatarTags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getCurrentAvatarTags() { return currentAvatarTags; } - - public void setCurrentAvatarTags(List currentAvatarTags) { + public void setCurrentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; } - public LimitedUserInstance currentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { - + public LimitedUserInstance currentAvatarThumbnailImageUrl(@javax.annotation.Nonnull String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarThumbnailImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/image/file_aae83ed9-d42d-4d72-9f4b-9f1e41ed17e1/1/256", required = true, value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarThumbnailImageUrl() { return currentAvatarThumbnailImageUrl; } - - public void setCurrentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nonnull String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; } - public LimitedUserInstance dateJoined(OffsetDateTime dateJoined) { - + public LimitedUserInstance dateJoined(@javax.annotation.Nullable OffsetDateTime dateJoined) { this.dateJoined = dateJoined; return this; } - /** + /** * Get dateJoined * @return dateJoined - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getDateJoined() { return dateJoined; } - - public void setDateJoined(OffsetDateTime dateJoined) { + public void setDateJoined(@javax.annotation.Nullable OffsetDateTime dateJoined) { this.dateJoined = dateJoined; } - public LimitedUserInstance developerType(DeveloperType developerType) { - + public LimitedUserInstance developerType(@javax.annotation.Nonnull DeveloperType developerType) { this.developerType = developerType; return this; } - /** + /** * Get developerType * @return developerType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public DeveloperType getDeveloperType() { return developerType; } - - public void setDeveloperType(DeveloperType developerType) { + public void setDeveloperType(@javax.annotation.Nonnull DeveloperType developerType) { this.developerType = developerType; } - public LimitedUserInstance displayName(String displayName) { - + public LimitedUserInstance displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public LimitedUserInstance friendKey(String friendKey) { - + public LimitedUserInstance friendKey(@javax.annotation.Nonnull String friendKey) { this.friendKey = friendKey; return this; } - /** + /** * Get friendKey * @return friendKey - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getFriendKey() { return friendKey; } - - public void setFriendKey(String friendKey) { + public void setFriendKey(@javax.annotation.Nonnull String friendKey) { this.friendKey = friendKey; } - public LimitedUserInstance id(String id) { - + public LimitedUserInstance id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public LimitedUserInstance imageUrl(String imageUrl) { - + public LimitedUserInstance imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public LimitedUserInstance isFriend(Boolean isFriend) { - + public LimitedUserInstance isFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; return this; } - /** + /** * Get isFriend * @return isFriend - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsFriend() { return isFriend; } - - public void setIsFriend(Boolean isFriend) { + public void setIsFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; } - public LimitedUserInstance lastActivity(OffsetDateTime lastActivity) { - + public LimitedUserInstance lastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { this.lastActivity = lastActivity; return this; } - /** + /** * Get lastActivity * @return lastActivity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getLastActivity() { return lastActivity; } - - public void setLastActivity(OffsetDateTime lastActivity) { + public void setLastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { this.lastActivity = lastActivity; } - public LimitedUserInstance lastMobile(OffsetDateTime lastMobile) { - + public LimitedUserInstance lastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { this.lastMobile = lastMobile; return this; } - /** + /** * Get lastMobile * @return lastMobile - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getLastMobile() { return lastMobile; } - - public void setLastMobile(OffsetDateTime lastMobile) { + public void setLastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { this.lastMobile = lastMobile; } - public LimitedUserInstance lastPlatform(String lastPlatform) { - + public LimitedUserInstance lastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return lastPlatform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows", required = true, value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getLastPlatform() { return lastPlatform; } - - public void setLastPlatform(String lastPlatform) { + public void setLastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; } - public LimitedUserInstance platform(String platform) { - + public LimitedUserInstance platform(@javax.annotation.Nullable String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "standalonewindows", value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nullable String platform) { this.platform = platform; } - public LimitedUserInstance profilePicOverride(String profilePicOverride) { - + public LimitedUserInstance profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; return this; } - /** + /** * Get profilePicOverride * @return profilePicOverride - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProfilePicOverride() { return profilePicOverride; } - - public void setProfilePicOverride(String profilePicOverride) { + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; } - public LimitedUserInstance profilePicOverrideThumbnail(String profilePicOverrideThumbnail) { - + public LimitedUserInstance profilePicOverrideThumbnail(@javax.annotation.Nullable String profilePicOverrideThumbnail) { this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; return this; } - /** + /** * Get profilePicOverrideThumbnail * @return profilePicOverrideThumbnail - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProfilePicOverrideThumbnail() { return profilePicOverrideThumbnail; } - - public void setProfilePicOverrideThumbnail(String profilePicOverrideThumbnail) { + public void setProfilePicOverrideThumbnail(@javax.annotation.Nullable String profilePicOverrideThumbnail) { this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; } - public LimitedUserInstance pronouns(String pronouns) { - + public LimitedUserInstance pronouns(@javax.annotation.Nonnull String pronouns) { this.pronouns = pronouns; return this; } - /** + /** * Get pronouns * @return pronouns - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getPronouns() { return pronouns; } - - public void setPronouns(String pronouns) { + public void setPronouns(@javax.annotation.Nonnull String pronouns) { this.pronouns = pronouns; } - public LimitedUserInstance state(UserState state) { - + public LimitedUserInstance state(@javax.annotation.Nullable UserState state) { this.state = state; return this; } - /** + /** * Get state * @return state - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UserState getState() { return state; } - - public void setState(UserState state) { + public void setState(@javax.annotation.Nullable UserState state) { this.state = state; } - public LimitedUserInstance status(UserStatus status) { - + public LimitedUserInstance status(@javax.annotation.Nonnull UserStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public UserStatus getStatus() { return status; } - - public void setStatus(UserStatus status) { + public void setStatus(@javax.annotation.Nonnull UserStatus status) { this.status = status; } - public LimitedUserInstance statusDescription(String statusDescription) { - + public LimitedUserInstance statusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; return this; } - /** + /** * Get statusDescription * @return statusDescription - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getStatusDescription() { return statusDescription; } - - public void setStatusDescription(String statusDescription) { + public void setStatusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; } - public LimitedUserInstance tags(List tags) { - + public LimitedUserInstance tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public LimitedUserInstance addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public LimitedUserInstance userIcon(String userIcon) { - + public LimitedUserInstance userIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; return this; } - /** + /** * Get userIcon * @return userIcon - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUserIcon() { return userIcon; } - - public void setUserIcon(String userIcon) { + public void setUserIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; } @@ -903,10 +827,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -915,141 +836,107 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ageVerificationStatus"); - openapiFields.add("ageVerified"); - openapiFields.add("allowAvatarCopying"); - openapiFields.add("bio"); - openapiFields.add("bioLinks"); - openapiFields.add("currentAvatarImageUrl"); - openapiFields.add("currentAvatarTags"); - openapiFields.add("currentAvatarThumbnailImageUrl"); - openapiFields.add("date_joined"); - openapiFields.add("developerType"); - openapiFields.add("displayName"); - openapiFields.add("friendKey"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("isFriend"); - openapiFields.add("last_activity"); - openapiFields.add("last_mobile"); - openapiFields.add("last_platform"); - openapiFields.add("platform"); - openapiFields.add("profilePicOverride"); - openapiFields.add("profilePicOverrideThumbnail"); - openapiFields.add("pronouns"); - openapiFields.add("state"); - openapiFields.add("status"); - openapiFields.add("statusDescription"); - openapiFields.add("tags"); - openapiFields.add("userIcon"); + openapiFields = new HashSet(Arrays.asList("ageVerificationStatus", "ageVerified", "allowAvatarCopying", "bio", "bioLinks", "currentAvatarImageUrl", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "date_joined", "developerType", "displayName", "friendKey", "id", "imageUrl", "isFriend", "last_activity", "last_mobile", "last_platform", "platform", "profilePicOverride", "profilePicOverrideThumbnail", "pronouns", "state", "status", "statusDescription", "tags", "userIcon")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ageVerificationStatus"); - openapiRequiredFields.add("ageVerified"); - openapiRequiredFields.add("allowAvatarCopying"); - openapiRequiredFields.add("currentAvatarImageUrl"); - openapiRequiredFields.add("currentAvatarTags"); - openapiRequiredFields.add("currentAvatarThumbnailImageUrl"); - openapiRequiredFields.add("date_joined"); - openapiRequiredFields.add("developerType"); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("friendKey"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("isFriend"); - openapiRequiredFields.add("last_activity"); - openapiRequiredFields.add("last_platform"); - openapiRequiredFields.add("pronouns"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("statusDescription"); - openapiRequiredFields.add("tags"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LimitedUserInstance - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LimitedUserInstance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LimitedUserInstance is not found in the empty JSON string", LimitedUserInstance.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("ageVerificationStatus", "ageVerified", "allowAvatarCopying", "currentAvatarImageUrl", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "date_joined", "developerType", "displayName", "friendKey", "id", "isFriend", "last_activity", "last_platform", "pronouns", "status", "statusDescription", "tags")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LimitedUserInstance + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LimitedUserInstance.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LimitedUserInstance is not found in the empty JSON string", LimitedUserInstance.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!LimitedUserInstance.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LimitedUserInstance` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `LimitedUserInstance` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : LimitedUserInstance.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `ageVerificationStatus` + AgeVerificationStatus.validateJsonElement(jsonObj.get("ageVerificationStatus")); if ((jsonObj.get("bio") != null && !jsonObj.get("bio").isJsonNull()) && !jsonObj.get("bio").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("bioLinks") != null && !jsonObj.get("bioLinks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); + if (jsonObj.get("bioLinks") != null && !jsonObj.get("bioLinks").isJsonNull() && !jsonObj.get("bioLinks").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); } if (!jsonObj.get("currentAvatarImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); } // ensure the required json array is present if (jsonObj.get("currentAvatarTags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("currentAvatarTags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); } if (!jsonObj.get("currentAvatarThumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); } + // validate the required field `developerType` + DeveloperType.validateJsonElement(jsonObj.get("developerType")); if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if (!jsonObj.get("friendKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `friendKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friendKey").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `friendKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friendKey").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("last_platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_platform").toString())); } if ((jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) && !jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if ((jsonObj.get("profilePicOverride") != null && !jsonObj.get("profilePicOverride").isJsonNull()) && !jsonObj.get("profilePicOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); } if ((jsonObj.get("profilePicOverrideThumbnail") != null && !jsonObj.get("profilePicOverrideThumbnail").isJsonNull()) && !jsonObj.get("profilePicOverrideThumbnail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverrideThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverrideThumbnail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverrideThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverrideThumbnail").toString())); } if (!jsonObj.get("pronouns").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `pronouns` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronouns").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pronouns` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronouns").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + UserState.validateJsonElement(jsonObj.get("state")); } + // validate the required field `status` + UserStatus.validateJsonElement(jsonObj.get("status")); if (!jsonObj.get("statusDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("userIcon") != null && !jsonObj.get("userIcon").isJsonNull()) && !jsonObj.get("userIcon").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); } } @@ -1073,31 +960,31 @@ public void write(JsonWriter out, LimitedUserInstance value) throws IOException @Override public LimitedUserInstance read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of LimitedUserInstance given an JSON string - * - * @param jsonString JSON string - * @return An instance of LimitedUserInstance - * @throws IOException if the JSON string is invalid with respect to LimitedUserInstance - */ + /** + * Create an instance of LimitedUserInstance given an JSON string + * + * @param jsonString JSON string + * @return An instance of LimitedUserInstance + * @throws IOException if the JSON string is invalid with respect to LimitedUserInstance + */ public static LimitedUserInstance fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, LimitedUserInstance.class); } - /** - * Convert an instance of LimitedUserInstance to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of LimitedUserInstance to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/LimitedUserSearch.java b/src/main/java/io/github/vrchatapi/model/LimitedUserSearch.java index 2cd96cf1..18d78d18 100644 --- a/src/main/java/io/github/vrchatapi/model/LimitedUserSearch.java +++ b/src/main/java/io/github/vrchatapi/model/LimitedUserSearch.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,10 +20,9 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.DeveloperType; import io.github.vrchatapi.model.UserStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,101 +51,203 @@ /** * User object received when searching */ -@ApiModel(description = "User object received when searching") -@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 LimitedUserSearch { + public static final String SERIALIZED_NAME_BANNER_COLOR = "bannerColor"; + @SerializedName(SERIALIZED_NAME_BANNER_COLOR) + @javax.annotation.Nullable + private String bannerColor; + + public static final String SERIALIZED_NAME_BANNER_TYPE = "bannerType"; + @SerializedName(SERIALIZED_NAME_BANNER_TYPE) + @javax.annotation.Nullable + private String bannerType; + + public static final String SERIALIZED_NAME_BANNER_URL = "bannerUrl"; + @SerializedName(SERIALIZED_NAME_BANNER_URL) + @javax.annotation.Nullable + private String bannerUrl; + public static final String SERIALIZED_NAME_BIO = "bio"; @SerializedName(SERIALIZED_NAME_BIO) + @javax.annotation.Nullable private String bio; public static final String SERIALIZED_NAME_BIO_LINKS = "bioLinks"; @SerializedName(SERIALIZED_NAME_BIO_LINKS) - private List bioLinks = null; + @javax.annotation.Nullable + private List bioLinks = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL = "currentAvatarImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL) + @javax.annotation.Nonnull private String currentAvatarImageUrl; public static final String SERIALIZED_NAME_CURRENT_AVATAR_TAGS = "currentAvatarTags"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_TAGS) + @javax.annotation.Nonnull private List currentAvatarTags = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL = "currentAvatarThumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nonnull private String currentAvatarThumbnailImageUrl; public static final String SERIALIZED_NAME_DEVELOPER_TYPE = "developerType"; @SerializedName(SERIALIZED_NAME_DEVELOPER_TYPE) + @javax.annotation.Nonnull private DeveloperType developerType = DeveloperType.NONE; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; + public static final String SERIALIZED_NAME_ICON_FRAME = "iconFrame"; + @SerializedName(SERIALIZED_NAME_ICON_FRAME) + @javax.annotation.Nullable + private String iconFrame; + + public static final String SERIALIZED_NAME_ICON_URL = "iconUrl"; + @SerializedName(SERIALIZED_NAME_ICON_URL) + @javax.annotation.Nullable + private String iconUrl; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IS_FRIEND = "isFriend"; @SerializedName(SERIALIZED_NAME_IS_FRIEND) + @javax.annotation.Nonnull private Boolean isFriend; public static final String SERIALIZED_NAME_LAST_PLATFORM = "last_platform"; @SerializedName(SERIALIZED_NAME_LAST_PLATFORM) + @javax.annotation.Nonnull private String lastPlatform; + public static final String SERIALIZED_NAME_NAMEPLATE_EFFECT = "nameplateEffect"; + @SerializedName(SERIALIZED_NAME_NAMEPLATE_EFFECT) + @javax.annotation.Nullable + private String nameplateEffect; + + public static final String SERIALIZED_NAME_PROFILE_EFFECT = "profileEffect"; + @SerializedName(SERIALIZED_NAME_PROFILE_EFFECT) + @javax.annotation.Nullable + private String profileEffect; + public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE = "profilePicOverride"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE) + @javax.annotation.Nullable private String profilePicOverride; public static final String SERIALIZED_NAME_PRONOUNS = "pronouns"; @SerializedName(SERIALIZED_NAME_PRONOUNS) + @javax.annotation.Nullable private String pronouns; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private UserStatus status = UserStatus.OFFLINE; public static final String SERIALIZED_NAME_STATUS_DESCRIPTION = "statusDescription"; @SerializedName(SERIALIZED_NAME_STATUS_DESCRIPTION) + @javax.annotation.Nonnull private String statusDescription; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_USER_ICON = "userIcon"; @SerializedName(SERIALIZED_NAME_USER_ICON) + @javax.annotation.Nullable private String userIcon; public LimitedUserSearch() { } - public LimitedUserSearch bio(String bio) { - + public LimitedUserSearch bannerColor(@javax.annotation.Nullable String bannerColor) { + this.bannerColor = bannerColor; + return this; + } + + /** + * Get bannerColor + * @return bannerColor + */ + @javax.annotation.Nullable + public String getBannerColor() { + return bannerColor; + } + + public void setBannerColor(@javax.annotation.Nullable String bannerColor) { + this.bannerColor = bannerColor; + } + + + public LimitedUserSearch bannerType(@javax.annotation.Nullable String bannerType) { + this.bannerType = bannerType; + return this; + } + + /** + * Get bannerType + * @return bannerType + */ + @javax.annotation.Nullable + public String getBannerType() { + return bannerType; + } + + public void setBannerType(@javax.annotation.Nullable String bannerType) { + this.bannerType = bannerType; + } + + + public LimitedUserSearch bannerUrl(@javax.annotation.Nullable String bannerUrl) { + this.bannerUrl = bannerUrl; + return this; + } + + /** + * Get bannerUrl + * @return bannerUrl + */ + @javax.annotation.Nullable + public String getBannerUrl() { + return bannerUrl; + } + + public void setBannerUrl(@javax.annotation.Nullable String bannerUrl) { + this.bannerUrl = bannerUrl; + } + + + public LimitedUserSearch bio(@javax.annotation.Nullable String bio) { this.bio = bio; return this; } - /** + /** * Get bio * @return bio - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBio() { return bio; } - - public void setBio(String bio) { + public void setBio(@javax.annotation.Nullable String bio) { this.bio = bio; } - public LimitedUserSearch bioLinks(List bioLinks) { - + public LimitedUserSearch bioLinks(@javax.annotation.Nullable List bioLinks) { this.bioLinks = bioLinks; return this; } @@ -158,351 +260,374 @@ public LimitedUserSearch addBioLinksItem(String bioLinksItem) { return this; } - /** + /** * * @return bioLinks - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getBioLinks() { return bioLinks; } - - public void setBioLinks(List bioLinks) { + public void setBioLinks(@javax.annotation.Nullable List bioLinks) { this.bioLinks = bioLinks; } - public LimitedUserSearch currentAvatarImageUrl(String currentAvatarImageUrl) { - + public LimitedUserSearch currentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/file/file_ae46d521-7281-4b38-b365-804b32a1d6a7/1/file", required = true, value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarImageUrl() { return currentAvatarImageUrl; } - - public void setCurrentAvatarImageUrl(String currentAvatarImageUrl) { + public void setCurrentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; } - public LimitedUserSearch currentAvatarTags(List currentAvatarTags) { - + public LimitedUserSearch currentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; return this; } public LimitedUserSearch addCurrentAvatarTagsItem(String currentAvatarTagsItem) { + if (this.currentAvatarTags == null) { + this.currentAvatarTags = new ArrayList<>(); + } this.currentAvatarTags.add(currentAvatarTagsItem); return this; } - /** + /** * Get currentAvatarTags * @return currentAvatarTags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getCurrentAvatarTags() { return currentAvatarTags; } - - public void setCurrentAvatarTags(List currentAvatarTags) { + public void setCurrentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; } - public LimitedUserSearch currentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { - + public LimitedUserSearch currentAvatarThumbnailImageUrl(@javax.annotation.Nonnull String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarThumbnailImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/image/file_aae83ed9-d42d-4d72-9f4b-9f1e41ed17e1/1/256", required = true, value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarThumbnailImageUrl() { return currentAvatarThumbnailImageUrl; } - - public void setCurrentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nonnull String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; } - public LimitedUserSearch developerType(DeveloperType developerType) { - + public LimitedUserSearch developerType(@javax.annotation.Nonnull DeveloperType developerType) { this.developerType = developerType; return this; } - /** + /** * Get developerType * @return developerType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public DeveloperType getDeveloperType() { return developerType; } - - public void setDeveloperType(DeveloperType developerType) { + public void setDeveloperType(@javax.annotation.Nonnull DeveloperType developerType) { this.developerType = developerType; } - public LimitedUserSearch displayName(String displayName) { - + public LimitedUserSearch displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public LimitedUserSearch id(String id) { - + public LimitedUserSearch iconFrame(@javax.annotation.Nullable String iconFrame) { + this.iconFrame = iconFrame; + return this; + } + + /** + * Get iconFrame + * @return iconFrame + */ + @javax.annotation.Nullable + public String getIconFrame() { + return iconFrame; + } + + public void setIconFrame(@javax.annotation.Nullable String iconFrame) { + this.iconFrame = iconFrame; + } + + + public LimitedUserSearch iconUrl(@javax.annotation.Nullable String iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + * Get iconUrl + * @return iconUrl + */ + @javax.annotation.Nullable + public String getIconUrl() { + return iconUrl; + } + + public void setIconUrl(@javax.annotation.Nullable String iconUrl) { + this.iconUrl = iconUrl; + } + + + public LimitedUserSearch id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public LimitedUserSearch isFriend(Boolean isFriend) { - + public LimitedUserSearch isFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; return this; } - /** + /** * Get isFriend * @return isFriend - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsFriend() { return isFriend; } - - public void setIsFriend(Boolean isFriend) { + public void setIsFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; } - public LimitedUserSearch lastPlatform(String lastPlatform) { - + public LimitedUserSearch lastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return lastPlatform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows", required = true, value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getLastPlatform() { return lastPlatform; } - - public void setLastPlatform(String lastPlatform) { + public void setLastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; } - public LimitedUserSearch profilePicOverride(String profilePicOverride) { - + public LimitedUserSearch nameplateEffect(@javax.annotation.Nullable String nameplateEffect) { + this.nameplateEffect = nameplateEffect; + return this; + } + + /** + * Get nameplateEffect + * @return nameplateEffect + */ + @javax.annotation.Nullable + public String getNameplateEffect() { + return nameplateEffect; + } + + public void setNameplateEffect(@javax.annotation.Nullable String nameplateEffect) { + this.nameplateEffect = nameplateEffect; + } + + + public LimitedUserSearch profileEffect(@javax.annotation.Nullable String profileEffect) { + this.profileEffect = profileEffect; + return this; + } + + /** + * Get profileEffect + * @return profileEffect + */ + @javax.annotation.Nullable + public String getProfileEffect() { + return profileEffect; + } + + public void setProfileEffect(@javax.annotation.Nullable String profileEffect) { + this.profileEffect = profileEffect; + } + + + public LimitedUserSearch profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; return this; } - /** + /** * Get profilePicOverride * @return profilePicOverride - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProfilePicOverride() { return profilePicOverride; } - - public void setProfilePicOverride(String profilePicOverride) { + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; } - public LimitedUserSearch pronouns(String pronouns) { - + public LimitedUserSearch pronouns(@javax.annotation.Nullable String pronouns) { this.pronouns = pronouns; return this; } - /** + /** * Get pronouns * @return pronouns - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPronouns() { return pronouns; } - - public void setPronouns(String pronouns) { + public void setPronouns(@javax.annotation.Nullable String pronouns) { this.pronouns = pronouns; } - public LimitedUserSearch status(UserStatus status) { - + public LimitedUserSearch status(@javax.annotation.Nonnull UserStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public UserStatus getStatus() { return status; } - - public void setStatus(UserStatus status) { + public void setStatus(@javax.annotation.Nonnull UserStatus status) { this.status = status; } - public LimitedUserSearch statusDescription(String statusDescription) { - + public LimitedUserSearch statusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; return this; } - /** + /** * Get statusDescription * @return statusDescription - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getStatusDescription() { return statusDescription; } - - public void setStatusDescription(String statusDescription) { + public void setStatusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; } - public LimitedUserSearch tags(List tags) { - + public LimitedUserSearch tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public LimitedUserSearch addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * <- Always empty. * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "<- Always empty.") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public LimitedUserSearch userIcon(String userIcon) { - + public LimitedUserSearch userIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; return this; } - /** + /** * Get userIcon * @return userIcon - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUserIcon() { return userIcon; } - - public void setUserIcon(String userIcon) { + public void setUserIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; } @@ -517,16 +642,23 @@ public boolean equals(Object o) { return false; } LimitedUserSearch limitedUserSearch = (LimitedUserSearch) o; - return Objects.equals(this.bio, limitedUserSearch.bio) && + return Objects.equals(this.bannerColor, limitedUserSearch.bannerColor) && + Objects.equals(this.bannerType, limitedUserSearch.bannerType) && + Objects.equals(this.bannerUrl, limitedUserSearch.bannerUrl) && + Objects.equals(this.bio, limitedUserSearch.bio) && Objects.equals(this.bioLinks, limitedUserSearch.bioLinks) && Objects.equals(this.currentAvatarImageUrl, limitedUserSearch.currentAvatarImageUrl) && Objects.equals(this.currentAvatarTags, limitedUserSearch.currentAvatarTags) && Objects.equals(this.currentAvatarThumbnailImageUrl, limitedUserSearch.currentAvatarThumbnailImageUrl) && Objects.equals(this.developerType, limitedUserSearch.developerType) && Objects.equals(this.displayName, limitedUserSearch.displayName) && + Objects.equals(this.iconFrame, limitedUserSearch.iconFrame) && + Objects.equals(this.iconUrl, limitedUserSearch.iconUrl) && Objects.equals(this.id, limitedUserSearch.id) && Objects.equals(this.isFriend, limitedUserSearch.isFriend) && Objects.equals(this.lastPlatform, limitedUserSearch.lastPlatform) && + Objects.equals(this.nameplateEffect, limitedUserSearch.nameplateEffect) && + Objects.equals(this.profileEffect, limitedUserSearch.profileEffect) && Objects.equals(this.profilePicOverride, limitedUserSearch.profilePicOverride) && Objects.equals(this.pronouns, limitedUserSearch.pronouns) && Objects.equals(this.status, limitedUserSearch.status) && @@ -537,13 +669,16 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(bio, bioLinks, currentAvatarImageUrl, currentAvatarTags, currentAvatarThumbnailImageUrl, developerType, displayName, id, isFriend, lastPlatform, profilePicOverride, pronouns, status, statusDescription, tags, userIcon); + return Objects.hash(bannerColor, bannerType, bannerUrl, bio, bioLinks, currentAvatarImageUrl, currentAvatarTags, currentAvatarThumbnailImageUrl, developerType, displayName, iconFrame, iconUrl, id, isFriend, lastPlatform, nameplateEffect, profileEffect, profilePicOverride, pronouns, status, statusDescription, tags, userIcon); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LimitedUserSearch {\n"); + sb.append(" bannerColor: ").append(toIndentedString(bannerColor)).append("\n"); + sb.append(" bannerType: ").append(toIndentedString(bannerType)).append("\n"); + sb.append(" bannerUrl: ").append(toIndentedString(bannerUrl)).append("\n"); sb.append(" bio: ").append(toIndentedString(bio)).append("\n"); sb.append(" bioLinks: ").append(toIndentedString(bioLinks)).append("\n"); sb.append(" currentAvatarImageUrl: ").append(toIndentedString(currentAvatarImageUrl)).append("\n"); @@ -551,9 +686,13 @@ public String toString() { sb.append(" currentAvatarThumbnailImageUrl: ").append(toIndentedString(currentAvatarThumbnailImageUrl)).append("\n"); sb.append(" developerType: ").append(toIndentedString(developerType)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" iconFrame: ").append(toIndentedString(iconFrame)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" isFriend: ").append(toIndentedString(isFriend)).append("\n"); sb.append(" lastPlatform: ").append(toIndentedString(lastPlatform)).append("\n"); + sb.append(" nameplateEffect: ").append(toIndentedString(nameplateEffect)).append("\n"); + sb.append(" profileEffect: ").append(toIndentedString(profileEffect)).append("\n"); sb.append(" profilePicOverride: ").append(toIndentedString(profilePicOverride)).append("\n"); sb.append(" pronouns: ").append(toIndentedString(pronouns)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); @@ -569,10 +708,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -581,111 +717,110 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bio"); - openapiFields.add("bioLinks"); - openapiFields.add("currentAvatarImageUrl"); - openapiFields.add("currentAvatarTags"); - openapiFields.add("currentAvatarThumbnailImageUrl"); - openapiFields.add("developerType"); - openapiFields.add("displayName"); - openapiFields.add("id"); - openapiFields.add("isFriend"); - openapiFields.add("last_platform"); - openapiFields.add("profilePicOverride"); - openapiFields.add("pronouns"); - openapiFields.add("status"); - openapiFields.add("statusDescription"); - openapiFields.add("tags"); - openapiFields.add("userIcon"); + openapiFields = new HashSet(Arrays.asList("bannerColor", "bannerType", "bannerUrl", "bio", "bioLinks", "currentAvatarImageUrl", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "developerType", "displayName", "iconFrame", "iconUrl", "id", "isFriend", "last_platform", "nameplateEffect", "profileEffect", "profilePicOverride", "pronouns", "status", "statusDescription", "tags", "userIcon")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("currentAvatarImageUrl"); - openapiRequiredFields.add("currentAvatarTags"); - openapiRequiredFields.add("currentAvatarThumbnailImageUrl"); - openapiRequiredFields.add("developerType"); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("isFriend"); - openapiRequiredFields.add("last_platform"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("statusDescription"); - openapiRequiredFields.add("tags"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LimitedUserSearch - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LimitedUserSearch.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LimitedUserSearch is not found in the empty JSON string", LimitedUserSearch.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("currentAvatarImageUrl", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "developerType", "displayName", "id", "isFriend", "last_platform", "status", "statusDescription", "tags")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LimitedUserSearch + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LimitedUserSearch.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LimitedUserSearch is not found in the empty JSON string", LimitedUserSearch.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!LimitedUserSearch.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LimitedUserSearch` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `LimitedUserSearch` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : LimitedUserSearch.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("bannerColor") != null && !jsonObj.get("bannerColor").isJsonNull()) && !jsonObj.get("bannerColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerColor").toString())); + } + if ((jsonObj.get("bannerType") != null && !jsonObj.get("bannerType").isJsonNull()) && !jsonObj.get("bannerType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerType").toString())); + } + if ((jsonObj.get("bannerUrl") != null && !jsonObj.get("bannerUrl").isJsonNull()) && !jsonObj.get("bannerUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerUrl").toString())); } if ((jsonObj.get("bio") != null && !jsonObj.get("bio").isJsonNull()) && !jsonObj.get("bio").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("bioLinks") != null && !jsonObj.get("bioLinks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); + if (jsonObj.get("bioLinks") != null && !jsonObj.get("bioLinks").isJsonNull() && !jsonObj.get("bioLinks").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); } if (!jsonObj.get("currentAvatarImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); } // ensure the required json array is present if (jsonObj.get("currentAvatarTags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("currentAvatarTags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); } if (!jsonObj.get("currentAvatarThumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); } + // validate the required field `developerType` + DeveloperType.validateJsonElement(jsonObj.get("developerType")); if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + } + if ((jsonObj.get("iconFrame") != null && !jsonObj.get("iconFrame").isJsonNull()) && !jsonObj.get("iconFrame").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconFrame` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconFrame").toString())); + } + if ((jsonObj.get("iconUrl") != null && !jsonObj.get("iconUrl").isJsonNull()) && !jsonObj.get("iconUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("last_platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_platform").toString())); + } + if ((jsonObj.get("nameplateEffect") != null && !jsonObj.get("nameplateEffect").isJsonNull()) && !jsonObj.get("nameplateEffect").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `nameplateEffect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nameplateEffect").toString())); + } + if ((jsonObj.get("profileEffect") != null && !jsonObj.get("profileEffect").isJsonNull()) && !jsonObj.get("profileEffect").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profileEffect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profileEffect").toString())); } if ((jsonObj.get("profilePicOverride") != null && !jsonObj.get("profilePicOverride").isJsonNull()) && !jsonObj.get("profilePicOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); } if ((jsonObj.get("pronouns") != null && !jsonObj.get("pronouns").isJsonNull()) && !jsonObj.get("pronouns").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `pronouns` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronouns").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pronouns` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronouns").toString())); } + // validate the required field `status` + UserStatus.validateJsonElement(jsonObj.get("status")); if (!jsonObj.get("statusDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("userIcon") != null && !jsonObj.get("userIcon").isJsonNull()) && !jsonObj.get("userIcon").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); } } @@ -709,31 +844,31 @@ public void write(JsonWriter out, LimitedUserSearch value) throws IOException { @Override public LimitedUserSearch read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of LimitedUserSearch given an JSON string - * - * @param jsonString JSON string - * @return An instance of LimitedUserSearch - * @throws IOException if the JSON string is invalid with respect to LimitedUserSearch - */ + /** + * Create an instance of LimitedUserSearch given an JSON string + * + * @param jsonString JSON string + * @return An instance of LimitedUserSearch + * @throws IOException if the JSON string is invalid with respect to LimitedUserSearch + */ public static LimitedUserSearch fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, LimitedUserSearch.class); } - /** - * Convert an instance of LimitedUserSearch to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of LimitedUserSearch to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/LimitedWorld.java b/src/main/java/io/github/vrchatapi/model/LimitedWorld.java index f1549db7..fe646e54 100644 --- a/src/main/java/io/github/vrchatapi/model/LimitedWorld.java +++ b/src/main/java/io/github/vrchatapi/model/LimitedWorld.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,11 +21,10 @@ import io.github.vrchatapi.model.InstanceContentSettings; import io.github.vrchatapi.model.LimitedUnityPackage; import io.github.vrchatapi.model.ReleaseStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -40,13 +38,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -54,606 +54,548 @@ /** * */ -@ApiModel(description = "") -@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 LimitedWorld { public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nonnull private String authorId; public static final String SERIALIZED_NAME_AUTHOR_NAME = "authorName"; @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nonnull private String authorName; public static final String SERIALIZED_NAME_CAPACITY = "capacity"; @SerializedName(SERIALIZED_NAME_CAPACITY) + @javax.annotation.Nonnull private Integer capacity; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DEFAULT_CONTENT_SETTINGS = "defaultContentSettings"; @SerializedName(SERIALIZED_NAME_DEFAULT_CONTENT_SETTINGS) + @javax.annotation.Nullable private InstanceContentSettings defaultContentSettings; public static final String SERIALIZED_NAME_FAVORITES = "favorites"; @SerializedName(SERIALIZED_NAME_FAVORITES) + @javax.annotation.Nonnull private Integer favorites = 0; public static final String SERIALIZED_NAME_HEAT = "heat"; @SerializedName(SERIALIZED_NAME_HEAT) + @javax.annotation.Nonnull private Integer heat = 0; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_LABS_PUBLICATION_DATE = "labsPublicationDate"; @SerializedName(SERIALIZED_NAME_LABS_PUBLICATION_DATE) + @javax.annotation.Nonnull private String labsPublicationDate; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_OCCUPANTS = "occupants"; @SerializedName(SERIALIZED_NAME_OCCUPANTS) + @javax.annotation.Nonnull private Integer occupants = 0; public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; @SerializedName(SERIALIZED_NAME_ORGANIZATION) + @javax.annotation.Nonnull private String organization = "vrchat"; public static final String SERIALIZED_NAME_POPULARITY = "popularity"; @SerializedName(SERIALIZED_NAME_POPULARITY) + @javax.annotation.Nonnull private Integer popularity = 0; public static final String SERIALIZED_NAME_PREVIEW_YOUTUBE_ID = "previewYoutubeId"; @SerializedName(SERIALIZED_NAME_PREVIEW_YOUTUBE_ID) + @javax.annotation.Nullable private String previewYoutubeId; public static final String SERIALIZED_NAME_PUBLICATION_DATE = "publicationDate"; @SerializedName(SERIALIZED_NAME_PUBLICATION_DATE) + @javax.annotation.Nonnull private String publicationDate; public static final String SERIALIZED_NAME_RECOMMENDED_CAPACITY = "recommendedCapacity"; @SerializedName(SERIALIZED_NAME_RECOMMENDED_CAPACITY) + @javax.annotation.Nullable private Integer recommendedCapacity; public static final String SERIALIZED_NAME_RELEASE_STATUS = "releaseStatus"; @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) + @javax.annotation.Nonnull private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; public static final String SERIALIZED_NAME_STORE_ID = "storeId"; @SerializedName(SERIALIZED_NAME_STORE_ID) + @javax.annotation.Nullable private String storeId; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_THUMBNAIL_IMAGE_URL = "thumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nonnull private String thumbnailImageUrl; public static final String SERIALIZED_NAME_UDON_PRODUCTS = "udonProducts"; @SerializedName(SERIALIZED_NAME_UDON_PRODUCTS) - private List udonProducts = null; + @javax.annotation.Nullable + private List udonProducts = new ArrayList<>(); public static final String SERIALIZED_NAME_UNITY_PACKAGES = "unityPackages"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGES) + @javax.annotation.Nonnull private List unityPackages = new ArrayList<>(); public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_VISITS = "visits"; @SerializedName(SERIALIZED_NAME_VISITS) + @javax.annotation.Nullable private Integer visits = 0; public LimitedWorld() { } - public LimitedWorld authorId(String authorId) { - + public LimitedWorld authorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; } - public LimitedWorld authorName(String authorName) { - + public LimitedWorld authorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; return this; } - /** + /** * Get authorName * @return authorName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAuthorName() { return authorName; } - - public void setAuthorName(String authorName) { + public void setAuthorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; } - public LimitedWorld capacity(Integer capacity) { - + public LimitedWorld capacity(@javax.annotation.Nonnull Integer capacity) { this.capacity = capacity; return this; } - /** + /** * Get capacity * @return capacity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "8", required = true, value = "") - public Integer getCapacity() { return capacity; } - - public void setCapacity(Integer capacity) { + public void setCapacity(@javax.annotation.Nonnull Integer capacity) { this.capacity = capacity; } - public LimitedWorld createdAt(OffsetDateTime createdAt) { - + public LimitedWorld createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public LimitedWorld defaultContentSettings(InstanceContentSettings defaultContentSettings) { - + public LimitedWorld defaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { this.defaultContentSettings = defaultContentSettings; return this; } - /** + /** * Get defaultContentSettings * @return defaultContentSettings - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InstanceContentSettings getDefaultContentSettings() { return defaultContentSettings; } - - public void setDefaultContentSettings(InstanceContentSettings defaultContentSettings) { + public void setDefaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { this.defaultContentSettings = defaultContentSettings; } - public LimitedWorld favorites(Integer favorites) { - + public LimitedWorld favorites(@javax.annotation.Nonnull Integer favorites) { this.favorites = favorites; return this; } - /** + /** * Get favorites * minimum: 0 * @return favorites - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "12024", required = true, value = "") - public Integer getFavorites() { return favorites; } - - public void setFavorites(Integer favorites) { + public void setFavorites(@javax.annotation.Nonnull Integer favorites) { this.favorites = favorites; } - public LimitedWorld heat(Integer heat) { - + public LimitedWorld heat(@javax.annotation.Nonnull Integer heat) { this.heat = heat; return this; } - /** + /** * Get heat * minimum: 0 * @return heat - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "5", required = true, value = "") - public Integer getHeat() { return heat; } - - public void setHeat(Integer heat) { + public void setHeat(@javax.annotation.Nonnull Integer heat) { this.heat = heat; } - public LimitedWorld id(String id) { - + public LimitedWorld id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public LimitedWorld imageUrl(String imageUrl) { - + public LimitedWorld imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public LimitedWorld labsPublicationDate(String labsPublicationDate) { - + public LimitedWorld labsPublicationDate(@javax.annotation.Nonnull String labsPublicationDate) { this.labsPublicationDate = labsPublicationDate; return this; } - /** + /** * Get labsPublicationDate * @return labsPublicationDate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "none", required = true, value = "") - public String getLabsPublicationDate() { return labsPublicationDate; } - - public void setLabsPublicationDate(String labsPublicationDate) { + public void setLabsPublicationDate(@javax.annotation.Nonnull String labsPublicationDate) { this.labsPublicationDate = labsPublicationDate; } - public LimitedWorld name(String name) { - + public LimitedWorld name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public LimitedWorld occupants(Integer occupants) { - + public LimitedWorld occupants(@javax.annotation.Nonnull Integer occupants) { this.occupants = occupants; return this; } - /** + /** * Get occupants * minimum: 0 * @return occupants - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "47", required = true, value = "") - public Integer getOccupants() { return occupants; } - - public void setOccupants(Integer occupants) { + public void setOccupants(@javax.annotation.Nonnull Integer occupants) { this.occupants = occupants; } - public LimitedWorld organization(String organization) { - + public LimitedWorld organization(@javax.annotation.Nonnull String organization) { this.organization = organization; return this; } - /** + /** * Get organization * @return organization - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getOrganization() { return organization; } - - public void setOrganization(String organization) { + public void setOrganization(@javax.annotation.Nonnull String organization) { this.organization = organization; } - public LimitedWorld popularity(Integer popularity) { - + public LimitedWorld popularity(@javax.annotation.Nonnull Integer popularity) { this.popularity = popularity; return this; } - /** + /** * Get popularity * minimum: 0 * @return popularity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "8", required = true, value = "") - public Integer getPopularity() { return popularity; } - - public void setPopularity(Integer popularity) { + public void setPopularity(@javax.annotation.Nonnull Integer popularity) { this.popularity = popularity; } - public LimitedWorld previewYoutubeId(String previewYoutubeId) { - + public LimitedWorld previewYoutubeId(@javax.annotation.Nullable String previewYoutubeId) { this.previewYoutubeId = previewYoutubeId; return this; } - /** + /** * Get previewYoutubeId * @return previewYoutubeId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPreviewYoutubeId() { return previewYoutubeId; } - - public void setPreviewYoutubeId(String previewYoutubeId) { + public void setPreviewYoutubeId(@javax.annotation.Nullable String previewYoutubeId) { this.previewYoutubeId = previewYoutubeId; } - public LimitedWorld publicationDate(String publicationDate) { - + public LimitedWorld publicationDate(@javax.annotation.Nonnull String publicationDate) { this.publicationDate = publicationDate; return this; } - /** + /** * Get publicationDate * @return publicationDate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "none", required = true, value = "") - public String getPublicationDate() { return publicationDate; } - - public void setPublicationDate(String publicationDate) { + public void setPublicationDate(@javax.annotation.Nonnull String publicationDate) { this.publicationDate = publicationDate; } - public LimitedWorld recommendedCapacity(Integer recommendedCapacity) { - + public LimitedWorld recommendedCapacity(@javax.annotation.Nullable Integer recommendedCapacity) { this.recommendedCapacity = recommendedCapacity; return this; } - /** + /** * Get recommendedCapacity * @return recommendedCapacity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "16", value = "") - public Integer getRecommendedCapacity() { return recommendedCapacity; } - - public void setRecommendedCapacity(Integer recommendedCapacity) { + public void setRecommendedCapacity(@javax.annotation.Nullable Integer recommendedCapacity) { this.recommendedCapacity = recommendedCapacity; } - public LimitedWorld releaseStatus(ReleaseStatus releaseStatus) { - + public LimitedWorld releaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; return this; } - /** + /** * Get releaseStatus * @return releaseStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ReleaseStatus getReleaseStatus() { return releaseStatus; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { + public void setReleaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; } - public LimitedWorld storeId(String storeId) { - + public LimitedWorld storeId(@javax.annotation.Nullable String storeId) { this.storeId = storeId; return this; } - /** + /** * Get storeId * @return storeId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "esto_713b247d-2b5d-41a0-bba3-50db28dc1498", value = "") - public String getStoreId() { return storeId; } - - public void setStoreId(String storeId) { + public void setStoreId(@javax.annotation.Nullable String storeId) { this.storeId = storeId; } - public LimitedWorld tags(List tags) { - + public LimitedWorld tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public LimitedWorld addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public LimitedWorld thumbnailImageUrl(String thumbnailImageUrl) { - + public LimitedWorld thumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; return this; } - /** + /** * Get thumbnailImageUrl * @return thumbnailImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getThumbnailImageUrl() { return thumbnailImageUrl; } - - public void setThumbnailImageUrl(String thumbnailImageUrl) { + public void setThumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; } - public LimitedWorld udonProducts(List udonProducts) { - + public LimitedWorld udonProducts(@javax.annotation.Nullable List udonProducts) { this.udonProducts = udonProducts; return this; } @@ -666,94 +608,82 @@ public LimitedWorld addUdonProductsItem(String udonProductsItem) { return this; } - /** + /** * Get udonProducts * @return udonProducts - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getUdonProducts() { return udonProducts; } - - public void setUdonProducts(List udonProducts) { + public void setUdonProducts(@javax.annotation.Nullable List udonProducts) { this.udonProducts = udonProducts; } - public LimitedWorld unityPackages(List unityPackages) { - + public LimitedWorld unityPackages(@javax.annotation.Nonnull List unityPackages) { this.unityPackages = unityPackages; return this; } public LimitedWorld addUnityPackagesItem(LimitedUnityPackage unityPackagesItem) { + if (this.unityPackages == null) { + this.unityPackages = new ArrayList<>(); + } this.unityPackages.add(unityPackagesItem); return this; } - /** + /** * * @return unityPackages - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public List getUnityPackages() { return unityPackages; } - - public void setUnityPackages(List unityPackages) { + public void setUnityPackages(@javax.annotation.Nonnull List unityPackages) { this.unityPackages = unityPackages; } - public LimitedWorld updatedAt(OffsetDateTime updatedAt) { - + public LimitedWorld updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public LimitedWorld visits(Integer visits) { - + public LimitedWorld visits(@javax.annotation.Nullable Integer visits) { this.visits = visits; return this; } - /** + /** * Get visits * minimum: 0 * @return visits - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "9988675", value = "") - public Integer getVisits() { return visits; } - - public void setVisits(Integer visits) { + public void setVisits(@javax.annotation.Nullable Integer visits) { this.visits = visits; } @@ -849,10 +779,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -861,140 +788,99 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authorId"); - openapiFields.add("authorName"); - openapiFields.add("capacity"); - openapiFields.add("created_at"); - openapiFields.add("defaultContentSettings"); - openapiFields.add("favorites"); - openapiFields.add("heat"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("labsPublicationDate"); - openapiFields.add("name"); - openapiFields.add("occupants"); - openapiFields.add("organization"); - openapiFields.add("popularity"); - openapiFields.add("previewYoutubeId"); - openapiFields.add("publicationDate"); - openapiFields.add("recommendedCapacity"); - openapiFields.add("releaseStatus"); - openapiFields.add("storeId"); - openapiFields.add("tags"); - openapiFields.add("thumbnailImageUrl"); - openapiFields.add("udonProducts"); - openapiFields.add("unityPackages"); - openapiFields.add("updated_at"); - openapiFields.add("visits"); + openapiFields = new HashSet(Arrays.asList("authorId", "authorName", "capacity", "created_at", "defaultContentSettings", "favorites", "heat", "id", "imageUrl", "labsPublicationDate", "name", "occupants", "organization", "popularity", "previewYoutubeId", "publicationDate", "recommendedCapacity", "releaseStatus", "storeId", "tags", "thumbnailImageUrl", "udonProducts", "unityPackages", "updated_at", "visits")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("authorId"); - openapiRequiredFields.add("authorName"); - openapiRequiredFields.add("capacity"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("favorites"); - openapiRequiredFields.add("heat"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("labsPublicationDate"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("occupants"); - openapiRequiredFields.add("organization"); - openapiRequiredFields.add("popularity"); - openapiRequiredFields.add("publicationDate"); - openapiRequiredFields.add("releaseStatus"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("thumbnailImageUrl"); - openapiRequiredFields.add("unityPackages"); - openapiRequiredFields.add("updated_at"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to LimitedWorld - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LimitedWorld.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LimitedWorld is not found in the empty JSON string", LimitedWorld.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("authorId", "authorName", "capacity", "created_at", "favorites", "heat", "id", "imageUrl", "labsPublicationDate", "name", "occupants", "organization", "popularity", "publicationDate", "releaseStatus", "tags", "thumbnailImageUrl", "unityPackages", "updated_at")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LimitedWorld + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LimitedWorld.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in LimitedWorld is not found in the empty JSON string", LimitedWorld.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!LimitedWorld.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LimitedWorld` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `LimitedWorld` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : LimitedWorld.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if (!jsonObj.get("authorName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); } // validate the optional field `defaultContentSettings` if (jsonObj.get("defaultContentSettings") != null && !jsonObj.get("defaultContentSettings").isJsonNull()) { - InstanceContentSettings.validateJsonObject(jsonObj.getAsJsonObject("defaultContentSettings")); + InstanceContentSettings.validateJsonElement(jsonObj.get("defaultContentSettings")); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("labsPublicationDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `labsPublicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("labsPublicationDate").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `labsPublicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("labsPublicationDate").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("organization").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `organization` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `organization` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization").toString())); } if ((jsonObj.get("previewYoutubeId") != null && !jsonObj.get("previewYoutubeId").isJsonNull()) && !jsonObj.get("previewYoutubeId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `previewYoutubeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previewYoutubeId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `previewYoutubeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previewYoutubeId").toString())); } if (!jsonObj.get("publicationDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `publicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publicationDate").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `publicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publicationDate").toString())); } + // validate the required field `releaseStatus` + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); if ((jsonObj.get("storeId") != null && !jsonObj.get("storeId").isJsonNull()) && !jsonObj.get("storeId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `storeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storeId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `storeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storeId").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("thumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("udonProducts") != null && !jsonObj.get("udonProducts").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `udonProducts` to be an array in the JSON string but got `%s`", jsonObj.get("udonProducts").toString())); + if (jsonObj.get("udonProducts") != null && !jsonObj.get("udonProducts").isJsonNull() && !jsonObj.get("udonProducts").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `udonProducts` to be an array in the JSON string but got `%s`", jsonObj.get("udonProducts").toString())); } - // ensure the json data is an array - if (!jsonObj.get("unityPackages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); + if (jsonObj.get("unityPackages") != null) { + if (!jsonObj.get("unityPackages").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); + } + JsonArray jsonArrayunityPackages = jsonObj.getAsJsonArray("unityPackages"); + // validate the required field `unityPackages` (array) + for (int i = 0; i < jsonArrayunityPackages.size(); i++) { + LimitedUnityPackage.validateJsonElement(jsonArrayunityPackages.get(i)); + } } - - JsonArray jsonArrayunityPackages = jsonObj.getAsJsonArray("unityPackages"); - // validate the required field `unityPackages` (array) - for (int i = 0; i < jsonArrayunityPackages.size(); i++) { - LimitedUnityPackage.validateJsonObject(jsonArrayunityPackages.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -1017,31 +903,31 @@ public void write(JsonWriter out, LimitedWorld value) throws IOException { @Override public LimitedWorld read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of LimitedWorld given an JSON string - * - * @param jsonString JSON string - * @return An instance of LimitedWorld - * @throws IOException if the JSON string is invalid with respect to LimitedWorld - */ + /** + * Create an instance of LimitedWorld given an JSON string + * + * @param jsonString JSON string + * @return An instance of LimitedWorld + * @throws IOException if the JSON string is invalid with respect to LimitedWorld + */ public static LimitedWorld fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, LimitedWorld.class); } - /** - * Convert an instance of LimitedWorld to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of LimitedWorld to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/MIMEType.java b/src/main/java/io/github/vrchatapi/model/MIMEType.java index 797d5a75..0feb0a50 100644 --- a/src/main/java/io/github/vrchatapi/model/MIMEType.java +++ b/src/main/java/io/github/vrchatapi/model/MIMEType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -94,5 +94,10 @@ public MIMEType read(final JsonReader jsonReader) throws IOException { return MIMEType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MIMEType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/ModelFile.java b/src/main/java/io/github/vrchatapi/model/ModelFile.java index 4c8e0e25..330e6007 100644 --- a/src/main/java/io/github/vrchatapi/model/ModelFile.java +++ b/src/main/java/io/github/vrchatapi/model/ModelFile.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,10 +23,9 @@ import io.github.vrchatapi.model.ImageLoopStyle; import io.github.vrchatapi.model.ImageMask; import io.github.vrchatapi.model.MIMEType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -42,13 +40,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -56,373 +56,339 @@ /** * */ -@ApiModel(description = "") -@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 ModelFile { public static final String SERIALIZED_NAME_ANIMATION_STYLE = "animationStyle"; @SerializedName(SERIALIZED_NAME_ANIMATION_STYLE) + @javax.annotation.Nullable private ImageAnimationStyle animationStyle; public static final String SERIALIZED_NAME_EXTENSION = "extension"; @SerializedName(SERIALIZED_NAME_EXTENSION) + @javax.annotation.Nonnull private String extension; public static final String SERIALIZED_NAME_FRAMES = "frames"; @SerializedName(SERIALIZED_NAME_FRAMES) + @javax.annotation.Nullable private Integer frames; public static final String SERIALIZED_NAME_FRAMES_OVER_TIME = "framesOverTime"; @SerializedName(SERIALIZED_NAME_FRAMES_OVER_TIME) + @javax.annotation.Nullable private Integer framesOverTime; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_LOOP_STYLE = "loopStyle"; @SerializedName(SERIALIZED_NAME_LOOP_STYLE) + @javax.annotation.Nullable private ImageLoopStyle loopStyle = ImageLoopStyle.LINEAR; public static final String SERIALIZED_NAME_MASK_TAG = "maskTag"; @SerializedName(SERIALIZED_NAME_MASK_TAG) + @javax.annotation.Nullable private ImageMask maskTag = ImageMask.SQUARE; public static final String SERIALIZED_NAME_MIME_TYPE = "mimeType"; @SerializedName(SERIALIZED_NAME_MIME_TYPE) + @javax.annotation.Nonnull private MIMEType mimeType = MIMEType.IMAGE_JPEG; public static final String SERIALIZED_NAME_MODIFIED_THUMBNAIL_FILE_NAME = "modifiedThumbnailFileName"; @SerializedName(SERIALIZED_NAME_MODIFIED_THUMBNAIL_FILE_NAME) + @javax.annotation.Nullable private String modifiedThumbnailFileName; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nonnull private String ownerId; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_VERSIONS = "versions"; @SerializedName(SERIALIZED_NAME_VERSIONS) + @javax.annotation.Nonnull private Set versions = new LinkedHashSet<>(); public ModelFile() { } - public ModelFile animationStyle(ImageAnimationStyle animationStyle) { - + public ModelFile animationStyle(@javax.annotation.Nullable ImageAnimationStyle animationStyle) { this.animationStyle = animationStyle; return this; } - /** + /** * Get animationStyle * @return animationStyle - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ImageAnimationStyle getAnimationStyle() { return animationStyle; } - - public void setAnimationStyle(ImageAnimationStyle animationStyle) { + public void setAnimationStyle(@javax.annotation.Nullable ImageAnimationStyle animationStyle) { this.animationStyle = animationStyle; } - public ModelFile extension(String extension) { - + public ModelFile extension(@javax.annotation.Nonnull String extension) { this.extension = extension; return this; } - /** + /** * Get extension * @return extension - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = ".unitypackage", required = true, value = "") - public String getExtension() { return extension; } - - public void setExtension(String extension) { + public void setExtension(@javax.annotation.Nonnull String extension) { this.extension = extension; } - public ModelFile frames(Integer frames) { - + public ModelFile frames(@javax.annotation.Nullable Integer frames) { this.frames = frames; return this; } - /** + /** * The number of frames for animated spritesheet images. * minimum: 2 * maximum: 64 * @return frames - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The number of frames for animated spritesheet images.") - public Integer getFrames() { return frames; } - - public void setFrames(Integer frames) { + public void setFrames(@javax.annotation.Nullable Integer frames) { this.frames = frames; } - public ModelFile framesOverTime(Integer framesOverTime) { - + public ModelFile framesOverTime(@javax.annotation.Nullable Integer framesOverTime) { this.framesOverTime = framesOverTime; return this; } - /** + /** * The frames per second for animated spritesheet images. * minimum: 1 * maximum: 64 * @return framesOverTime - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The frames per second for animated spritesheet images.") - public Integer getFramesOverTime() { return framesOverTime; } - - public void setFramesOverTime(Integer framesOverTime) { + public void setFramesOverTime(@javax.annotation.Nullable Integer framesOverTime) { this.framesOverTime = framesOverTime; } - public ModelFile id(String id) { - + public ModelFile id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public ModelFile loopStyle(ImageLoopStyle loopStyle) { - + public ModelFile loopStyle(@javax.annotation.Nullable ImageLoopStyle loopStyle) { this.loopStyle = loopStyle; return this; } - /** + /** * Get loopStyle * @return loopStyle - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ImageLoopStyle getLoopStyle() { return loopStyle; } - - public void setLoopStyle(ImageLoopStyle loopStyle) { + public void setLoopStyle(@javax.annotation.Nullable ImageLoopStyle loopStyle) { this.loopStyle = loopStyle; } - public ModelFile maskTag(ImageMask maskTag) { - + public ModelFile maskTag(@javax.annotation.Nullable ImageMask maskTag) { this.maskTag = maskTag; return this; } - /** + /** * Get maskTag * @return maskTag - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ImageMask getMaskTag() { return maskTag; } - - public void setMaskTag(ImageMask maskTag) { + public void setMaskTag(@javax.annotation.Nullable ImageMask maskTag) { this.maskTag = maskTag; } - public ModelFile mimeType(MIMEType mimeType) { - + public ModelFile mimeType(@javax.annotation.Nonnull MIMEType mimeType) { this.mimeType = mimeType; return this; } - /** + /** * Get mimeType * @return mimeType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public MIMEType getMimeType() { return mimeType; } - - public void setMimeType(MIMEType mimeType) { + public void setMimeType(@javax.annotation.Nonnull MIMEType mimeType) { this.mimeType = mimeType; } - public ModelFile modifiedThumbnailFileName(String modifiedThumbnailFileName) { - + public ModelFile modifiedThumbnailFileName(@javax.annotation.Nullable String modifiedThumbnailFileName) { this.modifiedThumbnailFileName = modifiedThumbnailFileName; return this; } - /** + /** * Get modifiedThumbnailFileName * @return modifiedThumbnailFileName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "thumbnails/file_00000000-0000-0000-0000-000000000000.ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.1.modified-thumbnail-256.png", value = "") - public String getModifiedThumbnailFileName() { return modifiedThumbnailFileName; } - - public void setModifiedThumbnailFileName(String modifiedThumbnailFileName) { + public void setModifiedThumbnailFileName(@javax.annotation.Nullable String modifiedThumbnailFileName) { this.modifiedThumbnailFileName = modifiedThumbnailFileName; } - public ModelFile name(String name) { - + public ModelFile name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Example File", required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public ModelFile ownerId(String ownerId) { - + public ModelFile ownerId(@javax.annotation.Nonnull String ownerId) { this.ownerId = ownerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return ownerId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getOwnerId() { return ownerId; } - - public void setOwnerId(String ownerId) { + public void setOwnerId(@javax.annotation.Nonnull String ownerId) { this.ownerId = ownerId; } - public ModelFile tags(List tags) { - + public ModelFile tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public ModelFile addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public ModelFile versions(Set versions) { - + public ModelFile versions(@javax.annotation.Nonnull Set versions) { this.versions = versions; return this; } public ModelFile addVersionsItem(FileVersion versionsItem) { + if (this.versions == null) { + this.versions = new LinkedHashSet<>(); + } this.versions.add(versionsItem); return this; } - /** + /** * * @return versions - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public Set getVersions() { return versions; } - - public void setVersions(Set versions) { + public void setVersions(@javax.annotation.Nonnull Set versions) { this.versions = versions; } @@ -483,10 +449,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -495,90 +458,85 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("animationStyle"); - openapiFields.add("extension"); - openapiFields.add("frames"); - openapiFields.add("framesOverTime"); - openapiFields.add("id"); - openapiFields.add("loopStyle"); - openapiFields.add("maskTag"); - openapiFields.add("mimeType"); - openapiFields.add("modifiedThumbnailFileName"); - openapiFields.add("name"); - openapiFields.add("ownerId"); - openapiFields.add("tags"); - openapiFields.add("versions"); + openapiFields = new HashSet(Arrays.asList("animationStyle", "extension", "frames", "framesOverTime", "id", "loopStyle", "maskTag", "mimeType", "modifiedThumbnailFileName", "name", "ownerId", "tags", "versions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("extension"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("mimeType"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("ownerId"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("versions"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ModelFile - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ModelFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ModelFile is not found in the empty JSON string", ModelFile.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("extension", "id", "mimeType", "name", "ownerId", "tags", "versions")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ModelFile + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModelFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ModelFile is not found in the empty JSON string", ModelFile.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ModelFile.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelFile` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ModelFile` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ModelFile.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `animationStyle` + if (jsonObj.get("animationStyle") != null && !jsonObj.get("animationStyle").isJsonNull()) { + ImageAnimationStyle.validateJsonElement(jsonObj.get("animationStyle")); } if (!jsonObj.get("extension").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `extension` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extension").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `extension` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extension").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + // validate the optional field `loopStyle` + if (jsonObj.get("loopStyle") != null && !jsonObj.get("loopStyle").isJsonNull()) { + ImageLoopStyle.validateJsonElement(jsonObj.get("loopStyle")); } + // validate the optional field `maskTag` + if (jsonObj.get("maskTag") != null && !jsonObj.get("maskTag").isJsonNull()) { + ImageMask.validateJsonElement(jsonObj.get("maskTag")); + } + // validate the required field `mimeType` + MIMEType.validateJsonElement(jsonObj.get("mimeType")); if ((jsonObj.get("modifiedThumbnailFileName") != null && !jsonObj.get("modifiedThumbnailFileName").isJsonNull()) && !jsonObj.get("modifiedThumbnailFileName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `modifiedThumbnailFileName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modifiedThumbnailFileName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `modifiedThumbnailFileName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modifiedThumbnailFileName").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - // ensure the json data is an array - if (!jsonObj.get("versions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `versions` to be an array in the JSON string but got `%s`", jsonObj.get("versions").toString())); + if (jsonObj.get("versions") != null) { + if (!jsonObj.get("versions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `versions` to be an array in the JSON string but got `%s`", jsonObj.get("versions").toString())); + } + JsonArray jsonArrayversions = jsonObj.getAsJsonArray("versions"); + // validate the required field `versions` (array) + for (int i = 0; i < jsonArrayversions.size(); i++) { + FileVersion.validateJsonElement(jsonArrayversions.get(i)); + } } - - JsonArray jsonArrayversions = jsonObj.getAsJsonArray("versions"); - // validate the required field `versions` (array) - for (int i = 0; i < jsonArrayversions.size(); i++) { - FileVersion.validateJsonObject(jsonArrayversions.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -601,31 +559,31 @@ public void write(JsonWriter out, ModelFile value) throws IOException { @Override public ModelFile read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ModelFile given an JSON string - * - * @param jsonString JSON string - * @return An instance of ModelFile - * @throws IOException if the JSON string is invalid with respect to ModelFile - */ + /** + * Create an instance of ModelFile given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModelFile + * @throws IOException if the JSON string is invalid with respect to ModelFile + */ public static ModelFile fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ModelFile.class); } - /** - * Convert an instance of ModelFile to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ModelFile to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ModerateUserRequest.java b/src/main/java/io/github/vrchatapi/model/ModerateUserRequest.java index 8f92eae9..57f111b5 100644 --- a/src/main/java/io/github/vrchatapi/model/ModerateUserRequest.java +++ b/src/main/java/io/github/vrchatapi/model/ModerateUserRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.PlayerModerationType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,61 +48,55 @@ /** * ModerateUserRequest */ -@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 ModerateUserRequest { public static final String SERIALIZED_NAME_MODERATED = "moderated"; @SerializedName(SERIALIZED_NAME_MODERATED) + @javax.annotation.Nonnull private String moderated; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private PlayerModerationType type = PlayerModerationType.UNMUTE; public ModerateUserRequest() { } - public ModerateUserRequest moderated(String moderated) { - + public ModerateUserRequest moderated(@javax.annotation.Nonnull String moderated) { this.moderated = moderated; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return moderated - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getModerated() { return moderated; } - - public void setModerated(String moderated) { + public void setModerated(@javax.annotation.Nonnull String moderated) { this.moderated = moderated; } - public ModerateUserRequest type(PlayerModerationType type) { - + public ModerateUserRequest type(@javax.annotation.Nonnull PlayerModerationType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlayerModerationType getType() { return type; } - - public void setType(PlayerModerationType type) { + public void setType(@javax.annotation.Nonnull PlayerModerationType type) { this.type = type; } @@ -141,10 +135,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,46 +144,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("moderated"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("moderated", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("moderated"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ModerateUserRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ModerateUserRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ModerateUserRequest is not found in the empty JSON string", ModerateUserRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("moderated", "type")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ModerateUserRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModerateUserRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ModerateUserRequest is not found in the empty JSON string", ModerateUserRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ModerateUserRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModerateUserRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ModerateUserRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ModerateUserRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("moderated").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `moderated` to be a primitive type in the JSON string but got `%s`", jsonObj.get("moderated").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `moderated` to be a primitive type in the JSON string but got `%s`", jsonObj.get("moderated").toString())); } + // validate the required field `type` + PlayerModerationType.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -215,31 +205,31 @@ public void write(JsonWriter out, ModerateUserRequest value) throws IOException @Override public ModerateUserRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ModerateUserRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ModerateUserRequest - * @throws IOException if the JSON string is invalid with respect to ModerateUserRequest - */ + /** + * Create an instance of ModerateUserRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModerateUserRequest + * @throws IOException if the JSON string is invalid with respect to ModerateUserRequest + */ public static ModerateUserRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ModerateUserRequest.class); } - /** - * Convert an instance of ModerateUserRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ModerateUserRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ModerationReport.java b/src/main/java/io/github/vrchatapi/model/ModerationReport.java index e77ab038..79078bfd 100644 --- a/src/main/java/io/github/vrchatapi/model/ModerationReport.java +++ b/src/main/java/io/github/vrchatapi/model/ModerationReport.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,277 +47,247 @@ /** * ModerationReport */ -@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 ModerationReport { public static final String SERIALIZED_NAME_CATEGORY = "category"; @SerializedName(SERIALIZED_NAME_CATEGORY) + @javax.annotation.Nonnull private String category; public static final String SERIALIZED_NAME_CONTENT_ID = "contentId"; @SerializedName(SERIALIZED_NAME_CONTENT_ID) + @javax.annotation.Nonnull private String contentId; public static final String SERIALIZED_NAME_CONTENT_NAME = "contentName"; @SerializedName(SERIALIZED_NAME_CONTENT_NAME) + @javax.annotation.Nonnull private String contentName; public static final String SERIALIZED_NAME_CONTENT_THUMBNAIL_IMAGE_URL = "contentThumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_CONTENT_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nullable private String contentThumbnailImageUrl; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_EVIDENCE_REQUIRED = "evidenceRequired"; @SerializedName(SERIALIZED_NAME_EVIDENCE_REQUIRED) + @javax.annotation.Nonnull private Boolean evidenceRequired; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nonnull private String reason; public static final String SERIALIZED_NAME_SUPPORT_REQUIRED = "supportRequired"; @SerializedName(SERIALIZED_NAME_SUPPORT_REQUIRED) + @javax.annotation.Nonnull private Boolean supportRequired; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private String type; public ModerationReport() { } - public ModerationReport category(String category) { - + public ModerationReport category(@javax.annotation.Nonnull String category) { this.category = category; return this; } - /** + /** * Valid values are the keys of the object `$.reportOptions[type]` from `GET /config`. Descriptions of these are found at `$.reportCategories[type]`. * @return category - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "behavior", required = true, value = "Valid values are the keys of the object `$.reportOptions[type]` from `GET /config`. Descriptions of these are found at `$.reportCategories[type]`.") - public String getCategory() { return category; } - - public void setCategory(String category) { + public void setCategory(@javax.annotation.Nonnull String category) { this.category = category; } - public ModerationReport contentId(String contentId) { - + public ModerationReport contentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; return this; } - /** + /** * Get contentId * @return contentId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "") - public String getContentId() { return contentId; } - - public void setContentId(String contentId) { + public void setContentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; } - public ModerationReport contentName(String contentName) { - + public ModerationReport contentName(@javax.annotation.Nonnull String contentName) { this.contentName = contentName; return this; } - /** + /** * Get contentName * @return contentName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getContentName() { return contentName; } - - public void setContentName(String contentName) { + public void setContentName(@javax.annotation.Nonnull String contentName) { this.contentName = contentName; } - public ModerationReport contentThumbnailImageUrl(String contentThumbnailImageUrl) { - + public ModerationReport contentThumbnailImageUrl(@javax.annotation.Nullable String contentThumbnailImageUrl) { this.contentThumbnailImageUrl = contentThumbnailImageUrl; return this; } - /** + /** * Get contentThumbnailImageUrl * @return contentThumbnailImageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getContentThumbnailImageUrl() { return contentThumbnailImageUrl; } - - public void setContentThumbnailImageUrl(String contentThumbnailImageUrl) { + public void setContentThumbnailImageUrl(@javax.annotation.Nullable String contentThumbnailImageUrl) { this.contentThumbnailImageUrl = contentThumbnailImageUrl; } - public ModerationReport description(String description) { - + public ModerationReport description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * The subjective reason for the report * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "iz bulli", required = true, value = "The subjective reason for the report") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public ModerationReport evidenceRequired(Boolean evidenceRequired) { - + public ModerationReport evidenceRequired(@javax.annotation.Nonnull Boolean evidenceRequired) { this.evidenceRequired = evidenceRequired; return this; } - /** + /** * Get evidenceRequired * @return evidenceRequired - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getEvidenceRequired() { return evidenceRequired; } - - public void setEvidenceRequired(Boolean evidenceRequired) { + public void setEvidenceRequired(@javax.annotation.Nonnull Boolean evidenceRequired) { this.evidenceRequired = evidenceRequired; } - public ModerationReport id(String id) { - + public ModerationReport id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "modReport_a09eb23c-2c62-4ea9-b885-6198f23c5313", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public ModerationReport reason(String reason) { - + public ModerationReport reason(@javax.annotation.Nonnull String reason) { this.reason = reason; return this; } - /** + /** * Valid values are the strings in the array `$.reportOptions[type][category]` from `GET /config`. Descriptions of these are found at `$.reportReasons[type]`. * @return reason - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Valid values are the strings in the array `$.reportOptions[type][category]` from `GET /config`. Descriptions of these are found at `$.reportReasons[type]`.") - public String getReason() { return reason; } - - public void setReason(String reason) { + public void setReason(@javax.annotation.Nonnull String reason) { this.reason = reason; } - public ModerationReport supportRequired(Boolean supportRequired) { - + public ModerationReport supportRequired(@javax.annotation.Nonnull Boolean supportRequired) { this.supportRequired = supportRequired; return this; } - /** + /** * Get supportRequired * @return supportRequired - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getSupportRequired() { return supportRequired; } - - public void setSupportRequired(Boolean supportRequired) { + public void setSupportRequired(@javax.annotation.Nonnull Boolean supportRequired) { this.supportRequired = supportRequired; } - public ModerationReport type(String type) { - + public ModerationReport type(@javax.annotation.Nonnull String type) { this.type = type; return this; } - /** + /** * Valid values are the keys of the object `$.reportOptions` from `GET /config`. * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "user", required = true, value = "Valid values are the keys of the object `$.reportOptions` from `GET /config`.") - public String getType() { return type; } - - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } @@ -372,10 +342,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -384,82 +351,63 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("category"); - openapiFields.add("contentId"); - openapiFields.add("contentName"); - openapiFields.add("contentThumbnailImageUrl"); - openapiFields.add("description"); - openapiFields.add("evidenceRequired"); - openapiFields.add("id"); - openapiFields.add("reason"); - openapiFields.add("supportRequired"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("category", "contentId", "contentName", "contentThumbnailImageUrl", "description", "evidenceRequired", "id", "reason", "supportRequired", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("category"); - openapiRequiredFields.add("contentId"); - openapiRequiredFields.add("contentName"); - openapiRequiredFields.add("contentThumbnailImageUrl"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("evidenceRequired"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("reason"); - openapiRequiredFields.add("supportRequired"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ModerationReport - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ModerationReport.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ModerationReport is not found in the empty JSON string", ModerationReport.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("category", "contentId", "contentName", "contentThumbnailImageUrl", "description", "evidenceRequired", "id", "reason", "supportRequired", "type")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ModerationReport + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ModerationReport.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ModerationReport is not found in the empty JSON string", ModerationReport.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ModerationReport.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModerationReport` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ModerationReport` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ModerationReport.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("category").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); } if (!jsonObj.get("contentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); } if (!jsonObj.get("contentName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentName").toString())); } - if (!jsonObj.get("contentThumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentThumbnailImageUrl").toString())); + if ((jsonObj.get("contentThumbnailImageUrl") != null && !jsonObj.get("contentThumbnailImageUrl").isJsonNull()) && !jsonObj.get("contentThumbnailImageUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentThumbnailImageUrl").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } @@ -483,31 +431,31 @@ public void write(JsonWriter out, ModerationReport value) throws IOException { @Override public ModerationReport read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ModerationReport given an JSON string - * - * @param jsonString JSON string - * @return An instance of ModerationReport - * @throws IOException if the JSON string is invalid with respect to ModerationReport - */ + /** + * Create an instance of ModerationReport given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModerationReport + * @throws IOException if the JSON string is invalid with respect to ModerationReport + */ public static ModerationReport fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ModerationReport.class); } - /** - * Convert an instance of ModerationReport to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ModerationReport to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/MutualFriend.java b/src/main/java/io/github/vrchatapi/model/MutualFriend.java index c24fbe0b..324070c8 100644 --- a/src/main/java/io/github/vrchatapi/model/MutualFriend.java +++ b/src/main/java/io/github/vrchatapi/model/MutualFriend.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.UserStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,100 +50,100 @@ /** * User object received when querying mutual friends */ -@ApiModel(description = "User object received when querying mutual friends") -@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 MutualFriend { public static final String SERIALIZED_NAME_AVATAR_THUMBNAIL = "avatarThumbnail"; @SerializedName(SERIALIZED_NAME_AVATAR_THUMBNAIL) + @javax.annotation.Nullable private String avatarThumbnail; public static final String SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL = "currentAvatarImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL) + @javax.annotation.Nonnull private String currentAvatarImageUrl; public static final String SERIALIZED_NAME_CURRENT_AVATAR_TAGS = "currentAvatarTags"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_TAGS) - private List currentAvatarTags = null; + @javax.annotation.Nullable + private List currentAvatarTags = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL = "currentAvatarThumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nullable private String currentAvatarThumbnailImageUrl; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE = "profilePicOverride"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE) + @javax.annotation.Nullable private String profilePicOverride; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private UserStatus status = UserStatus.OFFLINE; public static final String SERIALIZED_NAME_STATUS_DESCRIPTION = "statusDescription"; @SerializedName(SERIALIZED_NAME_STATUS_DESCRIPTION) + @javax.annotation.Nonnull private String statusDescription; public MutualFriend() { } - public MutualFriend avatarThumbnail(String avatarThumbnail) { - + public MutualFriend avatarThumbnail(@javax.annotation.Nullable String avatarThumbnail) { this.avatarThumbnail = avatarThumbnail; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return avatarThumbnail - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/image/file_aae83ed9-d42d-4d72-9f4b-9f1e41ed17e1/1/256", value = "When profilePicOverride is not empty, use it instead.") - public String getAvatarThumbnail() { return avatarThumbnail; } - - public void setAvatarThumbnail(String avatarThumbnail) { + public void setAvatarThumbnail(@javax.annotation.Nullable String avatarThumbnail) { this.avatarThumbnail = avatarThumbnail; } - public MutualFriend currentAvatarImageUrl(String currentAvatarImageUrl) { - + public MutualFriend currentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/file/file_ae46d521-7281-4b38-b365-804b32a1d6a7/1/file", required = true, value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarImageUrl() { return currentAvatarImageUrl; } - - public void setCurrentAvatarImageUrl(String currentAvatarImageUrl) { + public void setCurrentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; } - public MutualFriend currentAvatarTags(List currentAvatarTags) { - + public MutualFriend currentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; return this; } @@ -156,180 +156,149 @@ public MutualFriend addCurrentAvatarTagsItem(String currentAvatarTagsItem) { return this; } - /** + /** * Get currentAvatarTags * @return currentAvatarTags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getCurrentAvatarTags() { return currentAvatarTags; } - - public void setCurrentAvatarTags(List currentAvatarTags) { + public void setCurrentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; } - public MutualFriend currentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { - + public MutualFriend currentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarThumbnailImageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/image/file_aae83ed9-d42d-4d72-9f4b-9f1e41ed17e1/1/256", value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarThumbnailImageUrl() { return currentAvatarThumbnailImageUrl; } - - public void setCurrentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; } - public MutualFriend displayName(String displayName) { - + public MutualFriend displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public MutualFriend id(String id) { - + public MutualFriend id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public MutualFriend imageUrl(String imageUrl) { - + public MutualFriend imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public MutualFriend profilePicOverride(String profilePicOverride) { - + public MutualFriend profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; return this; } - /** + /** * Get profilePicOverride * @return profilePicOverride - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProfilePicOverride() { return profilePicOverride; } - - public void setProfilePicOverride(String profilePicOverride) { + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; } - public MutualFriend status(UserStatus status) { - + public MutualFriend status(@javax.annotation.Nonnull UserStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public UserStatus getStatus() { return status; } - - public void setStatus(UserStatus status) { + public void setStatus(@javax.annotation.Nonnull UserStatus status) { this.status = status; } - public MutualFriend statusDescription(String statusDescription) { - + public MutualFriend statusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; return this; } - /** + /** * Get statusDescription * @return statusDescription - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getStatusDescription() { return statusDescription; } - - public void setStatusDescription(String statusDescription) { + public void setStatusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; } @@ -384,10 +353,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -396,82 +362,69 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatarThumbnail"); - openapiFields.add("currentAvatarImageUrl"); - openapiFields.add("currentAvatarTags"); - openapiFields.add("currentAvatarThumbnailImageUrl"); - openapiFields.add("displayName"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("profilePicOverride"); - openapiFields.add("status"); - openapiFields.add("statusDescription"); + openapiFields = new HashSet(Arrays.asList("avatarThumbnail", "currentAvatarImageUrl", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "displayName", "id", "imageUrl", "profilePicOverride", "status", "statusDescription")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("currentAvatarImageUrl"); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("statusDescription"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MutualFriend - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MutualFriend.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MutualFriend is not found in the empty JSON string", MutualFriend.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("currentAvatarImageUrl", "displayName", "id", "imageUrl", "status", "statusDescription")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MutualFriend + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MutualFriend.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in MutualFriend is not found in the empty JSON string", MutualFriend.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!MutualFriend.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MutualFriend` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `MutualFriend` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MutualFriend.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("avatarThumbnail") != null && !jsonObj.get("avatarThumbnail").isJsonNull()) && !jsonObj.get("avatarThumbnail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `avatarThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatarThumbnail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `avatarThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatarThumbnail").toString())); } if (!jsonObj.get("currentAvatarImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("currentAvatarTags") != null && !jsonObj.get("currentAvatarTags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); + if (jsonObj.get("currentAvatarTags") != null && !jsonObj.get("currentAvatarTags").isJsonNull() && !jsonObj.get("currentAvatarTags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); } if ((jsonObj.get("currentAvatarThumbnailImageUrl") != null && !jsonObj.get("currentAvatarThumbnailImageUrl").isJsonNull()) && !jsonObj.get("currentAvatarThumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); } if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if ((jsonObj.get("profilePicOverride") != null && !jsonObj.get("profilePicOverride").isJsonNull()) && !jsonObj.get("profilePicOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); } + // validate the required field `status` + UserStatus.validateJsonElement(jsonObj.get("status")); if (!jsonObj.get("statusDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); } } @@ -495,31 +448,31 @@ public void write(JsonWriter out, MutualFriend value) throws IOException { @Override public MutualFriend read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of MutualFriend given an JSON string - * - * @param jsonString JSON string - * @return An instance of MutualFriend - * @throws IOException if the JSON string is invalid with respect to MutualFriend - */ + /** + * Create an instance of MutualFriend given an JSON string + * + * @param jsonString JSON string + * @return An instance of MutualFriend + * @throws IOException if the JSON string is invalid with respect to MutualFriend + */ public static MutualFriend fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, MutualFriend.class); } - /** - * Convert an instance of MutualFriend to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of MutualFriend to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Mutuals.java b/src/main/java/io/github/vrchatapi/model/Mutuals.java index 3ad4e978..61326cbe 100644 --- a/src/main/java/io/github/vrchatapi/model/Mutuals.java +++ b/src/main/java/io/github/vrchatapi/model/Mutuals.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,63 +47,57 @@ /** * Mutuals */ -@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 Mutuals { public static final String SERIALIZED_NAME_FRIENDS = "friends"; @SerializedName(SERIALIZED_NAME_FRIENDS) + @javax.annotation.Nonnull private Integer friends = 0; public static final String SERIALIZED_NAME_GROUPS = "groups"; @SerializedName(SERIALIZED_NAME_GROUPS) + @javax.annotation.Nonnull private Integer groups = 0; public Mutuals() { } - public Mutuals friends(Integer friends) { - + public Mutuals friends(@javax.annotation.Nonnull Integer friends) { this.friends = friends; return this; } - /** + /** * Get friends * minimum: 0 * @return friends - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getFriends() { return friends; } - - public void setFriends(Integer friends) { + public void setFriends(@javax.annotation.Nonnull Integer friends) { this.friends = friends; } - public Mutuals groups(Integer groups) { - + public Mutuals groups(@javax.annotation.Nonnull Integer groups) { this.groups = groups; return this; } - /** + /** * Get groups * minimum: 0 * @return groups - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getGroups() { return groups; } - - public void setGroups(Integer groups) { + public void setGroups(@javax.annotation.Nonnull Integer groups) { this.groups = groups; } @@ -142,10 +136,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -154,43 +145,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("friends"); - openapiFields.add("groups"); + openapiFields = new HashSet(Arrays.asList("friends", "groups")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("friends"); - openapiRequiredFields.add("groups"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Mutuals - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Mutuals.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Mutuals is not found in the empty JSON string", Mutuals.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("friends", "groups")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Mutuals + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Mutuals.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Mutuals is not found in the empty JSON string", Mutuals.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Mutuals.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Mutuals` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Mutuals` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Mutuals.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -213,31 +201,31 @@ public void write(JsonWriter out, Mutuals value) throws IOException { @Override public Mutuals read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Mutuals given an JSON string - * - * @param jsonString JSON string - * @return An instance of Mutuals - * @throws IOException if the JSON string is invalid with respect to Mutuals - */ + /** + * Create an instance of Mutuals given an JSON string + * + * @param jsonString JSON string + * @return An instance of Mutuals + * @throws IOException if the JSON string is invalid with respect to Mutuals + */ public static Mutuals fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Mutuals.class); } - /** - * Convert an instance of Mutuals to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Mutuals to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Notification.java b/src/main/java/io/github/vrchatapi/model/Notification.java index c83bb5eb..5c7b82dd 100644 --- a/src/main/java/io/github/vrchatapi/model/Notification.java +++ b/src/main/java/io/github/vrchatapi/model/Notification.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.NotificationType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,253 +49,228 @@ /** * */ -@ApiModel(description = "") -@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 Notification { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DETAILS = "details"; @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nonnull private String details = "{}"; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull private String message; public static final String SERIALIZED_NAME_RECEIVER_USER_ID = "receiverUserId"; @SerializedName(SERIALIZED_NAME_RECEIVER_USER_ID) + @javax.annotation.Nullable private String receiverUserId; public static final String SERIALIZED_NAME_SEEN = "seen"; @SerializedName(SERIALIZED_NAME_SEEN) + @javax.annotation.Nullable private Boolean seen = false; public static final String SERIALIZED_NAME_SENDER_USER_ID = "senderUserId"; @SerializedName(SERIALIZED_NAME_SENDER_USER_ID) + @javax.annotation.Nonnull private String senderUserId; public static final String SERIALIZED_NAME_SENDER_USERNAME = "senderUsername"; + @Deprecated @SerializedName(SERIALIZED_NAME_SENDER_USERNAME) + @javax.annotation.Nullable private String senderUsername; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private NotificationType type = NotificationType.FRIENDREQUEST; + @javax.annotation.Nonnull + private NotificationType type = NotificationType.FRIEND_REQUEST; public Notification() { } - public Notification createdAt(OffsetDateTime createdAt) { - + public Notification createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public Notification details(String details) { - + public Notification details(@javax.annotation.Nonnull String details) { this.details = details; return this; } - /** + /** * **NOTICE:** This is not a JSON object when received from the REST API, but it is when received from the Websocket API. When received from the REST API, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. * @return details - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "OneOf: {}, NotificationDetailBoop, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick", required = true, value = "**NOTICE:** This is not a JSON object when received from the REST API, but it is when received from the Websocket API. When received from the REST API, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType.") - public String getDetails() { return details; } - - public void setDetails(String details) { + public void setDetails(@javax.annotation.Nonnull String details) { this.details = details; } - public Notification id(String id) { - + public Notification id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Notification message(String message) { - + public Notification message(@javax.annotation.Nonnull String message) { this.message = message; return this; } - /** + /** * * @return message - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "This is a generated invite to VRChat Hub", required = true, value = "") - public String getMessage() { return message; } - - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nonnull String message) { this.message = message; } - public Notification receiverUserId(String receiverUserId) { - + public Notification receiverUserId(@javax.annotation.Nullable String receiverUserId) { this.receiverUserId = receiverUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return receiverUserId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getReceiverUserId() { return receiverUserId; } - - public void setReceiverUserId(String receiverUserId) { + public void setReceiverUserId(@javax.annotation.Nullable String receiverUserId) { this.receiverUserId = receiverUserId; } - public Notification seen(Boolean seen) { - + public Notification seen(@javax.annotation.Nullable Boolean seen) { this.seen = seen; return this; } - /** + /** * Not included in notification objects received from the Websocket API * @return seen - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Not included in notification objects received from the Websocket API") - public Boolean getSeen() { return seen; } - - public void setSeen(Boolean seen) { + public void setSeen(@javax.annotation.Nullable Boolean seen) { this.seen = seen; } - public Notification senderUserId(String senderUserId) { - + public Notification senderUserId(@javax.annotation.Nonnull String senderUserId) { this.senderUserId = senderUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return senderUserId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getSenderUserId() { return senderUserId; } - - public void setSenderUserId(String senderUserId) { + public void setSenderUserId(@javax.annotation.Nonnull String senderUserId) { this.senderUserId = senderUserId; } - public Notification senderUsername(String senderUsername) { - + @Deprecated + public Notification senderUsername(@javax.annotation.Nullable String senderUsername) { this.senderUsername = senderUsername; return this; } - /** + /** * -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). * @return senderUsername * @deprecated - **/ + */ @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "-| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).") - public String getSenderUsername() { return senderUsername; } - - public void setSenderUsername(String senderUsername) { + @Deprecated + public void setSenderUsername(@javax.annotation.Nullable String senderUsername) { this.senderUsername = senderUsername; } - public Notification type(NotificationType type) { - + public Notification type(@javax.annotation.Nonnull NotificationType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public NotificationType getType() { return type; } - - public void setType(NotificationType type) { + public void setType(@javax.annotation.Nonnull NotificationType type) { this.type = type; } @@ -348,10 +323,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -360,72 +332,60 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("details"); - openapiFields.add("id"); - openapiFields.add("message"); - openapiFields.add("receiverUserId"); - openapiFields.add("seen"); - openapiFields.add("senderUserId"); - openapiFields.add("senderUsername"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("created_at", "details", "id", "message", "receiverUserId", "seen", "senderUserId", "senderUsername", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("details"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("message"); - openapiRequiredFields.add("senderUserId"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Notification - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Notification.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Notification is not found in the empty JSON string", Notification.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("created_at", "details", "id", "message", "senderUserId", "type")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Notification + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Notification.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Notification is not found in the empty JSON string", Notification.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Notification.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Notification` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Notification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Notification.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("details").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `details` to be a primitive type in the JSON string but got `%s`", jsonObj.get("details").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `details` to be a primitive type in the JSON string but got `%s`", jsonObj.get("details").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } if ((jsonObj.get("receiverUserId") != null && !jsonObj.get("receiverUserId").isJsonNull()) && !jsonObj.get("receiverUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `receiverUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `receiverUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverUserId").toString())); } if (!jsonObj.get("senderUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `senderUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `senderUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUserId").toString())); } if ((jsonObj.get("senderUsername") != null && !jsonObj.get("senderUsername").isJsonNull()) && !jsonObj.get("senderUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `senderUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUsername").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `senderUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUsername").toString())); } + // validate the required field `type` + NotificationType.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -448,31 +408,31 @@ public void write(JsonWriter out, Notification value) throws IOException { @Override public Notification read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Notification given an JSON string - * - * @param jsonString JSON string - * @return An instance of Notification - * @throws IOException if the JSON string is invalid with respect to Notification - */ + /** + * Create an instance of Notification given an JSON string + * + * @param jsonString JSON string + * @return An instance of Notification + * @throws IOException if the JSON string is invalid with respect to Notification + */ public static Notification fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Notification.class); } - /** - * Convert an instance of Notification to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Notification to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/NotificationDetailBoop.java b/src/main/java/io/github/vrchatapi/model/NotificationDetailBoop.java new file mode 100644 index 00000000..9537fc2f --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationDetailBoop.java @@ -0,0 +1,256 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * Either inventoryItemId by itself, or emojiId with optional emojiVersion + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class NotificationDetailBoop { + public static final String SERIALIZED_NAME_EMOJI_ID = "emojiId"; + @SerializedName(SERIALIZED_NAME_EMOJI_ID) + @javax.annotation.Nullable + private String emojiId; + + public static final String SERIALIZED_NAME_EMOJI_VERSION = "emojiVersion"; + @SerializedName(SERIALIZED_NAME_EMOJI_VERSION) + @javax.annotation.Nullable + private Integer emojiVersion; + + public static final String SERIALIZED_NAME_INVENTORY_ITEM_ID = "inventoryItemId"; + @SerializedName(SERIALIZED_NAME_INVENTORY_ITEM_ID) + @javax.annotation.Nullable + private String inventoryItemId; + + public NotificationDetailBoop() { + } + + public NotificationDetailBoop emojiId(@javax.annotation.Nullable String emojiId) { + this.emojiId = emojiId; + return this; + } + + /** + * Get emojiId + * @return emojiId + */ + @javax.annotation.Nullable + public String getEmojiId() { + return emojiId; + } + + public void setEmojiId(@javax.annotation.Nullable String emojiId) { + this.emojiId = emojiId; + } + + + public NotificationDetailBoop emojiVersion(@javax.annotation.Nullable Integer emojiVersion) { + this.emojiVersion = emojiVersion; + return this; + } + + /** + * Get emojiVersion + * @return emojiVersion + */ + @javax.annotation.Nullable + public Integer getEmojiVersion() { + return emojiVersion; + } + + public void setEmojiVersion(@javax.annotation.Nullable Integer emojiVersion) { + this.emojiVersion = emojiVersion; + } + + + public NotificationDetailBoop inventoryItemId(@javax.annotation.Nullable String inventoryItemId) { + this.inventoryItemId = inventoryItemId; + return this; + } + + /** + * Get inventoryItemId + * @return inventoryItemId + */ + @javax.annotation.Nullable + public String getInventoryItemId() { + return inventoryItemId; + } + + public void setInventoryItemId(@javax.annotation.Nullable String inventoryItemId) { + this.inventoryItemId = inventoryItemId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationDetailBoop notificationDetailBoop = (NotificationDetailBoop) o; + return Objects.equals(this.emojiId, notificationDetailBoop.emojiId) && + Objects.equals(this.emojiVersion, notificationDetailBoop.emojiVersion) && + Objects.equals(this.inventoryItemId, notificationDetailBoop.inventoryItemId); + } + + @Override + public int hashCode() { + return Objects.hash(emojiId, emojiVersion, inventoryItemId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationDetailBoop {\n"); + sb.append(" emojiId: ").append(toIndentedString(emojiId)).append("\n"); + sb.append(" emojiVersion: ").append(toIndentedString(emojiVersion)).append("\n"); + sb.append(" inventoryItemId: ").append(toIndentedString(inventoryItemId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("emojiId", "emojiVersion", "inventoryItemId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationDetailBoop + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationDetailBoop.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationDetailBoop is not found in the empty JSON string", NotificationDetailBoop.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationDetailBoop.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationDetailBoop` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("emojiId") != null && !jsonObj.get("emojiId").isJsonNull()) && !jsonObj.get("emojiId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `emojiId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("emojiId").toString())); + } + if ((jsonObj.get("inventoryItemId") != null && !jsonObj.get("inventoryItemId").isJsonNull()) && !jsonObj.get("inventoryItemId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `inventoryItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inventoryItemId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationDetailBoop.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationDetailBoop' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailBoop.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationDetailBoop value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationDetailBoop read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NotificationDetailBoop given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationDetailBoop + * @throws IOException if the JSON string is invalid with respect to NotificationDetailBoop + */ + public static NotificationDetailBoop fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NotificationDetailBoop.class); + } + + /** + * Convert an instance of NotificationDetailBoop to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/NotificationDetailInvite.java b/src/main/java/io/github/vrchatapi/model/NotificationDetailInvite.java index 56ea46fc..5edb6916 100644 --- a/src/main/java/io/github/vrchatapi/model/NotificationDetailInvite.java +++ b/src/main/java/io/github/vrchatapi/model/NotificationDetailInvite.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,88 +47,79 @@ /** * NotificationDetailInvite */ -@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 NotificationDetailInvite { public static final String SERIALIZED_NAME_INVITE_MESSAGE = "inviteMessage"; @SerializedName(SERIALIZED_NAME_INVITE_MESSAGE) + @javax.annotation.Nullable private String inviteMessage; public static final String SERIALIZED_NAME_WORLD_ID = "worldId"; @SerializedName(SERIALIZED_NAME_WORLD_ID) + @javax.annotation.Nonnull private String worldId; public static final String SERIALIZED_NAME_WORLD_NAME = "worldName"; @SerializedName(SERIALIZED_NAME_WORLD_NAME) + @javax.annotation.Nonnull private String worldName; public NotificationDetailInvite() { } - public NotificationDetailInvite inviteMessage(String inviteMessage) { - + public NotificationDetailInvite inviteMessage(@javax.annotation.Nullable String inviteMessage) { this.inviteMessage = inviteMessage; return this; } - /** + /** * Get inviteMessage * @return inviteMessage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getInviteMessage() { return inviteMessage; } - - public void setInviteMessage(String inviteMessage) { + public void setInviteMessage(@javax.annotation.Nullable String inviteMessage) { this.inviteMessage = inviteMessage; } - public NotificationDetailInvite worldId(String worldId) { - + public NotificationDetailInvite worldId(@javax.annotation.Nonnull String worldId) { this.worldId = worldId; return this; } - /** + /** * Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list. * @return worldId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd:12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)", required = true, value = "Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list.") - public String getWorldId() { return worldId; } - - public void setWorldId(String worldId) { + public void setWorldId(@javax.annotation.Nonnull String worldId) { this.worldId = worldId; } - public NotificationDetailInvite worldName(String worldName) { - + public NotificationDetailInvite worldName(@javax.annotation.Nonnull String worldName) { this.worldName = worldName; return this; } - /** + /** * Get worldName * @return worldName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getWorldName() { return worldName; } - - public void setWorldName(String worldName) { + public void setWorldName(@javax.annotation.Nonnull String worldName) { this.worldName = worldName; } @@ -169,10 +160,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -181,52 +169,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("inviteMessage"); - openapiFields.add("worldId"); - openapiFields.add("worldName"); + openapiFields = new HashSet(Arrays.asList("inviteMessage", "worldId", "worldName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("worldId"); - openapiRequiredFields.add("worldName"); + openapiRequiredFields = new HashSet(Arrays.asList("worldId", "worldName")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotificationDetailInvite - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NotificationDetailInvite.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NotificationDetailInvite is not found in the empty JSON string", NotificationDetailInvite.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationDetailInvite + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationDetailInvite.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationDetailInvite is not found in the empty JSON string", NotificationDetailInvite.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!NotificationDetailInvite.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotificationDetailInvite` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationDetailInvite` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : NotificationDetailInvite.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("inviteMessage") != null && !jsonObj.get("inviteMessage").isJsonNull()) && !jsonObj.get("inviteMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `inviteMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inviteMessage").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `inviteMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inviteMessage").toString())); } if (!jsonObj.get("worldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); } if (!jsonObj.get("worldName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldName").toString())); } } @@ -250,31 +234,31 @@ public void write(JsonWriter out, NotificationDetailInvite value) throws IOExcep @Override public NotificationDetailInvite read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotificationDetailInvite given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotificationDetailInvite - * @throws IOException if the JSON string is invalid with respect to NotificationDetailInvite - */ + /** + * Create an instance of NotificationDetailInvite given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationDetailInvite + * @throws IOException if the JSON string is invalid with respect to NotificationDetailInvite + */ public static NotificationDetailInvite fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotificationDetailInvite.class); } - /** - * Convert an instance of NotificationDetailInvite to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotificationDetailInvite to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/NotificationDetailInviteResponse.java b/src/main/java/io/github/vrchatapi/model/NotificationDetailInviteResponse.java index 5bb5e6fd..9c14faa8 100644 --- a/src/main/java/io/github/vrchatapi/model/NotificationDetailInviteResponse.java +++ b/src/main/java/io/github/vrchatapi/model/NotificationDetailInviteResponse.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * NotificationDetailInviteResponse */ -@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 NotificationDetailInviteResponse { public static final String SERIALIZED_NAME_IN_RESPONSE_TO = "inResponseTo"; @SerializedName(SERIALIZED_NAME_IN_RESPONSE_TO) + @javax.annotation.Nonnull private String inResponseTo; public static final String SERIALIZED_NAME_RESPONSE_MESSAGE = "responseMessage"; @SerializedName(SERIALIZED_NAME_RESPONSE_MESSAGE) + @javax.annotation.Nonnull private String responseMessage; public NotificationDetailInviteResponse() { } - public NotificationDetailInviteResponse inResponseTo(String inResponseTo) { - + public NotificationDetailInviteResponse inResponseTo(@javax.annotation.Nonnull String inResponseTo) { this.inResponseTo = inResponseTo; return this; } - /** + /** * Get inResponseTo * @return inResponseTo - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "not_00000000-0000-0000-0000-000000000000", required = true, value = "") - public String getInResponseTo() { return inResponseTo; } - - public void setInResponseTo(String inResponseTo) { + public void setInResponseTo(@javax.annotation.Nonnull String inResponseTo) { this.inResponseTo = inResponseTo; } - public NotificationDetailInviteResponse responseMessage(String responseMessage) { - + public NotificationDetailInviteResponse responseMessage(@javax.annotation.Nonnull String responseMessage) { this.responseMessage = responseMessage; return this; } - /** + /** * Get responseMessage * @return responseMessage - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getResponseMessage() { return responseMessage; } - - public void setResponseMessage(String responseMessage) { + public void setResponseMessage(@javax.annotation.Nonnull String responseMessage) { this.responseMessage = responseMessage; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,48 +143,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("inResponseTo"); - openapiFields.add("responseMessage"); + openapiFields = new HashSet(Arrays.asList("inResponseTo", "responseMessage")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("inResponseTo"); - openapiRequiredFields.add("responseMessage"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotificationDetailInviteResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NotificationDetailInviteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NotificationDetailInviteResponse is not found in the empty JSON string", NotificationDetailInviteResponse.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("inResponseTo", "responseMessage")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationDetailInviteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationDetailInviteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationDetailInviteResponse is not found in the empty JSON string", NotificationDetailInviteResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!NotificationDetailInviteResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotificationDetailInviteResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationDetailInviteResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : NotificationDetailInviteResponse.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("inResponseTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `inResponseTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inResponseTo").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `inResponseTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inResponseTo").toString())); } if (!jsonObj.get("responseMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `responseMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseMessage").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `responseMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseMessage").toString())); } } @@ -217,31 +205,31 @@ public void write(JsonWriter out, NotificationDetailInviteResponse value) throws @Override public NotificationDetailInviteResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotificationDetailInviteResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotificationDetailInviteResponse - * @throws IOException if the JSON string is invalid with respect to NotificationDetailInviteResponse - */ + /** + * Create an instance of NotificationDetailInviteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationDetailInviteResponse + * @throws IOException if the JSON string is invalid with respect to NotificationDetailInviteResponse + */ public static NotificationDetailInviteResponse fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotificationDetailInviteResponse.class); } - /** - * Convert an instance of NotificationDetailInviteResponse to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotificationDetailInviteResponse to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInvite.java b/src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInvite.java index ffe8050b..9c599137 100644 --- a/src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInvite.java +++ b/src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInvite.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * NotificationDetailRequestInvite */ -@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 NotificationDetailRequestInvite { public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nullable private String platform; public static final String SERIALIZED_NAME_REQUEST_MESSAGE = "requestMessage"; @SerializedName(SERIALIZED_NAME_REQUEST_MESSAGE) + @javax.annotation.Nullable private String requestMessage; public NotificationDetailRequestInvite() { } - public NotificationDetailRequestInvite platform(String platform) { - + public NotificationDetailRequestInvite platform(@javax.annotation.Nullable String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "standalonewindows", value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nullable String platform) { this.platform = platform; } - public NotificationDetailRequestInvite requestMessage(String requestMessage) { - + public NotificationDetailRequestInvite requestMessage(@javax.annotation.Nullable String requestMessage) { this.requestMessage = requestMessage; return this; } - /** + /** * Used when using InviteMessage Slot. * @return requestMessage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Used when using InviteMessage Slot.") - public String getRequestMessage() { return requestMessage; } - - public void setRequestMessage(String requestMessage) { + public void setRequestMessage(@javax.annotation.Nullable String requestMessage) { this.requestMessage = requestMessage; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,39 +143,38 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("platform"); - openapiFields.add("requestMessage"); + openapiFields = new HashSet(Arrays.asList("platform", "requestMessage")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotificationDetailRequestInvite - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NotificationDetailRequestInvite.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NotificationDetailRequestInvite is not found in the empty JSON string", NotificationDetailRequestInvite.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationDetailRequestInvite + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationDetailRequestInvite.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationDetailRequestInvite is not found in the empty JSON string", NotificationDetailRequestInvite.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!NotificationDetailRequestInvite.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotificationDetailRequestInvite` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationDetailRequestInvite` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) && !jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if ((jsonObj.get("requestMessage") != null && !jsonObj.get("requestMessage").isJsonNull()) && !jsonObj.get("requestMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `requestMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestMessage").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `requestMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestMessage").toString())); } } @@ -208,31 +198,31 @@ public void write(JsonWriter out, NotificationDetailRequestInvite value) throws @Override public NotificationDetailRequestInvite read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotificationDetailRequestInvite given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotificationDetailRequestInvite - * @throws IOException if the JSON string is invalid with respect to NotificationDetailRequestInvite - */ + /** + * Create an instance of NotificationDetailRequestInvite given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationDetailRequestInvite + * @throws IOException if the JSON string is invalid with respect to NotificationDetailRequestInvite + */ public static NotificationDetailRequestInvite fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotificationDetailRequestInvite.class); } - /** - * Convert an instance of NotificationDetailRequestInvite to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotificationDetailRequestInvite to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInviteResponse.java b/src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInviteResponse.java index 6cc3c5c7..b33974b4 100644 --- a/src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInviteResponse.java +++ b/src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInviteResponse.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * NotificationDetailRequestInviteResponse */ -@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 NotificationDetailRequestInviteResponse { public static final String SERIALIZED_NAME_IN_RESPONSE_TO = "inResponseTo"; @SerializedName(SERIALIZED_NAME_IN_RESPONSE_TO) + @javax.annotation.Nonnull private String inResponseTo; public static final String SERIALIZED_NAME_REQUEST_MESSAGE = "requestMessage"; @SerializedName(SERIALIZED_NAME_REQUEST_MESSAGE) + @javax.annotation.Nullable private String requestMessage; public NotificationDetailRequestInviteResponse() { } - public NotificationDetailRequestInviteResponse inResponseTo(String inResponseTo) { - + public NotificationDetailRequestInviteResponse inResponseTo(@javax.annotation.Nonnull String inResponseTo) { this.inResponseTo = inResponseTo; return this; } - /** + /** * Get inResponseTo * @return inResponseTo - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "not_00000000-0000-0000-0000-000000000000", required = true, value = "") - public String getInResponseTo() { return inResponseTo; } - - public void setInResponseTo(String inResponseTo) { + public void setInResponseTo(@javax.annotation.Nonnull String inResponseTo) { this.inResponseTo = inResponseTo; } - public NotificationDetailRequestInviteResponse requestMessage(String requestMessage) { - + public NotificationDetailRequestInviteResponse requestMessage(@javax.annotation.Nullable String requestMessage) { this.requestMessage = requestMessage; return this; } - /** + /** * Used when using InviteMessage Slot. * @return requestMessage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Used when using InviteMessage Slot.") - public String getRequestMessage() { return requestMessage; } - - public void setRequestMessage(String requestMessage) { + public void setRequestMessage(@javax.annotation.Nullable String requestMessage) { this.requestMessage = requestMessage; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,47 +143,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("inResponseTo"); - openapiFields.add("requestMessage"); + openapiFields = new HashSet(Arrays.asList("inResponseTo", "requestMessage")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("inResponseTo"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotificationDetailRequestInviteResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NotificationDetailRequestInviteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NotificationDetailRequestInviteResponse is not found in the empty JSON string", NotificationDetailRequestInviteResponse.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("inResponseTo")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationDetailRequestInviteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationDetailRequestInviteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationDetailRequestInviteResponse is not found in the empty JSON string", NotificationDetailRequestInviteResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!NotificationDetailRequestInviteResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotificationDetailRequestInviteResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationDetailRequestInviteResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : NotificationDetailRequestInviteResponse.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("inResponseTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `inResponseTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inResponseTo").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `inResponseTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inResponseTo").toString())); } if ((jsonObj.get("requestMessage") != null && !jsonObj.get("requestMessage").isJsonNull()) && !jsonObj.get("requestMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `requestMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestMessage").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `requestMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestMessage").toString())); } } @@ -216,31 +205,31 @@ public void write(JsonWriter out, NotificationDetailRequestInviteResponse value) @Override public NotificationDetailRequestInviteResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotificationDetailRequestInviteResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotificationDetailRequestInviteResponse - * @throws IOException if the JSON string is invalid with respect to NotificationDetailRequestInviteResponse - */ + /** + * Create an instance of NotificationDetailRequestInviteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationDetailRequestInviteResponse + * @throws IOException if the JSON string is invalid with respect to NotificationDetailRequestInviteResponse + */ public static NotificationDetailRequestInviteResponse fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotificationDetailRequestInviteResponse.class); } - /** - * Convert an instance of NotificationDetailRequestInviteResponse to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotificationDetailRequestInviteResponse to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/NotificationDetailVoteToKick.java b/src/main/java/io/github/vrchatapi/model/NotificationDetailVoteToKick.java index bf44941e..3862815f 100644 --- a/src/main/java/io/github/vrchatapi/model/NotificationDetailVoteToKick.java +++ b/src/main/java/io/github/vrchatapi/model/NotificationDetailVoteToKick.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * NotificationDetailVoteToKick */ -@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 NotificationDetailVoteToKick { public static final String SERIALIZED_NAME_INITIATOR_USER_ID = "initiatorUserId"; @SerializedName(SERIALIZED_NAME_INITIATOR_USER_ID) + @javax.annotation.Nonnull private String initiatorUserId; public static final String SERIALIZED_NAME_USER_TO_KICK_ID = "userToKickId"; @SerializedName(SERIALIZED_NAME_USER_TO_KICK_ID) + @javax.annotation.Nonnull private String userToKickId; public NotificationDetailVoteToKick() { } - public NotificationDetailVoteToKick initiatorUserId(String initiatorUserId) { - + public NotificationDetailVoteToKick initiatorUserId(@javax.annotation.Nonnull String initiatorUserId) { this.initiatorUserId = initiatorUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return initiatorUserId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getInitiatorUserId() { return initiatorUserId; } - - public void setInitiatorUserId(String initiatorUserId) { + public void setInitiatorUserId(@javax.annotation.Nonnull String initiatorUserId) { this.initiatorUserId = initiatorUserId; } - public NotificationDetailVoteToKick userToKickId(String userToKickId) { - + public NotificationDetailVoteToKick userToKickId(@javax.annotation.Nonnull String userToKickId) { this.userToKickId = userToKickId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return userToKickId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getUserToKickId() { return userToKickId; } - - public void setUserToKickId(String userToKickId) { + public void setUserToKickId(@javax.annotation.Nonnull String userToKickId) { this.userToKickId = userToKickId; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,48 +143,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("initiatorUserId"); - openapiFields.add("userToKickId"); + openapiFields = new HashSet(Arrays.asList("initiatorUserId", "userToKickId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("initiatorUserId"); - openapiRequiredFields.add("userToKickId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotificationDetailVoteToKick - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NotificationDetailVoteToKick.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NotificationDetailVoteToKick is not found in the empty JSON string", NotificationDetailVoteToKick.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("initiatorUserId", "userToKickId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationDetailVoteToKick + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationDetailVoteToKick.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationDetailVoteToKick is not found in the empty JSON string", NotificationDetailVoteToKick.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!NotificationDetailVoteToKick.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotificationDetailVoteToKick` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationDetailVoteToKick` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : NotificationDetailVoteToKick.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("initiatorUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `initiatorUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("initiatorUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `initiatorUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("initiatorUserId").toString())); } if (!jsonObj.get("userToKickId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userToKickId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userToKickId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userToKickId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userToKickId").toString())); } } @@ -217,31 +205,31 @@ public void write(JsonWriter out, NotificationDetailVoteToKick value) throws IOE @Override public NotificationDetailVoteToKick read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotificationDetailVoteToKick given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotificationDetailVoteToKick - * @throws IOException if the JSON string is invalid with respect to NotificationDetailVoteToKick - */ + /** + * Create an instance of NotificationDetailVoteToKick given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationDetailVoteToKick + * @throws IOException if the JSON string is invalid with respect to NotificationDetailVoteToKick + */ public static NotificationDetailVoteToKick fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotificationDetailVoteToKick.class); } - /** - * Convert an instance of NotificationDetailVoteToKick to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotificationDetailVoteToKick to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/NotificationType.java b/src/main/java/io/github/vrchatapi/model/NotificationType.java index 8e66ef50..9b606b0c 100644 --- a/src/main/java/io/github/vrchatapi/model/NotificationType.java +++ b/src/main/java/io/github/vrchatapi/model/NotificationType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -30,17 +30,17 @@ public enum NotificationType { BOOP("boop"), - FRIENDREQUEST("friendRequest"), + FRIEND_REQUEST("friendRequest"), INVITE("invite"), - INVITERESPONSE("inviteResponse"), + INVITE_RESPONSE("inviteResponse"), MESSAGE("message"), - REQUESTINVITE("requestInvite"), + REQUEST_INVITE("requestInvite"), - REQUESTINVITERESPONSE("requestInviteResponse"), + REQUEST_INVITE_RESPONSE("requestInviteResponse"), VOTETOKICK("votetokick"); @@ -80,5 +80,10 @@ public NotificationType read(final JsonReader jsonReader) throws IOException { return NotificationType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + NotificationType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/NotificationV2.java b/src/main/java/io/github/vrchatapi/model/NotificationV2.java index 14562522..f5e6bae9 100644 --- a/src/main/java/io/github/vrchatapi/model/NotificationV2.java +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,23 +13,20 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import io.github.vrchatapi.model.NotificationV2Data; import io.github.vrchatapi.model.NotificationV2DetailsBoop; import io.github.vrchatapi.model.NotificationV2Response; import io.github.vrchatapi.model.NotificationV2Type; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; -import java.util.HashMap; +import java.util.Arrays; import java.util.List; -import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -42,13 +39,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -56,774 +55,687 @@ /** * */ -@ApiModel(description = "") -@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 NotificationV2 { public static final String SERIALIZED_NAME_CAN_DELETE = "canDelete"; @SerializedName(SERIALIZED_NAME_CAN_DELETE) + @javax.annotation.Nonnull private Boolean canDelete; public static final String SERIALIZED_NAME_CATEGORY = "category"; @SerializedName(SERIALIZED_NAME_CATEGORY) + @javax.annotation.Nonnull private String category; public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private Map data = new HashMap<>(); + @javax.annotation.Nonnull + private NotificationV2Data data; public static final String SERIALIZED_NAME_DETAILS = "details"; @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nullable private NotificationV2DetailsBoop details; public static final String SERIALIZED_NAME_EXPIRES_AT = "expiresAt"; @SerializedName(SERIALIZED_NAME_EXPIRES_AT) + @javax.annotation.Nonnull private OffsetDateTime expiresAt; public static final String SERIALIZED_NAME_EXPIRY_AFTER_SEEN = "expiryAfterSeen"; @SerializedName(SERIALIZED_NAME_EXPIRY_AFTER_SEEN) + @javax.annotation.Nullable private Integer expiryAfterSeen; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IGNORE_D_N_D = "ignoreDND"; @SerializedName(SERIALIZED_NAME_IGNORE_D_N_D) + @javax.annotation.Nonnull private Boolean ignoreDND; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_IS_SYSTEM = "isSystem"; @SerializedName(SERIALIZED_NAME_IS_SYSTEM) + @javax.annotation.Nonnull private Boolean isSystem; public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) + @javax.annotation.Nonnull private String link; public static final String SERIALIZED_NAME_LINK_TEXT = "linkText"; @SerializedName(SERIALIZED_NAME_LINK_TEXT) + @javax.annotation.Nonnull private String linkText; public static final String SERIALIZED_NAME_LINK_TEXT_KEY = "linkTextKey"; @SerializedName(SERIALIZED_NAME_LINK_TEXT_KEY) + @javax.annotation.Nullable private String linkTextKey; public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull private String message; public static final String SERIALIZED_NAME_MESSAGE_KEY = "messageKey"; @SerializedName(SERIALIZED_NAME_MESSAGE_KEY) + @javax.annotation.Nullable private String messageKey; public static final String SERIALIZED_NAME_RECEIVER_USER_ID = "receiverUserId"; @SerializedName(SERIALIZED_NAME_RECEIVER_USER_ID) + @javax.annotation.Nonnull private String receiverUserId; public static final String SERIALIZED_NAME_RELATED_NOTIFICATIONS_ID = "relatedNotificationsId"; @SerializedName(SERIALIZED_NAME_RELATED_NOTIFICATIONS_ID) + @javax.annotation.Nullable private String relatedNotificationsId; public static final String SERIALIZED_NAME_REQUIRE_SEEN = "requireSeen"; @SerializedName(SERIALIZED_NAME_REQUIRE_SEEN) + @javax.annotation.Nonnull private Boolean requireSeen; public static final String SERIALIZED_NAME_RESPONSES = "responses"; @SerializedName(SERIALIZED_NAME_RESPONSES) + @javax.annotation.Nonnull private List responses = new ArrayList<>(); public static final String SERIALIZED_NAME_SEEN = "seen"; @SerializedName(SERIALIZED_NAME_SEEN) + @javax.annotation.Nonnull private Boolean seen; public static final String SERIALIZED_NAME_SENDER_USER_ID = "senderUserId"; @SerializedName(SERIALIZED_NAME_SENDER_USER_ID) + @javax.annotation.Nonnull private String senderUserId; public static final String SERIALIZED_NAME_SENDER_USERNAME = "senderUsername"; @SerializedName(SERIALIZED_NAME_SENDER_USERNAME) + @javax.annotation.Nullable private String senderUsername; public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nonnull private String title; public static final String SERIALIZED_NAME_TITLE_KEY = "titleKey"; @SerializedName(SERIALIZED_NAME_TITLE_KEY) + @javax.annotation.Nullable private String titleKey; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private NotificationV2Type type = NotificationV2Type.GROUP_ANNOUNCEMENT; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nonnull private Integer version = 2; public NotificationV2() { } - public NotificationV2 canDelete(Boolean canDelete) { - + public NotificationV2 canDelete(@javax.annotation.Nonnull Boolean canDelete) { this.canDelete = canDelete; return this; } - /** + /** * Get canDelete * @return canDelete - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getCanDelete() { return canDelete; } - - public void setCanDelete(Boolean canDelete) { + public void setCanDelete(@javax.annotation.Nonnull Boolean canDelete) { this.canDelete = canDelete; } - public NotificationV2 category(String category) { - + public NotificationV2 category(@javax.annotation.Nonnull String category) { this.category = category; return this; } - /** + /** * Get category * @return category - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Event: value: event Group: value: social.group ", required = true, value = "") - public String getCategory() { return category; } - - public void setCategory(String category) { + public void setCategory(@javax.annotation.Nonnull String category) { this.category = category; } - public NotificationV2 createdAt(OffsetDateTime createdAt) { - + public NotificationV2 createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public NotificationV2 data(Map data) { - + public NotificationV2 data(@javax.annotation.Nonnull NotificationV2Data data) { this.data = data; return this; } - public NotificationV2 putDataItem(String key, String dataItem) { - this.data.put(key, dataItem); - return this; - } - - /** + /** * Get data * @return data - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public Map getData() { + public NotificationV2Data getData() { return data; } - - public void setData(Map data) { + public void setData(@javax.annotation.Nonnull NotificationV2Data data) { this.data = data; } - public NotificationV2 details(NotificationV2DetailsBoop details) { - + public NotificationV2 details(@javax.annotation.Nullable NotificationV2DetailsBoop details) { this.details = details; return this; } - /** + /** * Get details * @return details - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public NotificationV2DetailsBoop getDetails() { return details; } - - public void setDetails(NotificationV2DetailsBoop details) { + public void setDetails(@javax.annotation.Nullable NotificationV2DetailsBoop details) { this.details = details; } - public NotificationV2 expiresAt(OffsetDateTime expiresAt) { - + public NotificationV2 expiresAt(@javax.annotation.Nonnull OffsetDateTime expiresAt) { this.expiresAt = expiresAt; return this; } - /** + /** * Get expiresAt * @return expiresAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getExpiresAt() { return expiresAt; } - - public void setExpiresAt(OffsetDateTime expiresAt) { + public void setExpiresAt(@javax.annotation.Nonnull OffsetDateTime expiresAt) { this.expiresAt = expiresAt; } - public NotificationV2 expiryAfterSeen(Integer expiryAfterSeen) { - + public NotificationV2 expiryAfterSeen(@javax.annotation.Nullable Integer expiryAfterSeen) { this.expiryAfterSeen = expiryAfterSeen; return this; } - /** + /** * Get expiryAfterSeen * @return expiryAfterSeen - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public Integer getExpiryAfterSeen() { return expiryAfterSeen; } - - public void setExpiryAfterSeen(Integer expiryAfterSeen) { + public void setExpiryAfterSeen(@javax.annotation.Nullable Integer expiryAfterSeen) { this.expiryAfterSeen = expiryAfterSeen; } - public NotificationV2 id(String id) { - + public NotificationV2 id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public NotificationV2 ignoreDND(Boolean ignoreDND) { - + public NotificationV2 ignoreDND(@javax.annotation.Nonnull Boolean ignoreDND) { this.ignoreDND = ignoreDND; return this; } - /** + /** * Get ignoreDND * @return ignoreDND - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIgnoreDND() { return ignoreDND; } - - public void setIgnoreDND(Boolean ignoreDND) { + public void setIgnoreDND(@javax.annotation.Nonnull Boolean ignoreDND) { this.ignoreDND = ignoreDND; } - public NotificationV2 imageUrl(String imageUrl) { - + public NotificationV2 imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public NotificationV2 isSystem(Boolean isSystem) { - + public NotificationV2 isSystem(@javax.annotation.Nonnull Boolean isSystem) { this.isSystem = isSystem; return this; } - /** + /** * Get isSystem * @return isSystem - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsSystem() { return isSystem; } - - public void setIsSystem(Boolean isSystem) { + public void setIsSystem(@javax.annotation.Nonnull Boolean isSystem) { this.isSystem = isSystem; } - public NotificationV2 link(String link) { - + public NotificationV2 link(@javax.annotation.Nonnull String link) { this.link = link; return this; } - /** + /** * Get link * @return link - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "event:grp_00000000-0000-0000-0000-000000000000,cal_00000000-0000-0000-0000-000000000000", required = true, value = "") - public String getLink() { return link; } - - public void setLink(String link) { + public void setLink(@javax.annotation.Nonnull String link) { this.link = link; } - public NotificationV2 linkText(String linkText) { - + public NotificationV2 linkText(@javax.annotation.Nonnull String linkText) { this.linkText = linkText; return this; } - /** + /** * Get linkText * @return linkText - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getLinkText() { return linkText; } - - public void setLinkText(String linkText) { + public void setLinkText(@javax.annotation.Nonnull String linkText) { this.linkText = linkText; } - public NotificationV2 linkTextKey(String linkTextKey) { - + public NotificationV2 linkTextKey(@javax.annotation.Nullable String linkTextKey) { this.linkTextKey = linkTextKey; return this; } - /** + /** * Get linkTextKey * @return linkTextKey - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getLinkTextKey() { return linkTextKey; } - - public void setLinkTextKey(String linkTextKey) { + public void setLinkTextKey(@javax.annotation.Nullable String linkTextKey) { this.linkTextKey = linkTextKey; } - public NotificationV2 message(String message) { - + public NotificationV2 message(@javax.annotation.Nonnull String message) { this.message = message; return this; } - /** + /** * Get message * @return message - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getMessage() { return message; } - - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nonnull String message) { this.message = message; } - public NotificationV2 messageKey(String messageKey) { - + public NotificationV2 messageKey(@javax.annotation.Nullable String messageKey) { this.messageKey = messageKey; return this; } - /** + /** * Get messageKey * @return messageKey - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getMessageKey() { return messageKey; } - - public void setMessageKey(String messageKey) { + public void setMessageKey(@javax.annotation.Nullable String messageKey) { this.messageKey = messageKey; } - public NotificationV2 receiverUserId(String receiverUserId) { - + public NotificationV2 receiverUserId(@javax.annotation.Nonnull String receiverUserId) { this.receiverUserId = receiverUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return receiverUserId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getReceiverUserId() { return receiverUserId; } - - public void setReceiverUserId(String receiverUserId) { + public void setReceiverUserId(@javax.annotation.Nonnull String receiverUserId) { this.receiverUserId = receiverUserId; } - public NotificationV2 relatedNotificationsId(String relatedNotificationsId) { - + public NotificationV2 relatedNotificationsId(@javax.annotation.Nullable String relatedNotificationsId) { this.relatedNotificationsId = relatedNotificationsId; return this; } - /** + /** * Get relatedNotificationsId * @return relatedNotificationsId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "cal_00000000-0000-0000-0000-000000000000", required = true, value = "") - public String getRelatedNotificationsId() { return relatedNotificationsId; } - - public void setRelatedNotificationsId(String relatedNotificationsId) { + public void setRelatedNotificationsId(@javax.annotation.Nullable String relatedNotificationsId) { this.relatedNotificationsId = relatedNotificationsId; } - public NotificationV2 requireSeen(Boolean requireSeen) { - + public NotificationV2 requireSeen(@javax.annotation.Nonnull Boolean requireSeen) { this.requireSeen = requireSeen; return this; } - /** + /** * Get requireSeen * @return requireSeen - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getRequireSeen() { return requireSeen; } - - public void setRequireSeen(Boolean requireSeen) { + public void setRequireSeen(@javax.annotation.Nonnull Boolean requireSeen) { this.requireSeen = requireSeen; } - public NotificationV2 responses(List responses) { - + public NotificationV2 responses(@javax.annotation.Nonnull List responses) { this.responses = responses; return this; } public NotificationV2 addResponsesItem(NotificationV2Response responsesItem) { + if (this.responses == null) { + this.responses = new ArrayList<>(); + } this.responses.add(responsesItem); return this; } - /** + /** * Get responses * @return responses - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getResponses() { return responses; } - - public void setResponses(List responses) { + public void setResponses(@javax.annotation.Nonnull List responses) { this.responses = responses; } - public NotificationV2 seen(Boolean seen) { - + public NotificationV2 seen(@javax.annotation.Nonnull Boolean seen) { this.seen = seen; return this; } - /** + /** * Get seen * @return seen - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getSeen() { return seen; } - - public void setSeen(Boolean seen) { + public void setSeen(@javax.annotation.Nonnull Boolean seen) { this.seen = seen; } - public NotificationV2 senderUserId(String senderUserId) { - + public NotificationV2 senderUserId(@javax.annotation.Nonnull String senderUserId) { this.senderUserId = senderUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return senderUserId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getSenderUserId() { return senderUserId; } - - public void setSenderUserId(String senderUserId) { + public void setSenderUserId(@javax.annotation.Nonnull String senderUserId) { this.senderUserId = senderUserId; } - public NotificationV2 senderUsername(String senderUsername) { - + public NotificationV2 senderUsername(@javax.annotation.Nullable String senderUsername) { this.senderUsername = senderUsername; return this; } - /** + /** * Get senderUsername * @return senderUsername - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getSenderUsername() { return senderUsername; } - - public void setSenderUsername(String senderUsername) { + public void setSenderUsername(@javax.annotation.Nullable String senderUsername) { this.senderUsername = senderUsername; } - public NotificationV2 title(String title) { - + public NotificationV2 title(@javax.annotation.Nonnull String title) { this.title = title; return this; } - /** + /** * Get title * @return title - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getTitle() { return title; } - - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nonnull String title) { this.title = title; } - public NotificationV2 titleKey(String titleKey) { - + public NotificationV2 titleKey(@javax.annotation.Nullable String titleKey) { this.titleKey = titleKey; return this; } - /** + /** * Get titleKey * @return titleKey - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getTitleKey() { return titleKey; } - - public void setTitleKey(String titleKey) { + public void setTitleKey(@javax.annotation.Nullable String titleKey) { this.titleKey = titleKey; } - public NotificationV2 type(NotificationV2Type type) { - + public NotificationV2 type(@javax.annotation.Nonnull NotificationV2Type type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public NotificationV2Type getType() { return type; } - - public void setType(NotificationV2Type type) { + public void setType(@javax.annotation.Nonnull NotificationV2Type type) { this.type = type; } - public NotificationV2 updatedAt(OffsetDateTime updatedAt) { - + public NotificationV2 updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public NotificationV2 version(Integer version) { - + public NotificationV2 version(@javax.annotation.Nonnull Integer version) { this.version = version; return this; } - /** + /** * Get version * @return version - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nonnull Integer version) { this.version = version; } @@ -925,10 +837,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -937,149 +846,100 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("canDelete"); - openapiFields.add("category"); - openapiFields.add("createdAt"); - openapiFields.add("data"); - openapiFields.add("details"); - openapiFields.add("expiresAt"); - openapiFields.add("expiryAfterSeen"); - openapiFields.add("id"); - openapiFields.add("ignoreDND"); - openapiFields.add("imageUrl"); - openapiFields.add("isSystem"); - openapiFields.add("link"); - openapiFields.add("linkText"); - openapiFields.add("linkTextKey"); - openapiFields.add("message"); - openapiFields.add("messageKey"); - openapiFields.add("receiverUserId"); - openapiFields.add("relatedNotificationsId"); - openapiFields.add("requireSeen"); - openapiFields.add("responses"); - openapiFields.add("seen"); - openapiFields.add("senderUserId"); - openapiFields.add("senderUsername"); - openapiFields.add("title"); - openapiFields.add("titleKey"); - openapiFields.add("type"); - openapiFields.add("updatedAt"); - openapiFields.add("version"); + openapiFields = new HashSet(Arrays.asList("canDelete", "category", "createdAt", "data", "details", "expiresAt", "expiryAfterSeen", "id", "ignoreDND", "imageUrl", "isSystem", "link", "linkText", "linkTextKey", "message", "messageKey", "receiverUserId", "relatedNotificationsId", "requireSeen", "responses", "seen", "senderUserId", "senderUsername", "title", "titleKey", "type", "updatedAt", "version")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("canDelete"); - openapiRequiredFields.add("category"); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("expiresAt"); - openapiRequiredFields.add("expiryAfterSeen"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("ignoreDND"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("isSystem"); - openapiRequiredFields.add("link"); - openapiRequiredFields.add("linkText"); - openapiRequiredFields.add("linkTextKey"); - openapiRequiredFields.add("message"); - openapiRequiredFields.add("receiverUserId"); - openapiRequiredFields.add("relatedNotificationsId"); - openapiRequiredFields.add("requireSeen"); - openapiRequiredFields.add("responses"); - openapiRequiredFields.add("seen"); - openapiRequiredFields.add("senderUserId"); - openapiRequiredFields.add("senderUsername"); - openapiRequiredFields.add("title"); - openapiRequiredFields.add("titleKey"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("updatedAt"); - openapiRequiredFields.add("version"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotificationV2 - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NotificationV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NotificationV2 is not found in the empty JSON string", NotificationV2.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("canDelete", "category", "createdAt", "data", "expiresAt", "expiryAfterSeen", "id", "ignoreDND", "imageUrl", "isSystem", "link", "linkText", "linkTextKey", "message", "receiverUserId", "relatedNotificationsId", "requireSeen", "responses", "seen", "senderUserId", "senderUsername", "title", "titleKey", "type", "updatedAt", "version")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationV2 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationV2 is not found in the empty JSON string", NotificationV2.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!NotificationV2.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotificationV2` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationV2` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : NotificationV2.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("category").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); } + // validate the required field `data` + NotificationV2Data.validateJsonElement(jsonObj.get("data")); // validate the optional field `details` if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { - NotificationV2DetailsBoop.validateJsonObject(jsonObj.getAsJsonObject("details")); + NotificationV2DetailsBoop.validateJsonElement(jsonObj.get("details")); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("link").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `link` to be a primitive type in the JSON string but got `%s`", jsonObj.get("link").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `link` to be a primitive type in the JSON string but got `%s`", jsonObj.get("link").toString())); } if (!jsonObj.get("linkText").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `linkText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linkText").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `linkText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linkText").toString())); } - if (!jsonObj.get("linkTextKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `linkTextKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linkTextKey").toString())); + if ((jsonObj.get("linkTextKey") != null && !jsonObj.get("linkTextKey").isJsonNull()) && !jsonObj.get("linkTextKey").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `linkTextKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("linkTextKey").toString())); } if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } if ((jsonObj.get("messageKey") != null && !jsonObj.get("messageKey").isJsonNull()) && !jsonObj.get("messageKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `messageKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageKey").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `messageKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageKey").toString())); } if (!jsonObj.get("receiverUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `receiverUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `receiverUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverUserId").toString())); } - if (!jsonObj.get("relatedNotificationsId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `relatedNotificationsId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("relatedNotificationsId").toString())); + if ((jsonObj.get("relatedNotificationsId") != null && !jsonObj.get("relatedNotificationsId").isJsonNull()) && !jsonObj.get("relatedNotificationsId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `relatedNotificationsId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("relatedNotificationsId").toString())); } - // ensure the json data is an array - if (!jsonObj.get("responses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `responses` to be an array in the JSON string but got `%s`", jsonObj.get("responses").toString())); + if (jsonObj.get("responses") != null) { + if (!jsonObj.get("responses").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `responses` to be an array in the JSON string but got `%s`", jsonObj.get("responses").toString())); + } + JsonArray jsonArrayresponses = jsonObj.getAsJsonArray("responses"); + // validate the required field `responses` (array) + for (int i = 0; i < jsonArrayresponses.size(); i++) { + NotificationV2Response.validateJsonElement(jsonArrayresponses.get(i)); + } } - - JsonArray jsonArrayresponses = jsonObj.getAsJsonArray("responses"); - // validate the required field `responses` (array) - for (int i = 0; i < jsonArrayresponses.size(); i++) { - NotificationV2Response.validateJsonObject(jsonArrayresponses.get(i).getAsJsonObject()); - }; if (!jsonObj.get("senderUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `senderUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `senderUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUserId").toString())); } - if (!jsonObj.get("senderUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `senderUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUsername").toString())); + if ((jsonObj.get("senderUsername") != null && !jsonObj.get("senderUsername").isJsonNull()) && !jsonObj.get("senderUsername").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `senderUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUsername").toString())); } if (!jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } - if (!jsonObj.get("titleKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `titleKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("titleKey").toString())); + if ((jsonObj.get("titleKey") != null && !jsonObj.get("titleKey").isJsonNull()) && !jsonObj.get("titleKey").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `titleKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("titleKey").toString())); } + // validate the required field `type` + NotificationV2Type.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -1102,31 +962,31 @@ public void write(JsonWriter out, NotificationV2 value) throws IOException { @Override public NotificationV2 read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotificationV2 given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotificationV2 - * @throws IOException if the JSON string is invalid with respect to NotificationV2 - */ + /** + * Create an instance of NotificationV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationV2 + * @throws IOException if the JSON string is invalid with respect to NotificationV2 + */ public static NotificationV2 fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotificationV2.class); } - /** - * Convert an instance of NotificationV2 to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotificationV2 to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/NotificationV2Data.java b/src/main/java/io/github/vrchatapi/model/NotificationV2Data.java new file mode 100644 index 00000000..ec78a2b8 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2Data.java @@ -0,0 +1,509 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.github.vrchatapi.model.NotificationV2DataBadgeEarned; +import io.github.vrchatapi.model.NotificationV2DataBoop; +import io.github.vrchatapi.model.NotificationV2DataEventAnnouncement; +import io.github.vrchatapi.model.NotificationV2DataGroupAnnouncement; +import io.github.vrchatapi.model.NotificationV2DataGroupInformative; +import io.github.vrchatapi.model.NotificationV2DataGroupTransfer; +import java.io.IOException; +import java.util.Arrays; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import io.github.vrchatapi.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class NotificationV2Data extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(NotificationV2Data.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationV2Data.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationV2Data' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterObject = gson.getDelegateAdapter(this, TypeToken.get(Object.class)); + final TypeAdapter adapterNotificationV2DataBadgeEarned = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataBadgeEarned.class)); + final TypeAdapter adapterNotificationV2DataBoop = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataBoop.class)); + final TypeAdapter adapterNotificationV2DataEventAnnouncement = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataEventAnnouncement.class)); + final TypeAdapter adapterNotificationV2DataGroupAnnouncement = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataGroupAnnouncement.class)); + final TypeAdapter adapterNotificationV2DataGroupInformative = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataGroupInformative.class)); + final TypeAdapter adapterNotificationV2DataGroupTransfer = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataGroupTransfer.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationV2Data value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Object` + if (value.getActualInstance() instanceof Object) { + JsonPrimitive primitive = adapterObject.toJsonTree((Object)value.getActualInstance()).getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `NotificationV2DataBadgeEarned` + if (value.getActualInstance() instanceof NotificationV2DataBadgeEarned) { + JsonElement element = adapterNotificationV2DataBadgeEarned.toJsonTree((NotificationV2DataBadgeEarned)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NotificationV2DataBoop` + if (value.getActualInstance() instanceof NotificationV2DataBoop) { + JsonElement element = adapterNotificationV2DataBoop.toJsonTree((NotificationV2DataBoop)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NotificationV2DataEventAnnouncement` + if (value.getActualInstance() instanceof NotificationV2DataEventAnnouncement) { + JsonElement element = adapterNotificationV2DataEventAnnouncement.toJsonTree((NotificationV2DataEventAnnouncement)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NotificationV2DataGroupAnnouncement` + if (value.getActualInstance() instanceof NotificationV2DataGroupAnnouncement) { + JsonElement element = adapterNotificationV2DataGroupAnnouncement.toJsonTree((NotificationV2DataGroupAnnouncement)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NotificationV2DataGroupInformative` + if (value.getActualInstance() instanceof NotificationV2DataGroupInformative) { + JsonElement element = adapterNotificationV2DataGroupInformative.toJsonTree((NotificationV2DataGroupInformative)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NotificationV2DataGroupTransfer` + if (value.getActualInstance() instanceof NotificationV2DataGroupTransfer) { + JsonElement element = adapterNotificationV2DataGroupTransfer.toJsonTree((NotificationV2DataGroupTransfer)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: NotificationV2DataBadgeEarned, NotificationV2DataBoop, NotificationV2DataEventAnnouncement, NotificationV2DataGroupAnnouncement, NotificationV2DataGroupInformative, NotificationV2DataGroupTransfer, Object"); + } + + @Override + public NotificationV2Data read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Object + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + actualAdapter = adapterObject; + match++; + log.log(Level.FINER, "Input data matches schema 'Object'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for Object failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Object'", e); + } + // deserialize NotificationV2DataBadgeEarned + try { + // validate the JSON object to see if any exception is thrown + NotificationV2DataBadgeEarned.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationV2DataBadgeEarned; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationV2DataBadgeEarned'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataBadgeEarned failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationV2DataBadgeEarned'", e); + } + // deserialize NotificationV2DataBoop + try { + // validate the JSON object to see if any exception is thrown + NotificationV2DataBoop.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationV2DataBoop; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationV2DataBoop'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataBoop failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationV2DataBoop'", e); + } + // deserialize NotificationV2DataEventAnnouncement + try { + // validate the JSON object to see if any exception is thrown + NotificationV2DataEventAnnouncement.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationV2DataEventAnnouncement; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationV2DataEventAnnouncement'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataEventAnnouncement failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationV2DataEventAnnouncement'", e); + } + // deserialize NotificationV2DataGroupAnnouncement + try { + // validate the JSON object to see if any exception is thrown + NotificationV2DataGroupAnnouncement.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationV2DataGroupAnnouncement; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationV2DataGroupAnnouncement'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataGroupAnnouncement failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationV2DataGroupAnnouncement'", e); + } + // deserialize NotificationV2DataGroupInformative + try { + // validate the JSON object to see if any exception is thrown + NotificationV2DataGroupInformative.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationV2DataGroupInformative; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationV2DataGroupInformative'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataGroupInformative failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationV2DataGroupInformative'", e); + } + // deserialize NotificationV2DataGroupTransfer + try { + // validate the JSON object to see if any exception is thrown + NotificationV2DataGroupTransfer.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationV2DataGroupTransfer; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationV2DataGroupTransfer'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataGroupTransfer failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationV2DataGroupTransfer'", e); + } + + if (match == 1) { + NotificationV2Data ret = new NotificationV2Data(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format(java.util.Locale.ROOT, "Failed deserialization for NotificationV2Data: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public NotificationV2Data() { + super("oneOf", Boolean.FALSE); + } + + public NotificationV2Data(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Object", Object.class); + schemas.put("NotificationV2DataBadgeEarned", NotificationV2DataBadgeEarned.class); + schemas.put("NotificationV2DataBoop", NotificationV2DataBoop.class); + schemas.put("NotificationV2DataEventAnnouncement", NotificationV2DataEventAnnouncement.class); + schemas.put("NotificationV2DataGroupAnnouncement", NotificationV2DataGroupAnnouncement.class); + schemas.put("NotificationV2DataGroupInformative", NotificationV2DataGroupInformative.class); + schemas.put("NotificationV2DataGroupTransfer", NotificationV2DataGroupTransfer.class); + } + + @Override + public Map> getSchemas() { + return NotificationV2Data.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * NotificationV2DataBadgeEarned, NotificationV2DataBoop, NotificationV2DataEventAnnouncement, NotificationV2DataGroupAnnouncement, NotificationV2DataGroupInformative, NotificationV2DataGroupTransfer, Object + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Object) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationV2DataBadgeEarned) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationV2DataBoop) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationV2DataEventAnnouncement) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationV2DataGroupAnnouncement) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationV2DataGroupInformative) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationV2DataGroupTransfer) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be NotificationV2DataBadgeEarned, NotificationV2DataBoop, NotificationV2DataEventAnnouncement, NotificationV2DataGroupAnnouncement, NotificationV2DataGroupInformative, NotificationV2DataGroupTransfer, Object"); + } + + /** + * Get the actual instance, which can be the following: + * NotificationV2DataBadgeEarned, NotificationV2DataBoop, NotificationV2DataEventAnnouncement, NotificationV2DataGroupAnnouncement, NotificationV2DataGroupInformative, NotificationV2DataGroupTransfer, Object + * + * @return The actual instance (NotificationV2DataBadgeEarned, NotificationV2DataBoop, NotificationV2DataEventAnnouncement, NotificationV2DataGroupAnnouncement, NotificationV2DataGroupInformative, NotificationV2DataGroupTransfer, Object) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Object`. If the actual instance is not `Object`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Object` + * @throws ClassCastException if the instance is not `Object` + */ + @SuppressWarnings("unchecked") + public Object getObject() throws ClassCastException { + return (Object)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationV2DataBadgeEarned`. If the actual instance is not `NotificationV2DataBadgeEarned`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationV2DataBadgeEarned` + * @throws ClassCastException if the instance is not `NotificationV2DataBadgeEarned` + */ + @SuppressWarnings("unchecked") + public NotificationV2DataBadgeEarned getNotificationV2DataBadgeEarned() throws ClassCastException { + return (NotificationV2DataBadgeEarned)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationV2DataBoop`. If the actual instance is not `NotificationV2DataBoop`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationV2DataBoop` + * @throws ClassCastException if the instance is not `NotificationV2DataBoop` + */ + @SuppressWarnings("unchecked") + public NotificationV2DataBoop getNotificationV2DataBoop() throws ClassCastException { + return (NotificationV2DataBoop)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationV2DataEventAnnouncement`. If the actual instance is not `NotificationV2DataEventAnnouncement`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationV2DataEventAnnouncement` + * @throws ClassCastException if the instance is not `NotificationV2DataEventAnnouncement` + */ + @SuppressWarnings("unchecked") + public NotificationV2DataEventAnnouncement getNotificationV2DataEventAnnouncement() throws ClassCastException { + return (NotificationV2DataEventAnnouncement)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationV2DataGroupAnnouncement`. If the actual instance is not `NotificationV2DataGroupAnnouncement`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationV2DataGroupAnnouncement` + * @throws ClassCastException if the instance is not `NotificationV2DataGroupAnnouncement` + */ + @SuppressWarnings("unchecked") + public NotificationV2DataGroupAnnouncement getNotificationV2DataGroupAnnouncement() throws ClassCastException { + return (NotificationV2DataGroupAnnouncement)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationV2DataGroupInformative`. If the actual instance is not `NotificationV2DataGroupInformative`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationV2DataGroupInformative` + * @throws ClassCastException if the instance is not `NotificationV2DataGroupInformative` + */ + @SuppressWarnings("unchecked") + public NotificationV2DataGroupInformative getNotificationV2DataGroupInformative() throws ClassCastException { + return (NotificationV2DataGroupInformative)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationV2DataGroupTransfer`. If the actual instance is not `NotificationV2DataGroupTransfer`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationV2DataGroupTransfer` + * @throws ClassCastException if the instance is not `NotificationV2DataGroupTransfer` + */ + @SuppressWarnings("unchecked") + public NotificationV2DataGroupTransfer getNotificationV2DataGroupTransfer() throws ClassCastException { + return (NotificationV2DataGroupTransfer)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationV2Data + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Object + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for Object failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationV2DataBadgeEarned + try { + NotificationV2DataBadgeEarned.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataBadgeEarned failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationV2DataBoop + try { + NotificationV2DataBoop.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataBoop failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationV2DataEventAnnouncement + try { + NotificationV2DataEventAnnouncement.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataEventAnnouncement failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationV2DataGroupAnnouncement + try { + NotificationV2DataGroupAnnouncement.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataGroupAnnouncement failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationV2DataGroupInformative + try { + NotificationV2DataGroupInformative.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataGroupInformative failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationV2DataGroupTransfer + try { + NotificationV2DataGroupTransfer.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationV2DataGroupTransfer failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format(java.util.Locale.ROOT, "The JSON string is invalid for NotificationV2Data with oneOf schemas: NotificationV2DataBadgeEarned, NotificationV2DataBoop, NotificationV2DataEventAnnouncement, NotificationV2DataGroupAnnouncement, NotificationV2DataGroupInformative, NotificationV2DataGroupTransfer, Object. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of NotificationV2Data given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationV2Data + * @throws IOException if the JSON string is invalid with respect to NotificationV2Data + */ + public static NotificationV2Data fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NotificationV2Data.class); + } + + /** + * Convert an instance of NotificationV2Data to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/NotificationV2DataBadgeEarned.java b/src/main/java/io/github/vrchatapi/model/NotificationV2DataBadgeEarned.java new file mode 100644 index 00000000..d10c48a8 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2DataBadgeEarned.java @@ -0,0 +1,266 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * NotificationV2DataBadgeEarned + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class NotificationV2DataBadgeEarned { + public static final String SERIALIZED_NAME_BADGE_DESCRIPTION = "badgeDescription"; + @SerializedName(SERIALIZED_NAME_BADGE_DESCRIPTION) + @javax.annotation.Nonnull + private String badgeDescription; + + public static final String SERIALIZED_NAME_BADGE_ID = "badgeId"; + @SerializedName(SERIALIZED_NAME_BADGE_ID) + @javax.annotation.Nonnull + private String badgeId; + + public static final String SERIALIZED_NAME_BADGE_NAME = "badgeName"; + @SerializedName(SERIALIZED_NAME_BADGE_NAME) + @javax.annotation.Nonnull + private String badgeName; + + public NotificationV2DataBadgeEarned() { + } + + public NotificationV2DataBadgeEarned badgeDescription(@javax.annotation.Nonnull String badgeDescription) { + this.badgeDescription = badgeDescription; + return this; + } + + /** + * Get badgeDescription + * @return badgeDescription + */ + @javax.annotation.Nonnull + public String getBadgeDescription() { + return badgeDescription; + } + + public void setBadgeDescription(@javax.annotation.Nonnull String badgeDescription) { + this.badgeDescription = badgeDescription; + } + + + public NotificationV2DataBadgeEarned badgeId(@javax.annotation.Nonnull String badgeId) { + this.badgeId = badgeId; + return this; + } + + /** + * Get badgeId + * @return badgeId + */ + @javax.annotation.Nonnull + public String getBadgeId() { + return badgeId; + } + + public void setBadgeId(@javax.annotation.Nonnull String badgeId) { + this.badgeId = badgeId; + } + + + public NotificationV2DataBadgeEarned badgeName(@javax.annotation.Nonnull String badgeName) { + this.badgeName = badgeName; + return this; + } + + /** + * Get badgeName + * @return badgeName + */ + @javax.annotation.Nonnull + public String getBadgeName() { + return badgeName; + } + + public void setBadgeName(@javax.annotation.Nonnull String badgeName) { + this.badgeName = badgeName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationV2DataBadgeEarned notificationV2DataBadgeEarned = (NotificationV2DataBadgeEarned) o; + return Objects.equals(this.badgeDescription, notificationV2DataBadgeEarned.badgeDescription) && + Objects.equals(this.badgeId, notificationV2DataBadgeEarned.badgeId) && + Objects.equals(this.badgeName, notificationV2DataBadgeEarned.badgeName); + } + + @Override + public int hashCode() { + return Objects.hash(badgeDescription, badgeId, badgeName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationV2DataBadgeEarned {\n"); + sb.append(" badgeDescription: ").append(toIndentedString(badgeDescription)).append("\n"); + sb.append(" badgeId: ").append(toIndentedString(badgeId)).append("\n"); + sb.append(" badgeName: ").append(toIndentedString(badgeName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("badgeDescription", "badgeId", "badgeName")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("badgeDescription", "badgeId", "badgeName")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationV2DataBadgeEarned + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationV2DataBadgeEarned.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationV2DataBadgeEarned is not found in the empty JSON string", NotificationV2DataBadgeEarned.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationV2DataBadgeEarned.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationV2DataBadgeEarned` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NotificationV2DataBadgeEarned.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("badgeDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badgeDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("badgeDescription").toString())); + } + if (!jsonObj.get("badgeId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badgeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("badgeId").toString())); + } + if (!jsonObj.get("badgeName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badgeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("badgeName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationV2DataBadgeEarned.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationV2DataBadgeEarned' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataBadgeEarned.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationV2DataBadgeEarned value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationV2DataBadgeEarned read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NotificationV2DataBadgeEarned given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationV2DataBadgeEarned + * @throws IOException if the JSON string is invalid with respect to NotificationV2DataBadgeEarned + */ + public static NotificationV2DataBadgeEarned fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NotificationV2DataBadgeEarned.class); + } + + /** + * Convert an instance of NotificationV2DataBadgeEarned to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/NotificationV2DataBoop.java b/src/main/java/io/github/vrchatapi/model/NotificationV2DataBoop.java new file mode 100644 index 00000000..dd5abee6 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2DataBoop.java @@ -0,0 +1,208 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * NotificationV2DataBoop + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class NotificationV2DataBoop { + public static final String SERIALIZED_NAME_BOOPING_USER_DISPLAY_NAME = "boopingUserDisplayName"; + @SerializedName(SERIALIZED_NAME_BOOPING_USER_DISPLAY_NAME) + @javax.annotation.Nonnull + private String boopingUserDisplayName; + + public NotificationV2DataBoop() { + } + + public NotificationV2DataBoop boopingUserDisplayName(@javax.annotation.Nonnull String boopingUserDisplayName) { + this.boopingUserDisplayName = boopingUserDisplayName; + return this; + } + + /** + * Get boopingUserDisplayName + * @return boopingUserDisplayName + */ + @javax.annotation.Nonnull + public String getBoopingUserDisplayName() { + return boopingUserDisplayName; + } + + public void setBoopingUserDisplayName(@javax.annotation.Nonnull String boopingUserDisplayName) { + this.boopingUserDisplayName = boopingUserDisplayName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationV2DataBoop notificationV2DataBoop = (NotificationV2DataBoop) o; + return Objects.equals(this.boopingUserDisplayName, notificationV2DataBoop.boopingUserDisplayName); + } + + @Override + public int hashCode() { + return Objects.hash(boopingUserDisplayName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationV2DataBoop {\n"); + sb.append(" boopingUserDisplayName: ").append(toIndentedString(boopingUserDisplayName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("boopingUserDisplayName")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("boopingUserDisplayName")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationV2DataBoop + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationV2DataBoop.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationV2DataBoop is not found in the empty JSON string", NotificationV2DataBoop.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationV2DataBoop.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationV2DataBoop` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NotificationV2DataBoop.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("boopingUserDisplayName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `boopingUserDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("boopingUserDisplayName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationV2DataBoop.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationV2DataBoop' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataBoop.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationV2DataBoop value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationV2DataBoop read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NotificationV2DataBoop given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationV2DataBoop + * @throws IOException if the JSON string is invalid with respect to NotificationV2DataBoop + */ + public static NotificationV2DataBoop fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NotificationV2DataBoop.class); + } + + /** + * Convert an instance of NotificationV2DataBoop to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/NotificationV2DataEventAnnouncement.java b/src/main/java/io/github/vrchatapi/model/NotificationV2DataEventAnnouncement.java new file mode 100644 index 00000000..df796310 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2DataEventAnnouncement.java @@ -0,0 +1,266 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * NotificationV2DataEventAnnouncement + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class NotificationV2DataEventAnnouncement { + public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; + @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nonnull + private String ownerId; + + public static final String SERIALIZED_NAME_OWNER_NAME = "ownerName"; + @SerializedName(SERIALIZED_NAME_OWNER_NAME) + @javax.annotation.Nonnull + private String ownerName; + + public static final String SERIALIZED_NAME_TITLE = "title"; + @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nonnull + private String title; + + public NotificationV2DataEventAnnouncement() { + } + + public NotificationV2DataEventAnnouncement ownerId(@javax.annotation.Nonnull String ownerId) { + this.ownerId = ownerId; + return this; + } + + /** + * Get ownerId + * @return ownerId + */ + @javax.annotation.Nonnull + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nonnull String ownerId) { + this.ownerId = ownerId; + } + + + public NotificationV2DataEventAnnouncement ownerName(@javax.annotation.Nonnull String ownerName) { + this.ownerName = ownerName; + return this; + } + + /** + * Get ownerName + * @return ownerName + */ + @javax.annotation.Nonnull + public String getOwnerName() { + return ownerName; + } + + public void setOwnerName(@javax.annotation.Nonnull String ownerName) { + this.ownerName = ownerName; + } + + + public NotificationV2DataEventAnnouncement title(@javax.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + */ + @javax.annotation.Nonnull + public String getTitle() { + return title; + } + + public void setTitle(@javax.annotation.Nonnull String title) { + this.title = title; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationV2DataEventAnnouncement notificationV2DataEventAnnouncement = (NotificationV2DataEventAnnouncement) o; + return Objects.equals(this.ownerId, notificationV2DataEventAnnouncement.ownerId) && + Objects.equals(this.ownerName, notificationV2DataEventAnnouncement.ownerName) && + Objects.equals(this.title, notificationV2DataEventAnnouncement.title); + } + + @Override + public int hashCode() { + return Objects.hash(ownerId, ownerName, title); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationV2DataEventAnnouncement {\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("ownerId", "ownerName", "title")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("ownerId", "ownerName", "title")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationV2DataEventAnnouncement + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationV2DataEventAnnouncement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationV2DataEventAnnouncement is not found in the empty JSON string", NotificationV2DataEventAnnouncement.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationV2DataEventAnnouncement.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationV2DataEventAnnouncement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NotificationV2DataEventAnnouncement.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("ownerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + } + if (!jsonObj.get("ownerName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerName").toString())); + } + if (!jsonObj.get("title").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationV2DataEventAnnouncement.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationV2DataEventAnnouncement' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataEventAnnouncement.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationV2DataEventAnnouncement value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationV2DataEventAnnouncement read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NotificationV2DataEventAnnouncement given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationV2DataEventAnnouncement + * @throws IOException if the JSON string is invalid with respect to NotificationV2DataEventAnnouncement + */ + public static NotificationV2DataEventAnnouncement fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NotificationV2DataEventAnnouncement.class); + } + + /** + * Convert an instance of NotificationV2DataEventAnnouncement to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupAnnouncement.java b/src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupAnnouncement.java new file mode 100644 index 00000000..c38cf9e9 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupAnnouncement.java @@ -0,0 +1,266 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * NotificationV2DataGroupAnnouncement + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class NotificationV2DataGroupAnnouncement { + public static final String SERIALIZED_NAME_ANNOUNCEMENT_TITLE = "announcementTitle"; + @SerializedName(SERIALIZED_NAME_ANNOUNCEMENT_TITLE) + @javax.annotation.Nonnull + private String announcementTitle; + + public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; + @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nonnull + private String groupId; + + public static final String SERIALIZED_NAME_GROUP_NAME = "groupName"; + @SerializedName(SERIALIZED_NAME_GROUP_NAME) + @javax.annotation.Nonnull + private String groupName; + + public NotificationV2DataGroupAnnouncement() { + } + + public NotificationV2DataGroupAnnouncement announcementTitle(@javax.annotation.Nonnull String announcementTitle) { + this.announcementTitle = announcementTitle; + return this; + } + + /** + * Get announcementTitle + * @return announcementTitle + */ + @javax.annotation.Nonnull + public String getAnnouncementTitle() { + return announcementTitle; + } + + public void setAnnouncementTitle(@javax.annotation.Nonnull String announcementTitle) { + this.announcementTitle = announcementTitle; + } + + + public NotificationV2DataGroupAnnouncement groupId(@javax.annotation.Nonnull String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nonnull + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nonnull String groupId) { + this.groupId = groupId; + } + + + public NotificationV2DataGroupAnnouncement groupName(@javax.annotation.Nonnull String groupName) { + this.groupName = groupName; + return this; + } + + /** + * Get groupName + * @return groupName + */ + @javax.annotation.Nonnull + public String getGroupName() { + return groupName; + } + + public void setGroupName(@javax.annotation.Nonnull String groupName) { + this.groupName = groupName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationV2DataGroupAnnouncement notificationV2DataGroupAnnouncement = (NotificationV2DataGroupAnnouncement) o; + return Objects.equals(this.announcementTitle, notificationV2DataGroupAnnouncement.announcementTitle) && + Objects.equals(this.groupId, notificationV2DataGroupAnnouncement.groupId) && + Objects.equals(this.groupName, notificationV2DataGroupAnnouncement.groupName); + } + + @Override + public int hashCode() { + return Objects.hash(announcementTitle, groupId, groupName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationV2DataGroupAnnouncement {\n"); + sb.append(" announcementTitle: ").append(toIndentedString(announcementTitle)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("announcementTitle", "groupId", "groupName")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("announcementTitle", "groupId", "groupName")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationV2DataGroupAnnouncement + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationV2DataGroupAnnouncement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationV2DataGroupAnnouncement is not found in the empty JSON string", NotificationV2DataGroupAnnouncement.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationV2DataGroupAnnouncement.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationV2DataGroupAnnouncement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NotificationV2DataGroupAnnouncement.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("announcementTitle").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `announcementTitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("announcementTitle").toString())); + } + if (!jsonObj.get("groupId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + } + if (!jsonObj.get("groupName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationV2DataGroupAnnouncement.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationV2DataGroupAnnouncement' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataGroupAnnouncement.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationV2DataGroupAnnouncement value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationV2DataGroupAnnouncement read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NotificationV2DataGroupAnnouncement given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationV2DataGroupAnnouncement + * @throws IOException if the JSON string is invalid with respect to NotificationV2DataGroupAnnouncement + */ + public static NotificationV2DataGroupAnnouncement fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NotificationV2DataGroupAnnouncement.class); + } + + /** + * Convert an instance of NotificationV2DataGroupAnnouncement to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupInformative.java b/src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupInformative.java new file mode 100644 index 00000000..8ffb94b9 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupInformative.java @@ -0,0 +1,266 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * NotificationV2DataGroupInformative + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class NotificationV2DataGroupInformative { + public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; + @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nonnull + private String groupId; + + public static final String SERIALIZED_NAME_GROUP_NAME = "groupName"; + @SerializedName(SERIALIZED_NAME_GROUP_NAME) + @javax.annotation.Nonnull + private String groupName; + + public static final String SERIALIZED_NAME_TRANSFER_TARGET_DISPLAY_NAME = "transferTargetDisplayName"; + @SerializedName(SERIALIZED_NAME_TRANSFER_TARGET_DISPLAY_NAME) + @javax.annotation.Nullable + private String transferTargetDisplayName; + + public NotificationV2DataGroupInformative() { + } + + public NotificationV2DataGroupInformative groupId(@javax.annotation.Nonnull String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nonnull + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nonnull String groupId) { + this.groupId = groupId; + } + + + public NotificationV2DataGroupInformative groupName(@javax.annotation.Nonnull String groupName) { + this.groupName = groupName; + return this; + } + + /** + * Get groupName + * @return groupName + */ + @javax.annotation.Nonnull + public String getGroupName() { + return groupName; + } + + public void setGroupName(@javax.annotation.Nonnull String groupName) { + this.groupName = groupName; + } + + + public NotificationV2DataGroupInformative transferTargetDisplayName(@javax.annotation.Nullable String transferTargetDisplayName) { + this.transferTargetDisplayName = transferTargetDisplayName; + return this; + } + + /** + * Get transferTargetDisplayName + * @return transferTargetDisplayName + */ + @javax.annotation.Nullable + public String getTransferTargetDisplayName() { + return transferTargetDisplayName; + } + + public void setTransferTargetDisplayName(@javax.annotation.Nullable String transferTargetDisplayName) { + this.transferTargetDisplayName = transferTargetDisplayName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationV2DataGroupInformative notificationV2DataGroupInformative = (NotificationV2DataGroupInformative) o; + return Objects.equals(this.groupId, notificationV2DataGroupInformative.groupId) && + Objects.equals(this.groupName, notificationV2DataGroupInformative.groupName) && + Objects.equals(this.transferTargetDisplayName, notificationV2DataGroupInformative.transferTargetDisplayName); + } + + @Override + public int hashCode() { + return Objects.hash(groupId, groupName, transferTargetDisplayName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationV2DataGroupInformative {\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n"); + sb.append(" transferTargetDisplayName: ").append(toIndentedString(transferTargetDisplayName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("groupId", "groupName", "transferTargetDisplayName")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("groupId", "groupName")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationV2DataGroupInformative + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationV2DataGroupInformative.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationV2DataGroupInformative is not found in the empty JSON string", NotificationV2DataGroupInformative.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationV2DataGroupInformative.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationV2DataGroupInformative` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NotificationV2DataGroupInformative.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("groupId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + } + if (!jsonObj.get("groupName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString())); + } + if ((jsonObj.get("transferTargetDisplayName") != null && !jsonObj.get("transferTargetDisplayName").isJsonNull()) && !jsonObj.get("transferTargetDisplayName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTargetDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTargetDisplayName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationV2DataGroupInformative.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationV2DataGroupInformative' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataGroupInformative.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationV2DataGroupInformative value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationV2DataGroupInformative read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NotificationV2DataGroupInformative given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationV2DataGroupInformative + * @throws IOException if the JSON string is invalid with respect to NotificationV2DataGroupInformative + */ + public static NotificationV2DataGroupInformative fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NotificationV2DataGroupInformative.class); + } + + /** + * Convert an instance of NotificationV2DataGroupInformative to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupTransfer.java b/src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupTransfer.java new file mode 100644 index 00000000..c379ff35 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2DataGroupTransfer.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * NotificationV2DataGroupTransfer + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class NotificationV2DataGroupTransfer { + public static final String SERIALIZED_NAME_GROUP_NAME = "groupName"; + @SerializedName(SERIALIZED_NAME_GROUP_NAME) + @javax.annotation.Nonnull + private String groupName; + + public static final String SERIALIZED_NAME_OWNER_USER_DISPLAY_NAME = "ownerUserDisplayName"; + @SerializedName(SERIALIZED_NAME_OWNER_USER_DISPLAY_NAME) + @javax.annotation.Nonnull + private String ownerUserDisplayName; + + public NotificationV2DataGroupTransfer() { + } + + public NotificationV2DataGroupTransfer groupName(@javax.annotation.Nonnull String groupName) { + this.groupName = groupName; + return this; + } + + /** + * Get groupName + * @return groupName + */ + @javax.annotation.Nonnull + public String getGroupName() { + return groupName; + } + + public void setGroupName(@javax.annotation.Nonnull String groupName) { + this.groupName = groupName; + } + + + public NotificationV2DataGroupTransfer ownerUserDisplayName(@javax.annotation.Nonnull String ownerUserDisplayName) { + this.ownerUserDisplayName = ownerUserDisplayName; + return this; + } + + /** + * Get ownerUserDisplayName + * @return ownerUserDisplayName + */ + @javax.annotation.Nonnull + public String getOwnerUserDisplayName() { + return ownerUserDisplayName; + } + + public void setOwnerUserDisplayName(@javax.annotation.Nonnull String ownerUserDisplayName) { + this.ownerUserDisplayName = ownerUserDisplayName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationV2DataGroupTransfer notificationV2DataGroupTransfer = (NotificationV2DataGroupTransfer) o; + return Objects.equals(this.groupName, notificationV2DataGroupTransfer.groupName) && + Objects.equals(this.ownerUserDisplayName, notificationV2DataGroupTransfer.ownerUserDisplayName); + } + + @Override + public int hashCode() { + return Objects.hash(groupName, ownerUserDisplayName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationV2DataGroupTransfer {\n"); + sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n"); + sb.append(" ownerUserDisplayName: ").append(toIndentedString(ownerUserDisplayName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("groupName", "ownerUserDisplayName")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("groupName", "ownerUserDisplayName")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationV2DataGroupTransfer + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationV2DataGroupTransfer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationV2DataGroupTransfer is not found in the empty JSON string", NotificationV2DataGroupTransfer.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationV2DataGroupTransfer.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationV2DataGroupTransfer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NotificationV2DataGroupTransfer.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("groupName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString())); + } + if (!jsonObj.get("ownerUserDisplayName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerUserDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerUserDisplayName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationV2DataGroupTransfer.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationV2DataGroupTransfer' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DataGroupTransfer.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationV2DataGroupTransfer value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationV2DataGroupTransfer read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NotificationV2DataGroupTransfer given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationV2DataGroupTransfer + * @throws IOException if the JSON string is invalid with respect to NotificationV2DataGroupTransfer + */ + public static NotificationV2DataGroupTransfer fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NotificationV2DataGroupTransfer.class); + } + + /** + * Convert an instance of NotificationV2DataGroupTransfer to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/NotificationV2DetailsBoop.java b/src/main/java/io/github/vrchatapi/model/NotificationV2DetailsBoop.java index 9abf1e3a..27e9a383 100644 --- a/src/main/java/io/github/vrchatapi/model/NotificationV2DetailsBoop.java +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2DetailsBoop.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,89 +47,79 @@ /** * Either inventoryItemId by itself, or emojiId with optional emojiVersion */ -@ApiModel(description = "Either inventoryItemId by itself, or emojiId with optional emojiVersion") -@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 NotificationV2DetailsBoop { public static final String SERIALIZED_NAME_EMOJI_ID = "emojiId"; @SerializedName(SERIALIZED_NAME_EMOJI_ID) + @javax.annotation.Nonnull private String emojiId; public static final String SERIALIZED_NAME_EMOJI_VERSION = "emojiVersion"; @SerializedName(SERIALIZED_NAME_EMOJI_VERSION) + @javax.annotation.Nullable private Integer emojiVersion; public static final String SERIALIZED_NAME_INVENTORY_ITEM_ID = "inventoryItemId"; @SerializedName(SERIALIZED_NAME_INVENTORY_ITEM_ID) + @javax.annotation.Nonnull private String inventoryItemId; public NotificationV2DetailsBoop() { } - public NotificationV2DetailsBoop emojiId(String emojiId) { - + public NotificationV2DetailsBoop emojiId(@javax.annotation.Nonnull String emojiId) { this.emojiId = emojiId; return this; } - /** + /** * Either a FileID or a string constant for default emojis * @return emojiId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Angry: value: default_angry Arrow Point: value: default_arrowpoint Bats: value: default_bats Beachball: value: default_beachball Beer: value: default_beer Blushing: value: default_blushing Boo: value: default_boo Broken Heart: value: default_broken_heart Candy: value: default_candy Candy Cane: value: default_candy_cane Candy Corn: value: default_candy_corn CantSee: value: default_cantsee Champagne: value: default_champagne Cloud: value: default_cloud Coal: value: default_coal Confetti: value: default_confetti Crying: value: default_crying Drink: value: default_drink Exclamation: value: default_exclamation Fire: value: default_fire Frown: value: default_frown Gift: value: default_gift Gifts: value: default_gifts Gingerbread: value: default_gingerbread Go: value: default_go Hand Wave: value: default_hand_wave Hang Ten: value: default_hang_ten Heart: value: default_heart Hourglass: value: default_hourglass Ice Cream: value: default_ice_cream In Love: value: default_in_love Jack O Lantern: value: default_jack_o_lantern Keyboard: value: default_keyboard Kiss: value: default_kiss Laugh: value: default_laugh Life Ring: value: default_life_ring Mistletoe: value: default_mistletoe Money: value: default_money Music Note: value: default_music_note Neon Shades: value: default_neon_shades NoHeadphones: value: default_noheadphones NoMic: value: default_nomic Pineapple: value: default_pineapple Pizza: value: default_pizza Portal: value: default_portal Question: value: default_question Shush: value: default_shush Skull: value: default_skull Smile: value: default_smile Snow Fall: value: default_snow_fall Snowball: value: default_snowball Splash: value: default_splash Spooky Ghost: value: default_spooky_ghost Stoic: value: default_stoic Stop: value: default_stop Sun Lotion: value: default_sun_lotion Sunglasses: value: default_sunglasses Thinking: value: default_thinking Thumbs Down: value: default_thumbs_down Thumbs Up: value: default_thumbs_up Tomato: value: default_tomato Tongue Out: value: default_tongue_out Web: value: default_web Wow: value: default_wow Zzz: value: default_zzz ", required = true, value = "Either a FileID or a string constant for default emojis") - public String getEmojiId() { return emojiId; } - - public void setEmojiId(String emojiId) { + public void setEmojiId(@javax.annotation.Nonnull String emojiId) { this.emojiId = emojiId; } - public NotificationV2DetailsBoop emojiVersion(Integer emojiVersion) { - + public NotificationV2DetailsBoop emojiVersion(@javax.annotation.Nullable Integer emojiVersion) { this.emojiVersion = emojiVersion; return this; } - /** + /** * Get emojiVersion * @return emojiVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public Integer getEmojiVersion() { return emojiVersion; } - - public void setEmojiVersion(Integer emojiVersion) { + public void setEmojiVersion(@javax.annotation.Nullable Integer emojiVersion) { this.emojiVersion = emojiVersion; } - public NotificationV2DetailsBoop inventoryItemId(String inventoryItemId) { - + public NotificationV2DetailsBoop inventoryItemId(@javax.annotation.Nonnull String inventoryItemId) { this.inventoryItemId = inventoryItemId; return this; } - /** + /** * Get inventoryItemId * @return inventoryItemId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "inv_10bce5b0-2d2b-44e0-900d-db6534615162", required = true, value = "") - public String getInventoryItemId() { return inventoryItemId; } - - public void setInventoryItemId(String inventoryItemId) { + public void setInventoryItemId(@javax.annotation.Nonnull String inventoryItemId) { this.inventoryItemId = inventoryItemId; } @@ -170,10 +160,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -182,50 +169,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("emojiId"); - openapiFields.add("emojiVersion"); - openapiFields.add("inventoryItemId"); + openapiFields = new HashSet(Arrays.asList("emojiId", "emojiVersion", "inventoryItemId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("emojiId"); - openapiRequiredFields.add("emojiVersion"); - openapiRequiredFields.add("inventoryItemId"); + openapiRequiredFields = new HashSet(Arrays.asList("emojiId", "emojiVersion", "inventoryItemId")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotificationV2DetailsBoop - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NotificationV2DetailsBoop.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NotificationV2DetailsBoop is not found in the empty JSON string", NotificationV2DetailsBoop.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationV2DetailsBoop + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationV2DetailsBoop.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationV2DetailsBoop is not found in the empty JSON string", NotificationV2DetailsBoop.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!NotificationV2DetailsBoop.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotificationV2DetailsBoop` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationV2DetailsBoop` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : NotificationV2DetailsBoop.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("emojiId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `emojiId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("emojiId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `emojiId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("emojiId").toString())); } if (!jsonObj.get("inventoryItemId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `inventoryItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inventoryItemId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `inventoryItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inventoryItemId").toString())); } } @@ -249,31 +231,31 @@ public void write(JsonWriter out, NotificationV2DetailsBoop value) throws IOExce @Override public NotificationV2DetailsBoop read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotificationV2DetailsBoop given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotificationV2DetailsBoop - * @throws IOException if the JSON string is invalid with respect to NotificationV2DetailsBoop - */ + /** + * Create an instance of NotificationV2DetailsBoop given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationV2DetailsBoop + * @throws IOException if the JSON string is invalid with respect to NotificationV2DetailsBoop + */ public static NotificationV2DetailsBoop fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotificationV2DetailsBoop.class); } - /** - * Convert an instance of NotificationV2DetailsBoop to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotificationV2DetailsBoop to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/NotificationV2Response.java b/src/main/java/io/github/vrchatapi/model/NotificationV2Response.java index 85b7acca..bce74627 100644 --- a/src/main/java/io/github/vrchatapi/model/NotificationV2Response.java +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2Response.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,142 +47,127 @@ /** * NotificationV2Response */ -@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 NotificationV2Response { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull private String data; public static final String SERIALIZED_NAME_ICON = "icon"; @SerializedName(SERIALIZED_NAME_ICON) + @javax.annotation.Nonnull private String icon; public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) + @javax.annotation.Nonnull private String text; public static final String SERIALIZED_NAME_TEXT_KEY = "textKey"; @SerializedName(SERIALIZED_NAME_TEXT_KEY) + @javax.annotation.Nullable private String textKey; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private String type; public NotificationV2Response() { } - public NotificationV2Response data(String data) { - + public NotificationV2Response data(@javax.annotation.Nonnull String data) { this.data = data; return this; } - /** + /** * Get data * @return data - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getData() { return data; } - - public void setData(String data) { + public void setData(@javax.annotation.Nonnull String data) { this.data = data; } - public NotificationV2Response icon(String icon) { - + public NotificationV2Response icon(@javax.annotation.Nonnull String icon) { this.icon = icon; return this; } - /** + /** * Get icon * @return icon - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Bell: value: bell Bell Slash: value: bell-slash Check: value: check ", required = true, value = "") - public String getIcon() { return icon; } - - public void setIcon(String icon) { + public void setIcon(@javax.annotation.Nonnull String icon) { this.icon = icon; } - public NotificationV2Response text(String text) { - + public NotificationV2Response text(@javax.annotation.Nonnull String text) { this.text = text; return this; } - /** + /** * Get text * @return text - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getText() { return text; } - - public void setText(String text) { + public void setText(@javax.annotation.Nonnull String text) { this.text = text; } - public NotificationV2Response textKey(String textKey) { - + public NotificationV2Response textKey(@javax.annotation.Nullable String textKey) { this.textKey = textKey; return this; } - /** + /** * Get textKey * @return textKey - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getTextKey() { return textKey; } - - public void setTextKey(String textKey) { + public void setTextKey(@javax.annotation.Nullable String textKey) { this.textKey = textKey; } - public NotificationV2Response type(String type) { - + public NotificationV2Response type(@javax.annotation.Nonnull String type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Accept: value: accept Boop: value: boop Decline: value: decline Delete: value: delete Unsubscribe: value: unsubscribe ", required = true, value = "") - public String getType() { return type; } - - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } @@ -227,10 +212,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -239,63 +221,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("icon"); - openapiFields.add("text"); - openapiFields.add("textKey"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("data", "icon", "text", "textKey", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("icon"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("textKey"); - openapiRequiredFields.add("type"); + openapiRequiredFields = new HashSet(Arrays.asList("data", "icon", "text", "textKey", "type")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NotificationV2Response - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NotificationV2Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NotificationV2Response is not found in the empty JSON string", NotificationV2Response.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NotificationV2Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NotificationV2Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in NotificationV2Response is not found in the empty JSON string", NotificationV2Response.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!NotificationV2Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NotificationV2Response` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NotificationV2Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : NotificationV2Response.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("data").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `data` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data").toString())); } if (!jsonObj.get("icon").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `icon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("icon").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `icon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("icon").toString())); } if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } - if (!jsonObj.get("textKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `textKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("textKey").toString())); + if ((jsonObj.get("textKey") != null && !jsonObj.get("textKey").isJsonNull()) && !jsonObj.get("textKey").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `textKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("textKey").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } @@ -319,31 +292,31 @@ public void write(JsonWriter out, NotificationV2Response value) throws IOExcepti @Override public NotificationV2Response read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of NotificationV2Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of NotificationV2Response - * @throws IOException if the JSON string is invalid with respect to NotificationV2Response - */ + /** + * Create an instance of NotificationV2Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of NotificationV2Response + * @throws IOException if the JSON string is invalid with respect to NotificationV2Response + */ public static NotificationV2Response fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NotificationV2Response.class); } - /** - * Convert an instance of NotificationV2Response to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NotificationV2Response to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/NotificationV2Type.java b/src/main/java/io/github/vrchatapi/model/NotificationV2Type.java index 4d3ac42f..5ba04dff 100644 --- a/src/main/java/io/github/vrchatapi/model/NotificationV2Type.java +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2Type.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -52,13 +52,13 @@ public enum NotificationV2Type { GROUP_INVITE("group.invite"), - GROUP_JOINREQUEST("group.joinRequest"), + GROUP_JOIN_REQUEST("group.joinRequest"), GROUP_POST("group.post"), GROUP_TRANSFER("group.transfer"), - INVITE_INSTANCE_CONTENTGATED("invite.instance.contentGated"), + INVITE_INSTANCE_CONTENT_GATED("invite.instance.contentGated"), MODERATION_CONTENTRESTRICTION("moderation.contentrestriction"), @@ -110,5 +110,10 @@ public NotificationV2Type read(final JsonReader jsonReader) throws IOException { return NotificationV2Type.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + NotificationV2Type.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/OkStatus.java b/src/main/java/io/github/vrchatapi/model/OkStatus.java index c44181c3..abba8994 100644 --- a/src/main/java/io/github/vrchatapi/model/OkStatus.java +++ b/src/main/java/io/github/vrchatapi/model/OkStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,35 +47,31 @@ /** * A status response consisting of solely a string description of whether the result of an operation was ok. */ -@ApiModel(description = "A status response consisting of solely a string description of whether the result of an operation was ok.") -@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 OkStatus { public static final String SERIALIZED_NAME_OK = "ok"; @SerializedName(SERIALIZED_NAME_OK) + @javax.annotation.Nonnull private String ok = "maybe?"; public OkStatus() { } - public OkStatus ok(String ok) { - + public OkStatus ok(@javax.annotation.Nonnull String ok) { this.ok = ok; return this; } - /** + /** * The actual status itself * @return ok - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The actual status itself") - public String getOk() { return ok; } - - public void setOk(String ok) { + public void setOk(@javax.annotation.Nonnull String ok) { this.ok = ok; } @@ -112,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,43 +117,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ok"); + openapiFields = new HashSet(Arrays.asList("ok")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ok"); + openapiRequiredFields = new HashSet(Arrays.asList("ok")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OkStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OkStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OkStatus is not found in the empty JSON string", OkStatus.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OkStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OkStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in OkStatus is not found in the empty JSON string", OkStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!OkStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OkStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `OkStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : OkStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("ok").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ok` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ok").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ok` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ok").toString())); } } @@ -184,31 +176,31 @@ public void write(JsonWriter out, OkStatus value) throws IOException { @Override public OkStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of OkStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of OkStatus - * @throws IOException if the JSON string is invalid with respect to OkStatus - */ + /** + * Create an instance of OkStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of OkStatus + * @throws IOException if the JSON string is invalid with respect to OkStatus + */ public static OkStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OkStatus.class); } - /** - * Convert an instance of OkStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OkStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/OkStatus2.java b/src/main/java/io/github/vrchatapi/model/OkStatus2.java index dcc8d0a0..45d32f75 100644 --- a/src/main/java/io/github/vrchatapi/model/OkStatus2.java +++ b/src/main/java/io/github/vrchatapi/model/OkStatus2.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,35 +47,31 @@ /** * Another status response consisting of solely a string description of whether the result of an operation was ok. */ -@ApiModel(description = "Another status response consisting of solely a string description of whether the result of an operation was ok.") -@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 OkStatus2 { public static final String SERIALIZED_NAME_O_K = "OK"; @SerializedName(SERIALIZED_NAME_O_K) + @javax.annotation.Nonnull private String OK; public OkStatus2() { } - public OkStatus2 OK(String OK) { - + public OkStatus2 OK(@javax.annotation.Nonnull String OK) { this.OK = OK; return this; } - /** + /** * The actual status itself * @return OK - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The actual status itself") - public String getOK() { return OK; } - - public void setOK(String OK) { + public void setOK(@javax.annotation.Nonnull String OK) { this.OK = OK; } @@ -112,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,43 +117,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("OK"); + openapiFields = new HashSet(Arrays.asList("OK")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("OK"); + openapiRequiredFields = new HashSet(Arrays.asList("OK")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OkStatus2 - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OkStatus2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OkStatus2 is not found in the empty JSON string", OkStatus2.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OkStatus2 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OkStatus2.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in OkStatus2 is not found in the empty JSON string", OkStatus2.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!OkStatus2.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OkStatus2` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `OkStatus2` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : OkStatus2.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("OK").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `OK` to be a primitive type in the JSON string but got `%s`", jsonObj.get("OK").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `OK` to be a primitive type in the JSON string but got `%s`", jsonObj.get("OK").toString())); } } @@ -184,31 +176,31 @@ public void write(JsonWriter out, OkStatus2 value) throws IOException { @Override public OkStatus2 read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of OkStatus2 given an JSON string - * - * @param jsonString JSON string - * @return An instance of OkStatus2 - * @throws IOException if the JSON string is invalid with respect to OkStatus2 - */ + /** + * Create an instance of OkStatus2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of OkStatus2 + * @throws IOException if the JSON string is invalid with respect to OkStatus2 + */ public static OkStatus2 fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OkStatus2.class); } - /** - * Convert an instance of OkStatus2 to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OkStatus2 to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/OrderOption.java b/src/main/java/io/github/vrchatapi/model/OrderOption.java index 782b1b3c..ec7a988a 100644 --- a/src/main/java/io/github/vrchatapi/model/OrderOption.java +++ b/src/main/java/io/github/vrchatapi/model/OrderOption.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +68,10 @@ public OrderOption read(final JsonReader jsonReader) throws IOException { return OrderOption.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderOption.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/OrderOptionShort.java b/src/main/java/io/github/vrchatapi/model/OrderOptionShort.java index f5d47e4f..a1b05c8f 100644 --- a/src/main/java/io/github/vrchatapi/model/OrderOptionShort.java +++ b/src/main/java/io/github/vrchatapi/model/OrderOptionShort.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -68,5 +68,10 @@ public OrderOptionShort read(final JsonReader jsonReader) throws IOException { return OrderOptionShort.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderOptionShort.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/PaginatedCalendarEventList.java b/src/main/java/io/github/vrchatapi/model/PaginatedCalendarEventList.java index 242d280b..8ecdd0c9 100644 --- a/src/main/java/io/github/vrchatapi/model/PaginatedCalendarEventList.java +++ b/src/main/java/io/github/vrchatapi/model/PaginatedCalendarEventList.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.CalendarEvent; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,49 +50,46 @@ /** * An offset-based list of CalendarEvents */ -@ApiModel(description = "An offset-based list of CalendarEvents") -@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 PaginatedCalendarEventList { public static final String SERIALIZED_NAME_HAS_NEXT = "hasNext"; @SerializedName(SERIALIZED_NAME_HAS_NEXT) + @javax.annotation.Nullable private Boolean hasNext; public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = null; + @javax.annotation.Nullable + private List results = new ArrayList<>(); public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) + @javax.annotation.Nullable private Integer totalCount; public PaginatedCalendarEventList() { } - public PaginatedCalendarEventList hasNext(Boolean hasNext) { - + public PaginatedCalendarEventList hasNext(@javax.annotation.Nullable Boolean hasNext) { this.hasNext = hasNext; return this; } - /** + /** * Whether there are more results after this page. * @return hasNext - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether there are more results after this page.") - public Boolean getHasNext() { return hasNext; } - - public void setHasNext(Boolean hasNext) { + public void setHasNext(@javax.annotation.Nullable Boolean hasNext) { this.hasNext = hasNext; } - public PaginatedCalendarEventList results(List results) { - + public PaginatedCalendarEventList results(@javax.annotation.Nullable List results) { this.results = results; return this; } @@ -105,42 +102,35 @@ public PaginatedCalendarEventList addResultsItem(CalendarEvent resultsItem) { return this; } - /** + /** * * @return results - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getResults() { return results; } - - public void setResults(List results) { + public void setResults(@javax.annotation.Nullable List results) { this.results = results; } - public PaginatedCalendarEventList totalCount(Integer totalCount) { - + public PaginatedCalendarEventList totalCount(@javax.annotation.Nullable Integer totalCount) { this.totalCount = totalCount; return this; } - /** + /** * The total number of results that the query would return if there were no pagination. * @return totalCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The total number of results that the query would return if there were no pagination.") - public Integer getTotalCount() { return totalCount; } - - public void setTotalCount(Integer totalCount) { + public void setTotalCount(@javax.annotation.Nullable Integer totalCount) { this.totalCount = totalCount; } @@ -181,10 +171,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -193,46 +180,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("hasNext"); - openapiFields.add("results"); - openapiFields.add("totalCount"); + openapiFields = new HashSet(Arrays.asList("hasNext", "results", "totalCount")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PaginatedCalendarEventList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PaginatedCalendarEventList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaginatedCalendarEventList is not found in the empty JSON string", PaginatedCalendarEventList.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PaginatedCalendarEventList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PaginatedCalendarEventList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PaginatedCalendarEventList is not found in the empty JSON string", PaginatedCalendarEventList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PaginatedCalendarEventList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginatedCalendarEventList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PaginatedCalendarEventList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("results") != null && !jsonObj.get("results").isJsonNull()) { JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); if (jsonArrayresults != null) { // ensure the json data is an array if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); } // validate the optional field `results` (array) for (int i = 0; i < jsonArrayresults.size(); i++) { - CalendarEvent.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); + CalendarEvent.validateJsonElement(jsonArrayresults.get(i)); }; } } @@ -258,31 +243,31 @@ public void write(JsonWriter out, PaginatedCalendarEventList value) throws IOExc @Override public PaginatedCalendarEventList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PaginatedCalendarEventList given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaginatedCalendarEventList - * @throws IOException if the JSON string is invalid with respect to PaginatedCalendarEventList - */ + /** + * Create an instance of PaginatedCalendarEventList given an JSON string + * + * @param jsonString JSON string + * @return An instance of PaginatedCalendarEventList + * @throws IOException if the JSON string is invalid with respect to PaginatedCalendarEventList + */ public static PaginatedCalendarEventList fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PaginatedCalendarEventList.class); } - /** - * Convert an instance of PaginatedCalendarEventList to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PaginatedCalendarEventList to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PaginatedGroupAuditLogEntryList.java b/src/main/java/io/github/vrchatapi/model/PaginatedGroupAuditLogEntryList.java index 4ba88e7f..95667d95 100644 --- a/src/main/java/io/github/vrchatapi/model/PaginatedGroupAuditLogEntryList.java +++ b/src/main/java/io/github/vrchatapi/model/PaginatedGroupAuditLogEntryList.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupAuditLogEntry; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,48 +50,46 @@ /** * PaginatedGroupAuditLogEntryList */ -@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 PaginatedGroupAuditLogEntryList { public static final String SERIALIZED_NAME_HAS_NEXT = "hasNext"; @SerializedName(SERIALIZED_NAME_HAS_NEXT) + @javax.annotation.Nullable private Boolean hasNext; public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = null; + @javax.annotation.Nullable + private List results = new ArrayList<>(); public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) + @javax.annotation.Nullable private Integer totalCount; public PaginatedGroupAuditLogEntryList() { } - public PaginatedGroupAuditLogEntryList hasNext(Boolean hasNext) { - + public PaginatedGroupAuditLogEntryList hasNext(@javax.annotation.Nullable Boolean hasNext) { this.hasNext = hasNext; return this; } - /** + /** * Whether there are more results after this page. * @return hasNext - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether there are more results after this page.") - public Boolean getHasNext() { return hasNext; } - - public void setHasNext(Boolean hasNext) { + public void setHasNext(@javax.annotation.Nullable Boolean hasNext) { this.hasNext = hasNext; } - public PaginatedGroupAuditLogEntryList results(List results) { - + public PaginatedGroupAuditLogEntryList results(@javax.annotation.Nullable List results) { this.results = results; return this; } @@ -104,42 +102,35 @@ public PaginatedGroupAuditLogEntryList addResultsItem(GroupAuditLogEntry results return this; } - /** + /** * * @return results - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getResults() { return results; } - - public void setResults(List results) { + public void setResults(@javax.annotation.Nullable List results) { this.results = results; } - public PaginatedGroupAuditLogEntryList totalCount(Integer totalCount) { - + public PaginatedGroupAuditLogEntryList totalCount(@javax.annotation.Nullable Integer totalCount) { this.totalCount = totalCount; return this; } - /** + /** * The total number of results that the query would return if there were no pagination. * @return totalCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The total number of results that the query would return if there were no pagination.") - public Integer getTotalCount() { return totalCount; } - - public void setTotalCount(Integer totalCount) { + public void setTotalCount(@javax.annotation.Nullable Integer totalCount) { this.totalCount = totalCount; } @@ -180,10 +171,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -192,46 +180,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("hasNext"); - openapiFields.add("results"); - openapiFields.add("totalCount"); + openapiFields = new HashSet(Arrays.asList("hasNext", "results", "totalCount")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PaginatedGroupAuditLogEntryList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PaginatedGroupAuditLogEntryList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaginatedGroupAuditLogEntryList is not found in the empty JSON string", PaginatedGroupAuditLogEntryList.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PaginatedGroupAuditLogEntryList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PaginatedGroupAuditLogEntryList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PaginatedGroupAuditLogEntryList is not found in the empty JSON string", PaginatedGroupAuditLogEntryList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PaginatedGroupAuditLogEntryList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginatedGroupAuditLogEntryList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PaginatedGroupAuditLogEntryList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("results") != null && !jsonObj.get("results").isJsonNull()) { JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); if (jsonArrayresults != null) { // ensure the json data is an array if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); } // validate the optional field `results` (array) for (int i = 0; i < jsonArrayresults.size(); i++) { - GroupAuditLogEntry.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); + GroupAuditLogEntry.validateJsonElement(jsonArrayresults.get(i)); }; } } @@ -257,31 +243,31 @@ public void write(JsonWriter out, PaginatedGroupAuditLogEntryList value) throws @Override public PaginatedGroupAuditLogEntryList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PaginatedGroupAuditLogEntryList given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaginatedGroupAuditLogEntryList - * @throws IOException if the JSON string is invalid with respect to PaginatedGroupAuditLogEntryList - */ + /** + * Create an instance of PaginatedGroupAuditLogEntryList given an JSON string + * + * @param jsonString JSON string + * @return An instance of PaginatedGroupAuditLogEntryList + * @throws IOException if the JSON string is invalid with respect to PaginatedGroupAuditLogEntryList + */ public static PaginatedGroupAuditLogEntryList fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PaginatedGroupAuditLogEntryList.class); } - /** - * Convert an instance of PaginatedGroupAuditLogEntryList to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PaginatedGroupAuditLogEntryList to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PaginatedModerationReportList.java b/src/main/java/io/github/vrchatapi/model/PaginatedModerationReportList.java index 8f030086..b2f88d70 100644 --- a/src/main/java/io/github/vrchatapi/model/PaginatedModerationReportList.java +++ b/src/main/java/io/github/vrchatapi/model/PaginatedModerationReportList.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ModerationReport; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,48 +50,46 @@ /** * PaginatedModerationReportList */ -@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 PaginatedModerationReportList { public static final String SERIALIZED_NAME_HAS_NEXT = "hasNext"; @SerializedName(SERIALIZED_NAME_HAS_NEXT) + @javax.annotation.Nullable private Boolean hasNext; public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = null; + @javax.annotation.Nullable + private List results = new ArrayList<>(); public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) + @javax.annotation.Nullable private Integer totalCount; public PaginatedModerationReportList() { } - public PaginatedModerationReportList hasNext(Boolean hasNext) { - + public PaginatedModerationReportList hasNext(@javax.annotation.Nullable Boolean hasNext) { this.hasNext = hasNext; return this; } - /** + /** * Whether there are more results after this page. * @return hasNext - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether there are more results after this page.") - public Boolean getHasNext() { return hasNext; } - - public void setHasNext(Boolean hasNext) { + public void setHasNext(@javax.annotation.Nullable Boolean hasNext) { this.hasNext = hasNext; } - public PaginatedModerationReportList results(List results) { - + public PaginatedModerationReportList results(@javax.annotation.Nullable List results) { this.results = results; return this; } @@ -104,42 +102,35 @@ public PaginatedModerationReportList addResultsItem(ModerationReport resultsItem return this; } - /** + /** * The list of moderation reports. * @return results - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The list of moderation reports.") - public List getResults() { return results; } - - public void setResults(List results) { + public void setResults(@javax.annotation.Nullable List results) { this.results = results; } - public PaginatedModerationReportList totalCount(Integer totalCount) { - + public PaginatedModerationReportList totalCount(@javax.annotation.Nullable Integer totalCount) { this.totalCount = totalCount; return this; } - /** + /** * The total number of results that the query would return if there were no pagination. * @return totalCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The total number of results that the query would return if there were no pagination.") - public Integer getTotalCount() { return totalCount; } - - public void setTotalCount(Integer totalCount) { + public void setTotalCount(@javax.annotation.Nullable Integer totalCount) { this.totalCount = totalCount; } @@ -180,10 +171,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -192,46 +180,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("hasNext"); - openapiFields.add("results"); - openapiFields.add("totalCount"); + openapiFields = new HashSet(Arrays.asList("hasNext", "results", "totalCount")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PaginatedModerationReportList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PaginatedModerationReportList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaginatedModerationReportList is not found in the empty JSON string", PaginatedModerationReportList.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PaginatedModerationReportList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PaginatedModerationReportList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PaginatedModerationReportList is not found in the empty JSON string", PaginatedModerationReportList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PaginatedModerationReportList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginatedModerationReportList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PaginatedModerationReportList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("results") != null && !jsonObj.get("results").isJsonNull()) { JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); if (jsonArrayresults != null) { // ensure the json data is an array if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); } // validate the optional field `results` (array) for (int i = 0; i < jsonArrayresults.size(); i++) { - ModerationReport.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); + ModerationReport.validateJsonElement(jsonArrayresults.get(i)); }; } } @@ -257,31 +243,31 @@ public void write(JsonWriter out, PaginatedModerationReportList value) throws IO @Override public PaginatedModerationReportList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PaginatedModerationReportList given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaginatedModerationReportList - * @throws IOException if the JSON string is invalid with respect to PaginatedModerationReportList - */ + /** + * Create an instance of PaginatedModerationReportList given an JSON string + * + * @param jsonString JSON string + * @return An instance of PaginatedModerationReportList + * @throws IOException if the JSON string is invalid with respect to PaginatedModerationReportList + */ public static PaginatedModerationReportList fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PaginatedModerationReportList.class); } - /** - * Convert an instance of PaginatedModerationReportList to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PaginatedModerationReportList to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PastDisplayName.java b/src/main/java/io/github/vrchatapi/model/PastDisplayName.java index c7349077..4f27afbc 100644 --- a/src/main/java/io/github/vrchatapi/model/PastDisplayName.java +++ b/src/main/java/io/github/vrchatapi/model/PastDisplayName.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,61 +48,55 @@ /** * PastDisplayName */ -@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 PastDisplayName { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public PastDisplayName() { } - public PastDisplayName displayName(String displayName) { - + public PastDisplayName displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public PastDisplayName updatedAt(OffsetDateTime updatedAt) { - + public PastDisplayName updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -141,10 +135,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,45 +144,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("displayName"); - openapiFields.add("updated_at"); + openapiFields = new HashSet(Arrays.asList("displayName", "updated_at")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("updated_at"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PastDisplayName - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PastDisplayName.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PastDisplayName is not found in the empty JSON string", PastDisplayName.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("displayName", "updated_at")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PastDisplayName + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PastDisplayName.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PastDisplayName is not found in the empty JSON string", PastDisplayName.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PastDisplayName.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PastDisplayName` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PastDisplayName` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : PastDisplayName.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } } @@ -215,31 +203,31 @@ public void write(JsonWriter out, PastDisplayName value) throws IOException { @Override public PastDisplayName read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PastDisplayName given an JSON string - * - * @param jsonString JSON string - * @return An instance of PastDisplayName - * @throws IOException if the JSON string is invalid with respect to PastDisplayName - */ + /** + * Create an instance of PastDisplayName given an JSON string + * + * @param jsonString JSON string + * @return An instance of PastDisplayName + * @throws IOException if the JSON string is invalid with respect to PastDisplayName + */ public static PastDisplayName fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PastDisplayName.class); } - /** - * Convert an instance of PastDisplayName to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PastDisplayName to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Pending2FAResult.java b/src/main/java/io/github/vrchatapi/model/Pending2FAResult.java index 916a69c7..252cd944 100644 --- a/src/main/java/io/github/vrchatapi/model/Pending2FAResult.java +++ b/src/main/java/io/github/vrchatapi/model/Pending2FAResult.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * Pending2FAResult */ -@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 Pending2FAResult { public static final String SERIALIZED_NAME_QR_CODE_DATA_URL = "qrCodeDataUrl"; @SerializedName(SERIALIZED_NAME_QR_CODE_DATA_URL) + @javax.annotation.Nonnull private String qrCodeDataUrl; public static final String SERIALIZED_NAME_SECRET = "secret"; @SerializedName(SERIALIZED_NAME_SECRET) + @javax.annotation.Nonnull private String secret; public Pending2FAResult() { } - public Pending2FAResult qrCodeDataUrl(String qrCodeDataUrl) { - + public Pending2FAResult qrCodeDataUrl(@javax.annotation.Nonnull String qrCodeDataUrl) { this.qrCodeDataUrl = qrCodeDataUrl; return this; } - /** + /** * Get qrCodeDataUrl * @return qrCodeDataUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getQrCodeDataUrl() { return qrCodeDataUrl; } - - public void setQrCodeDataUrl(String qrCodeDataUrl) { + public void setQrCodeDataUrl(@javax.annotation.Nonnull String qrCodeDataUrl) { this.qrCodeDataUrl = qrCodeDataUrl; } - public Pending2FAResult secret(String secret) { - + public Pending2FAResult secret(@javax.annotation.Nonnull String secret) { this.secret = secret; return this; } - /** + /** * Get secret * @return secret - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSecret() { return secret; } - - public void setSecret(String secret) { + public void setSecret(@javax.annotation.Nonnull String secret) { this.secret = secret; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,48 +143,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("qrCodeDataUrl"); - openapiFields.add("secret"); + openapiFields = new HashSet(Arrays.asList("qrCodeDataUrl", "secret")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("qrCodeDataUrl"); - openapiRequiredFields.add("secret"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Pending2FAResult - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Pending2FAResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Pending2FAResult is not found in the empty JSON string", Pending2FAResult.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("qrCodeDataUrl", "secret")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Pending2FAResult + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Pending2FAResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Pending2FAResult is not found in the empty JSON string", Pending2FAResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Pending2FAResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Pending2FAResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Pending2FAResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Pending2FAResult.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("qrCodeDataUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `qrCodeDataUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("qrCodeDataUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `qrCodeDataUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("qrCodeDataUrl").toString())); } if (!jsonObj.get("secret").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secret").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `secret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secret").toString())); } } @@ -217,31 +205,31 @@ public void write(JsonWriter out, Pending2FAResult value) throws IOException { @Override public Pending2FAResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Pending2FAResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of Pending2FAResult - * @throws IOException if the JSON string is invalid with respect to Pending2FAResult - */ + /** + * Create an instance of Pending2FAResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of Pending2FAResult + * @throws IOException if the JSON string is invalid with respect to Pending2FAResult + */ public static Pending2FAResult fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Pending2FAResult.class); } - /** - * Convert an instance of Pending2FAResult to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Pending2FAResult to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PerformanceLimiterInfo.java b/src/main/java/io/github/vrchatapi/model/PerformanceLimiterInfo.java index 33f4b080..944f472f 100644 --- a/src/main/java/io/github/vrchatapi/model/PerformanceLimiterInfo.java +++ b/src/main/java/io/github/vrchatapi/model/PerformanceLimiterInfo.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,35 +47,31 @@ /** * Info about the performance limits on a platform */ -@ApiModel(description = "Info about the performance limits on a platform") -@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 PerformanceLimiterInfo { public static final String SERIALIZED_NAME_MAX_SEATS = "maxSeats"; @SerializedName(SERIALIZED_NAME_MAX_SEATS) + @javax.annotation.Nonnull private Integer maxSeats; public PerformanceLimiterInfo() { } - public PerformanceLimiterInfo maxSeats(Integer maxSeats) { - + public PerformanceLimiterInfo maxSeats(@javax.annotation.Nonnull Integer maxSeats) { this.maxSeats = maxSeats; return this; } - /** + /** * Maximum amount of seats. -1 means no limit. * @return maxSeats - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Maximum amount of seats. -1 means no limit.") - public Integer getMaxSeats() { return maxSeats; } - - public void setMaxSeats(Integer maxSeats) { + public void setMaxSeats(@javax.annotation.Nonnull Integer maxSeats) { this.maxSeats = maxSeats; } @@ -112,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("maxSeats"); + openapiFields = new HashSet(Arrays.asList("maxSeats")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("maxSeats"); + openapiRequiredFields = new HashSet(Arrays.asList("maxSeats")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PerformanceLimiterInfo - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PerformanceLimiterInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PerformanceLimiterInfo is not found in the empty JSON string", PerformanceLimiterInfo.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PerformanceLimiterInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PerformanceLimiterInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PerformanceLimiterInfo is not found in the empty JSON string", PerformanceLimiterInfo.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PerformanceLimiterInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PerformanceLimiterInfo` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PerformanceLimiterInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : PerformanceLimiterInfo.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -181,31 +173,31 @@ public void write(JsonWriter out, PerformanceLimiterInfo value) throws IOExcepti @Override public PerformanceLimiterInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PerformanceLimiterInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of PerformanceLimiterInfo - * @throws IOException if the JSON string is invalid with respect to PerformanceLimiterInfo - */ + /** + * Create an instance of PerformanceLimiterInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of PerformanceLimiterInfo + * @throws IOException if the JSON string is invalid with respect to PerformanceLimiterInfo + */ public static PerformanceLimiterInfo fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PerformanceLimiterInfo.class); } - /** - * Convert an instance of PerformanceLimiterInfo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PerformanceLimiterInfo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PerformanceRatings.java b/src/main/java/io/github/vrchatapi/model/PerformanceRatings.java index 94a1eba8..51387221 100644 --- a/src/main/java/io/github/vrchatapi/model/PerformanceRatings.java +++ b/src/main/java/io/github/vrchatapi/model/PerformanceRatings.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -39,7 +38,7 @@ public enum PerformanceRatings { POOR("Poor"), - VERYPOOR("VeryPoor"); + VERY_POOR("VeryPoor"); private String value; @@ -77,5 +76,10 @@ public PerformanceRatings read(final JsonReader jsonReader) throws IOException { return PerformanceRatings.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PerformanceRatings.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/Permission.java b/src/main/java/io/github/vrchatapi/model/Permission.java index 2f906e50..34485a7a 100644 --- a/src/main/java/io/github/vrchatapi/model/Permission.java +++ b/src/main/java/io/github/vrchatapi/model/Permission.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.PermissionData; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,224 +48,199 @@ /** * */ -@ApiModel(description = "") -@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 Permission { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable private PermissionData data; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable private String displayName; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_OWNER_DISPLAY_NAME = "ownerDisplayName"; @SerializedName(SERIALIZED_NAME_OWNER_DISPLAY_NAME) + @javax.annotation.Nonnull private String ownerDisplayName; public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nonnull private String ownerId; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable private String type; public Permission() { } - public Permission data(PermissionData data) { - + public Permission data(@javax.annotation.Nullable PermissionData data) { this.data = data; return this; } - /** + /** * Get data * @return data - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PermissionData getData() { return data; } - - public void setData(PermissionData data) { + public void setData(@javax.annotation.Nullable PermissionData data) { this.data = data; } - public Permission description(String description) { - + public Permission description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public Permission displayName(String displayName) { - + public Permission displayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; } - public Permission id(String id) { - + public Permission id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "prms_804ba021-9f47-4e25-9847-1f42fdb2e6ff", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Permission name(String name) { - + public Permission name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "permission-invite-photos", required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public Permission ownerDisplayName(String ownerDisplayName) { - + public Permission ownerDisplayName(@javax.annotation.Nonnull String ownerDisplayName) { this.ownerDisplayName = ownerDisplayName; return this; } - /** + /** * Get ownerDisplayName * @return ownerDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getOwnerDisplayName() { return ownerDisplayName; } - - public void setOwnerDisplayName(String ownerDisplayName) { + public void setOwnerDisplayName(@javax.annotation.Nonnull String ownerDisplayName) { this.ownerDisplayName = ownerDisplayName; } - public Permission ownerId(String ownerId) { - + public Permission ownerId(@javax.annotation.Nonnull String ownerId) { this.ownerId = ownerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return ownerId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getOwnerId() { return ownerId; } - - public void setOwnerId(String ownerId) { + public void setOwnerId(@javax.annotation.Nonnull String ownerId) { this.ownerId = ownerId; } - public Permission type(String type) { - + public Permission type(@javax.annotation.Nullable String type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getType() { return type; } - - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } @@ -316,10 +291,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -328,75 +300,64 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("description"); - openapiFields.add("displayName"); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("ownerDisplayName"); - openapiFields.add("ownerId"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("data", "description", "displayName", "id", "name", "ownerDisplayName", "ownerId", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("ownerDisplayName"); - openapiRequiredFields.add("ownerId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Permission - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Permission.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Permission is not found in the empty JSON string", Permission.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("id", "name", "ownerDisplayName", "ownerId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Permission + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Permission.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Permission is not found in the empty JSON string", Permission.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Permission.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Permission` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Permission` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Permission.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `data` if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - PermissionData.validateJsonObject(jsonObj.getAsJsonObject("data")); + PermissionData.validateJsonElement(jsonObj.get("data")); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("ownerDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerDisplayName").toString())); } if (!jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } @@ -420,31 +381,31 @@ public void write(JsonWriter out, Permission value) throws IOException { @Override public Permission read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Permission given an JSON string - * - * @param jsonString JSON string - * @return An instance of Permission - * @throws IOException if the JSON string is invalid with respect to Permission - */ + /** + * Create an instance of Permission given an JSON string + * + * @param jsonString JSON string + * @return An instance of Permission + * @throws IOException if the JSON string is invalid with respect to Permission + */ public static Permission fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Permission.class); } - /** - * Convert an instance of Permission to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Permission to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PermissionData.java b/src/main/java/io/github/vrchatapi/model/PermissionData.java index 309df7b7..69bba575 100644 --- a/src/main/java/io/github/vrchatapi/model/PermissionData.java +++ b/src/main/java/io/github/vrchatapi/model/PermissionData.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,34 +51,37 @@ /** * Specific values afforded the user by this permission */ -@ApiModel(description = "Specific values afforded the user by this permission") -@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 PermissionData { public static final String SERIALIZED_NAME_BADGES = "badges"; @SerializedName(SERIALIZED_NAME_BADGES) - private List badges = null; + @javax.annotation.Nullable + private List badges = new ArrayList<>(); public static final String SERIALIZED_NAME_MAX = "max"; @SerializedName(SERIALIZED_NAME_MAX) + @javax.annotation.Nullable private Integer max; public static final String SERIALIZED_NAME_MAX_FAVORITE_GROUPS = "maxFavoriteGroups"; @SerializedName(SERIALIZED_NAME_MAX_FAVORITE_GROUPS) - private Map maxFavoriteGroups = null; + @javax.annotation.Nullable + private Map maxFavoriteGroups = new HashMap<>(); public static final String SERIALIZED_NAME_MAX_FAVORITES_PER_GROUP = "maxFavoritesPerGroup"; @SerializedName(SERIALIZED_NAME_MAX_FAVORITES_PER_GROUP) - private Map maxFavoritesPerGroup = null; + @javax.annotation.Nullable + private Map maxFavoritesPerGroup = new HashMap<>(); public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public PermissionData() { } - public PermissionData badges(List badges) { - + public PermissionData badges(@javax.annotation.Nullable List badges) { this.badges = badges; return this; } @@ -91,48 +94,40 @@ public PermissionData addBadgesItem(String badgesItem) { return this; } - /** + /** * Badges afforded the user by this permission * @return badges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Badges afforded the user by this permission") - public List getBadges() { return badges; } - - public void setBadges(List badges) { + public void setBadges(@javax.annotation.Nullable List badges) { this.badges = badges; } - public PermissionData max(Integer max) { - + public PermissionData max(@javax.annotation.Nullable Integer max) { this.max = max; return this; } - /** + /** * Maximum value afforded the user by this permission * @return max - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum value afforded the user by this permission") - public Integer getMax() { return max; } - - public void setMax(Integer max) { + public void setMax(@javax.annotation.Nullable Integer max) { this.max = max; } - public PermissionData maxFavoriteGroups(Map maxFavoriteGroups) { - + public PermissionData maxFavoriteGroups(@javax.annotation.Nullable Map maxFavoriteGroups) { this.maxFavoriteGroups = maxFavoriteGroups; return this; } @@ -145,25 +140,21 @@ public PermissionData putMaxFavoriteGroupsItem(String key, Integer maxFavoriteGr return this; } - /** + /** * Maximum favorite groups afforded the user by this permission * @return maxFavoriteGroups - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum favorite groups afforded the user by this permission") - public Map getMaxFavoriteGroups() { return maxFavoriteGroups; } - - public void setMaxFavoriteGroups(Map maxFavoriteGroups) { + public void setMaxFavoriteGroups(@javax.annotation.Nullable Map maxFavoriteGroups) { this.maxFavoriteGroups = maxFavoriteGroups; } - public PermissionData maxFavoritesPerGroup(Map maxFavoritesPerGroup) { - + public PermissionData maxFavoritesPerGroup(@javax.annotation.Nullable Map maxFavoritesPerGroup) { this.maxFavoritesPerGroup = maxFavoritesPerGroup; return this; } @@ -176,25 +167,21 @@ public PermissionData putMaxFavoritesPerGroupItem(String key, Integer maxFavorit return this; } - /** + /** * Maximum favorites per group afforded the user by this permission * @return maxFavoritesPerGroup - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Maximum favorites per group afforded the user by this permission") - public Map getMaxFavoritesPerGroup() { return maxFavoritesPerGroup; } - - public void setMaxFavoritesPerGroup(Map maxFavoritesPerGroup) { + public void setMaxFavoritesPerGroup(@javax.annotation.Nullable Map maxFavoritesPerGroup) { this.maxFavoritesPerGroup = maxFavoritesPerGroup; } - public PermissionData tags(List tags) { - + public PermissionData tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -207,19 +194,16 @@ public PermissionData addTagsItem(String tagsItem) { return this; } - /** + /** * Tags afforded the user by this permission * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Tags afforded the user by this permission") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } @@ -264,10 +248,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -276,44 +257,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("badges"); - openapiFields.add("max"); - openapiFields.add("maxFavoriteGroups"); - openapiFields.add("maxFavoritesPerGroup"); - openapiFields.add("tags"); + openapiFields = new HashSet(Arrays.asList("badges", "max", "maxFavoriteGroups", "maxFavoritesPerGroup", "tags")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PermissionData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PermissionData.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PermissionData is not found in the empty JSON string", PermissionData.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PermissionData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PermissionData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PermissionData is not found in the empty JSON string", PermissionData.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PermissionData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PermissionData` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PermissionData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("badges") != null && !jsonObj.get("badges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `badges` to be an array in the JSON string but got `%s`", jsonObj.get("badges").toString())); + if (jsonObj.get("badges") != null && !jsonObj.get("badges").isJsonNull() && !jsonObj.get("badges").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badges` to be an array in the JSON string but got `%s`", jsonObj.get("badges").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -337,31 +314,31 @@ public void write(JsonWriter out, PermissionData value) throws IOException { @Override public PermissionData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PermissionData given an JSON string - * - * @param jsonString JSON string - * @return An instance of PermissionData - * @throws IOException if the JSON string is invalid with respect to PermissionData - */ + /** + * Create an instance of PermissionData given an JSON string + * + * @param jsonString JSON string + * @return An instance of PermissionData + * @throws IOException if the JSON string is invalid with respect to PermissionData + */ public static PermissionData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PermissionData.class); } - /** - * Convert an instance of PermissionData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PermissionData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PlatformBuildInfo.java b/src/main/java/io/github/vrchatapi/model/PlatformBuildInfo.java index 0aa4c950..22385720 100644 --- a/src/main/java/io/github/vrchatapi/model/PlatformBuildInfo.java +++ b/src/main/java/io/github/vrchatapi/model/PlatformBuildInfo.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,55 @@ /** * Build information for a platform */ -@ApiModel(description = "Build information for a platform") -@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 PlatformBuildInfo { public static final String SERIALIZED_NAME_MIN_BUILD_NUMBER = "minBuildNumber"; @SerializedName(SERIALIZED_NAME_MIN_BUILD_NUMBER) + @javax.annotation.Nonnull private Integer minBuildNumber; public static final String SERIALIZED_NAME_REDIRECTION_ADDRESS = "redirectionAddress"; @SerializedName(SERIALIZED_NAME_REDIRECTION_ADDRESS) + @javax.annotation.Nullable private String redirectionAddress; public PlatformBuildInfo() { } - public PlatformBuildInfo minBuildNumber(Integer minBuildNumber) { - + public PlatformBuildInfo minBuildNumber(@javax.annotation.Nonnull Integer minBuildNumber) { this.minBuildNumber = minBuildNumber; return this; } - /** + /** * Minimum build number required for the platform * @return minBuildNumber - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Minimum build number required for the platform") - public Integer getMinBuildNumber() { return minBuildNumber; } - - public void setMinBuildNumber(Integer minBuildNumber) { + public void setMinBuildNumber(@javax.annotation.Nonnull Integer minBuildNumber) { this.minBuildNumber = minBuildNumber; } - public PlatformBuildInfo redirectionAddress(String redirectionAddress) { - + public PlatformBuildInfo redirectionAddress(@javax.annotation.Nullable String redirectionAddress) { this.redirectionAddress = redirectionAddress; return this; } - /** + /** * Redirection URL for updating the app * @return redirectionAddress - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Redirection URL for updating the app") - public String getRedirectionAddress() { return redirectionAddress; } - - public void setRedirectionAddress(String redirectionAddress) { + public void setRedirectionAddress(@javax.annotation.Nullable String redirectionAddress) { this.redirectionAddress = redirectionAddress; } @@ -141,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,44 +143,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("minBuildNumber"); - openapiFields.add("redirectionAddress"); + openapiFields = new HashSet(Arrays.asList("minBuildNumber", "redirectionAddress")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("minBuildNumber"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PlatformBuildInfo - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PlatformBuildInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlatformBuildInfo is not found in the empty JSON string", PlatformBuildInfo.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("minBuildNumber")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PlatformBuildInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PlatformBuildInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PlatformBuildInfo is not found in the empty JSON string", PlatformBuildInfo.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PlatformBuildInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PlatformBuildInfo` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PlatformBuildInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : PlatformBuildInfo.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("redirectionAddress") != null && !jsonObj.get("redirectionAddress").isJsonNull()) && !jsonObj.get("redirectionAddress").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redirectionAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectionAddress").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `redirectionAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectionAddress").toString())); } } @@ -214,31 +202,31 @@ public void write(JsonWriter out, PlatformBuildInfo value) throws IOException { @Override public PlatformBuildInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PlatformBuildInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlatformBuildInfo - * @throws IOException if the JSON string is invalid with respect to PlatformBuildInfo - */ + /** + * Create an instance of PlatformBuildInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of PlatformBuildInfo + * @throws IOException if the JSON string is invalid with respect to PlatformBuildInfo + */ public static PlatformBuildInfo fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PlatformBuildInfo.class); } - /** - * Convert an instance of PlatformBuildInfo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PlatformBuildInfo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PlayerModeration.java b/src/main/java/io/github/vrchatapi/model/PlayerModeration.java index d975f5cc..4b6ccf83 100644 --- a/src/main/java/io/github/vrchatapi/model/PlayerModeration.java +++ b/src/main/java/io/github/vrchatapi/model/PlayerModeration.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.PlayerModerationType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,196 +49,175 @@ /** * PlayerModeration */ -@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 PlayerModeration { public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull private OffsetDateTime created; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_SOURCE_DISPLAY_NAME = "sourceDisplayName"; @SerializedName(SERIALIZED_NAME_SOURCE_DISPLAY_NAME) + @javax.annotation.Nonnull private String sourceDisplayName; public static final String SERIALIZED_NAME_SOURCE_USER_ID = "sourceUserId"; @SerializedName(SERIALIZED_NAME_SOURCE_USER_ID) + @javax.annotation.Nonnull private String sourceUserId; public static final String SERIALIZED_NAME_TARGET_DISPLAY_NAME = "targetDisplayName"; @SerializedName(SERIALIZED_NAME_TARGET_DISPLAY_NAME) + @javax.annotation.Nonnull private String targetDisplayName; public static final String SERIALIZED_NAME_TARGET_USER_ID = "targetUserId"; @SerializedName(SERIALIZED_NAME_TARGET_USER_ID) + @javax.annotation.Nonnull private String targetUserId; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private PlayerModerationType type = PlayerModerationType.UNMUTE; public PlayerModeration() { } - public PlayerModeration created(OffsetDateTime created) { - + public PlayerModeration created(@javax.annotation.Nonnull OffsetDateTime created) { this.created = created; return this; } - /** + /** * Get created * @return created - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreated() { return created; } - - public void setCreated(OffsetDateTime created) { + public void setCreated(@javax.annotation.Nonnull OffsetDateTime created) { this.created = created; } - public PlayerModeration id(String id) { - + public PlayerModeration id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "pmod_25551a8d-6f5d-430a-88d3-9c0ce08b5244", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public PlayerModeration sourceDisplayName(String sourceDisplayName) { - + public PlayerModeration sourceDisplayName(@javax.annotation.Nonnull String sourceDisplayName) { this.sourceDisplayName = sourceDisplayName; return this; } - /** + /** * Get sourceDisplayName * @return sourceDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSourceDisplayName() { return sourceDisplayName; } - - public void setSourceDisplayName(String sourceDisplayName) { + public void setSourceDisplayName(@javax.annotation.Nonnull String sourceDisplayName) { this.sourceDisplayName = sourceDisplayName; } - public PlayerModeration sourceUserId(String sourceUserId) { - + public PlayerModeration sourceUserId(@javax.annotation.Nonnull String sourceUserId) { this.sourceUserId = sourceUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return sourceUserId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getSourceUserId() { return sourceUserId; } - - public void setSourceUserId(String sourceUserId) { + public void setSourceUserId(@javax.annotation.Nonnull String sourceUserId) { this.sourceUserId = sourceUserId; } - public PlayerModeration targetDisplayName(String targetDisplayName) { - + public PlayerModeration targetDisplayName(@javax.annotation.Nonnull String targetDisplayName) { this.targetDisplayName = targetDisplayName; return this; } - /** + /** * Get targetDisplayName * @return targetDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getTargetDisplayName() { return targetDisplayName; } - - public void setTargetDisplayName(String targetDisplayName) { + public void setTargetDisplayName(@javax.annotation.Nonnull String targetDisplayName) { this.targetDisplayName = targetDisplayName; } - public PlayerModeration targetUserId(String targetUserId) { - + public PlayerModeration targetUserId(@javax.annotation.Nonnull String targetUserId) { this.targetUserId = targetUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return targetUserId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getTargetUserId() { return targetUserId; } - - public void setTargetUserId(String targetUserId) { + public void setTargetUserId(@javax.annotation.Nonnull String targetUserId) { this.targetUserId = targetUserId; } - public PlayerModeration type(PlayerModerationType type) { - + public PlayerModeration type(@javax.annotation.Nonnull PlayerModerationType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PlayerModerationType getType() { return type; } - - public void setType(PlayerModerationType type) { + public void setType(@javax.annotation.Nonnull PlayerModerationType type) { this.type = type; } @@ -287,10 +266,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -299,68 +275,57 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created"); - openapiFields.add("id"); - openapiFields.add("sourceDisplayName"); - openapiFields.add("sourceUserId"); - openapiFields.add("targetDisplayName"); - openapiFields.add("targetUserId"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("created", "id", "sourceDisplayName", "sourceUserId", "targetDisplayName", "targetUserId", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("created"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("sourceDisplayName"); - openapiRequiredFields.add("sourceUserId"); - openapiRequiredFields.add("targetDisplayName"); - openapiRequiredFields.add("targetUserId"); - openapiRequiredFields.add("type"); + openapiRequiredFields = new HashSet(Arrays.asList("created", "id", "sourceDisplayName", "sourceUserId", "targetDisplayName", "targetUserId", "type")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PlayerModeration - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PlayerModeration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlayerModeration is not found in the empty JSON string", PlayerModeration.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PlayerModeration + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PlayerModeration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PlayerModeration is not found in the empty JSON string", PlayerModeration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PlayerModeration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PlayerModeration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PlayerModeration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : PlayerModeration.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("sourceDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sourceDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sourceDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceDisplayName").toString())); } if (!jsonObj.get("sourceUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sourceUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sourceUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceUserId").toString())); } if (!jsonObj.get("targetDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `targetDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `targetDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetDisplayName").toString())); } if (!jsonObj.get("targetUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `targetUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `targetUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetUserId").toString())); } + // validate the required field `type` + PlayerModerationType.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -383,31 +348,31 @@ public void write(JsonWriter out, PlayerModeration value) throws IOException { @Override public PlayerModeration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PlayerModeration given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlayerModeration - * @throws IOException if the JSON string is invalid with respect to PlayerModeration - */ + /** + * Create an instance of PlayerModeration given an JSON string + * + * @param jsonString JSON string + * @return An instance of PlayerModeration + * @throws IOException if the JSON string is invalid with respect to PlayerModeration + */ public static PlayerModeration fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PlayerModeration.class); } - /** - * Convert an instance of PlayerModeration to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PlayerModeration to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PlayerModerationType.java b/src/main/java/io/github/vrchatapi/model/PlayerModerationType.java index a67c1216..fe26dcd1 100644 --- a/src/main/java/io/github/vrchatapi/model/PlayerModerationType.java +++ b/src/main/java/io/github/vrchatapi/model/PlayerModerationType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -30,21 +30,21 @@ public enum PlayerModerationType { BLOCK("block"), - HIDEAVATAR("hideAvatar"), + HIDE_AVATAR("hideAvatar"), - INTERACTOFF("interactOff"), + INTERACT_OFF("interactOff"), - INTERACTON("interactOn"), + INTERACT_ON("interactOn"), MUTE("mute"), - MUTECHAT("muteChat"), + MUTE_CHAT("muteChat"), - SHOWAVATAR("showAvatar"), + SHOW_AVATAR("showAvatar"), UNMUTE("unmute"), - UNMUTECHAT("unmuteChat"); + UNMUTE_CHAT("unmuteChat"); private String value; @@ -82,5 +82,10 @@ public PlayerModerationType read(final JsonReader jsonReader) throws IOException return PlayerModerationType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PlayerModerationType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/Print.java b/src/main/java/io/github/vrchatapi/model/Print.java index a891ab22..6b519a0b 100644 --- a/src/main/java/io/github/vrchatapi/model/Print.java +++ b/src/main/java/io/github/vrchatapi/model/Print.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.PrintFiles; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,278 +49,247 @@ /** * Info about a print */ -@ApiModel(description = "Info about a print") -@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 Print { public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nonnull private String authorId; public static final String SERIALIZED_NAME_AUTHOR_NAME = "authorName"; @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nonnull private String authorName; public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_FILES = "files"; @SerializedName(SERIALIZED_NAME_FILES) + @javax.annotation.Nonnull private PrintFiles files; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_NOTE = "note"; @SerializedName(SERIALIZED_NAME_NOTE) + @javax.annotation.Nonnull private String note; public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable private String ownerId; public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; @SerializedName(SERIALIZED_NAME_TIMESTAMP) + @javax.annotation.Nonnull private OffsetDateTime timestamp; public static final String SERIALIZED_NAME_WORLD_ID = "worldId"; @SerializedName(SERIALIZED_NAME_WORLD_ID) + @javax.annotation.Nonnull private String worldId; public static final String SERIALIZED_NAME_WORLD_NAME = "worldName"; @SerializedName(SERIALIZED_NAME_WORLD_NAME) + @javax.annotation.Nonnull private String worldName; public Print() { } - public Print authorId(String authorId) { - + public Print authorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; } - public Print authorName(String authorName) { - + public Print authorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; return this; } - /** + /** * Get authorName * @return authorName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAuthorName() { return authorName; } - - public void setAuthorName(String authorName) { + public void setAuthorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; } - public Print createdAt(OffsetDateTime createdAt) { - + public Print createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public Print files(PrintFiles files) { - + public Print files(@javax.annotation.Nonnull PrintFiles files) { this.files = files; return this; } - /** + /** * Get files * @return files - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public PrintFiles getFiles() { return files; } - - public void setFiles(PrintFiles files) { + public void setFiles(@javax.annotation.Nonnull PrintFiles files) { this.files = files; } - public Print id(String id) { - + public Print id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "prnt_0a0aa0a0-85ea-42eb-b2f7-4840d7f341fa", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Print note(String note) { - + public Print note(@javax.annotation.Nonnull String note) { this.note = note; return this; } - /** + /** * Get note * @return note - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getNote() { return note; } - - public void setNote(String note) { + public void setNote(@javax.annotation.Nonnull String note) { this.note = note; } - public Print ownerId(String ownerId) { - + public Print ownerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return ownerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getOwnerId() { return ownerId; } - - public void setOwnerId(String ownerId) { + public void setOwnerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; } - public Print timestamp(OffsetDateTime timestamp) { - + public Print timestamp(@javax.annotation.Nonnull OffsetDateTime timestamp) { this.timestamp = timestamp; return this; } - /** + /** * Get timestamp * @return timestamp - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getTimestamp() { return timestamp; } - - public void setTimestamp(OffsetDateTime timestamp) { + public void setTimestamp(@javax.annotation.Nonnull OffsetDateTime timestamp) { this.timestamp = timestamp; } - public Print worldId(String worldId) { - + public Print worldId(@javax.annotation.Nonnull String worldId) { this.worldId = worldId; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return worldId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getWorldId() { return worldId; } - - public void setWorldId(String worldId) { + public void setWorldId(@javax.annotation.Nonnull String worldId) { this.worldId = worldId; } - public Print worldName(String worldName) { - + public Print worldName(@javax.annotation.Nonnull String worldName) { this.worldName = worldName; return this; } - /** + /** * Get worldName * @return worldName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getWorldName() { return worldName; } - - public void setWorldName(String worldName) { + public void setWorldName(@javax.annotation.Nonnull String worldName) { this.worldName = worldName; } @@ -375,10 +344,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -387,80 +353,62 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authorId"); - openapiFields.add("authorName"); - openapiFields.add("createdAt"); - openapiFields.add("files"); - openapiFields.add("id"); - openapiFields.add("note"); - openapiFields.add("ownerId"); - openapiFields.add("timestamp"); - openapiFields.add("worldId"); - openapiFields.add("worldName"); + openapiFields = new HashSet(Arrays.asList("authorId", "authorName", "createdAt", "files", "id", "note", "ownerId", "timestamp", "worldId", "worldName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("authorId"); - openapiRequiredFields.add("authorName"); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("files"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("note"); - openapiRequiredFields.add("timestamp"); - openapiRequiredFields.add("worldId"); - openapiRequiredFields.add("worldName"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Print - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Print.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Print is not found in the empty JSON string", Print.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("authorId", "authorName", "createdAt", "files", "id", "note", "timestamp", "worldId", "worldName")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Print + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Print.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Print is not found in the empty JSON string", Print.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Print.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Print` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Print` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Print.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if (!jsonObj.get("authorName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); } // validate the required field `files` - PrintFiles.validateJsonObject(jsonObj.getAsJsonObject("files")); + PrintFiles.validateJsonElement(jsonObj.get("files")); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("note").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); } if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); } if (!jsonObj.get("worldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); } if (!jsonObj.get("worldName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldName").toString())); } } @@ -484,31 +432,31 @@ public void write(JsonWriter out, Print value) throws IOException { @Override public Print read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Print given an JSON string - * - * @param jsonString JSON string - * @return An instance of Print - * @throws IOException if the JSON string is invalid with respect to Print - */ + /** + * Create an instance of Print given an JSON string + * + * @param jsonString JSON string + * @return An instance of Print + * @throws IOException if the JSON string is invalid with respect to Print + */ public static Print fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Print.class); } - /** - * Convert an instance of Print to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Print to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PrintFiles.java b/src/main/java/io/github/vrchatapi/model/PrintFiles.java index e063c836..bb44e5df 100644 --- a/src/main/java/io/github/vrchatapi/model/PrintFiles.java +++ b/src/main/java/io/github/vrchatapi/model/PrintFiles.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * PrintFiles */ -@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 PrintFiles { public static final String SERIALIZED_NAME_FILE_ID = "fileId"; @SerializedName(SERIALIZED_NAME_FILE_ID) + @javax.annotation.Nullable private String fileId; public static final String SERIALIZED_NAME_IMAGE = "image"; @SerializedName(SERIALIZED_NAME_IMAGE) + @javax.annotation.Nullable private String image; public PrintFiles() { } - public PrintFiles fileId(String fileId) { - + public PrintFiles fileId(@javax.annotation.Nullable String fileId) { this.fileId = fileId; return this; } - /** + /** * Get fileId * @return fileId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getFileId() { return fileId; } - - public void setFileId(String fileId) { + public void setFileId(@javax.annotation.Nullable String fileId) { this.fileId = fileId; } - public PrintFiles image(String image) { - + public PrintFiles image(@javax.annotation.Nullable String image) { this.image = image; return this; } - /** + /** * Link to file, e.g. https://api.vrchat.cloud/api/1/file/file_66fe782d-f2bd-4462-9761-1d766d7b2b26/1/file * @return image - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Link to file, e.g. https://api.vrchat.cloud/api/1/file/file_66fe782d-f2bd-4462-9761-1d766d7b2b26/1/file") - public String getImage() { return image; } - - public void setImage(String image) { + public void setImage(@javax.annotation.Nullable String image) { this.image = image; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,39 +143,38 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fileId"); - openapiFields.add("image"); + openapiFields = new HashSet(Arrays.asList("fileId", "image")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PrintFiles - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PrintFiles.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PrintFiles is not found in the empty JSON string", PrintFiles.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PrintFiles + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrintFiles.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PrintFiles is not found in the empty JSON string", PrintFiles.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PrintFiles.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrintFiles` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PrintFiles` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fileId") != null && !jsonObj.get("fileId").isJsonNull()) && !jsonObj.get("fileId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileId").toString())); } if ((jsonObj.get("image") != null && !jsonObj.get("image").isJsonNull()) && !jsonObj.get("image").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `image` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `image` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image").toString())); } } @@ -208,31 +198,31 @@ public void write(JsonWriter out, PrintFiles value) throws IOException { @Override public PrintFiles read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PrintFiles given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrintFiles - * @throws IOException if the JSON string is invalid with respect to PrintFiles - */ + /** + * Create an instance of PrintFiles given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrintFiles + * @throws IOException if the JSON string is invalid with respect to PrintFiles + */ public static PrintFiles fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PrintFiles.class); } - /** - * Convert an instance of PrintFiles to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PrintFiles to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PrivateProfile.java b/src/main/java/io/github/vrchatapi/model/PrivateProfile.java new file mode 100644 index 00000000..47a6a54e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PrivateProfile.java @@ -0,0 +1,347 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.github.vrchatapi.model.PrivateProfileActivity; +import io.github.vrchatapi.model.UserStatus; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * PrivateProfile + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class PrivateProfile { + public static final String SERIALIZED_NAME_ACTIVITY = "activity"; + @SerializedName(SERIALIZED_NAME_ACTIVITY) + @javax.annotation.Nullable + private PrivateProfileActivity activity; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_IS_FRIEND = "isFriend"; + @SerializedName(SERIALIZED_NAME_IS_FRIEND) + @javax.annotation.Nullable + private Boolean isFriend; + + public static final String SERIALIZED_NAME_NOTE = "note"; + @SerializedName(SERIALIZED_NAME_NOTE) + @javax.annotation.Nullable + private String note; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private UserStatus status = UserStatus.OFFLINE; + + public static final String SERIALIZED_NAME_STATUS_DESCRIPTION = "statusDescription"; + @SerializedName(SERIALIZED_NAME_STATUS_DESCRIPTION) + @javax.annotation.Nullable + private String statusDescription; + + public PrivateProfile() { + } + + public PrivateProfile activity(@javax.annotation.Nullable PrivateProfileActivity activity) { + this.activity = activity; + return this; + } + + /** + * Get activity + * @return activity + */ + @javax.annotation.Nullable + public PrivateProfileActivity getActivity() { + return activity; + } + + public void setActivity(@javax.annotation.Nullable PrivateProfileActivity activity) { + this.activity = activity; + } + + + public PrivateProfile id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public PrivateProfile isFriend(@javax.annotation.Nullable Boolean isFriend) { + this.isFriend = isFriend; + return this; + } + + /** + * Get isFriend + * @return isFriend + */ + @javax.annotation.Nullable + public Boolean getIsFriend() { + return isFriend; + } + + public void setIsFriend(@javax.annotation.Nullable Boolean isFriend) { + this.isFriend = isFriend; + } + + + public PrivateProfile note(@javax.annotation.Nullable String note) { + this.note = note; + return this; + } + + /** + * Get note + * @return note + */ + @javax.annotation.Nullable + public String getNote() { + return note; + } + + public void setNote(@javax.annotation.Nullable String note) { + this.note = note; + } + + + public PrivateProfile status(@javax.annotation.Nullable UserStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public UserStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable UserStatus status) { + this.status = status; + } + + + public PrivateProfile statusDescription(@javax.annotation.Nullable String statusDescription) { + this.statusDescription = statusDescription; + return this; + } + + /** + * Get statusDescription + * @return statusDescription + */ + @javax.annotation.Nullable + public String getStatusDescription() { + return statusDescription; + } + + public void setStatusDescription(@javax.annotation.Nullable String statusDescription) { + this.statusDescription = statusDescription; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrivateProfile privateProfile = (PrivateProfile) o; + return Objects.equals(this.activity, privateProfile.activity) && + Objects.equals(this.id, privateProfile.id) && + Objects.equals(this.isFriend, privateProfile.isFriend) && + Objects.equals(this.note, privateProfile.note) && + Objects.equals(this.status, privateProfile.status) && + Objects.equals(this.statusDescription, privateProfile.statusDescription); + } + + @Override + public int hashCode() { + return Objects.hash(activity, id, isFriend, note, status, statusDescription); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrivateProfile {\n"); + sb.append(" activity: ").append(toIndentedString(activity)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isFriend: ").append(toIndentedString(isFriend)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusDescription: ").append(toIndentedString(statusDescription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("activity", "id", "isFriend", "note", "status", "statusDescription")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PrivateProfile + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrivateProfile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PrivateProfile is not found in the empty JSON string", PrivateProfile.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PrivateProfile.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PrivateProfile` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `activity` + if (jsonObj.get("activity") != null && !jsonObj.get("activity").isJsonNull()) { + PrivateProfileActivity.validateJsonElement(jsonObj.get("activity")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("note") != null && !jsonObj.get("note").isJsonNull()) && !jsonObj.get("note").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + UserStatus.validateJsonElement(jsonObj.get("status")); + } + if ((jsonObj.get("statusDescription") != null && !jsonObj.get("statusDescription").isJsonNull()) && !jsonObj.get("statusDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrivateProfile.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrivateProfile' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PrivateProfile.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PrivateProfile value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PrivateProfile read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PrivateProfile given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrivateProfile + * @throws IOException if the JSON string is invalid with respect to PrivateProfile + */ + public static PrivateProfile fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrivateProfile.class); + } + + /** + * Convert an instance of PrivateProfile to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/PrivateProfileActivity.java b/src/main/java/io/github/vrchatapi/model/PrivateProfileActivity.java new file mode 100644 index 00000000..32cd1ad2 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PrivateProfileActivity.java @@ -0,0 +1,464 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.github.vrchatapi.model.UserState; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * PrivateProfileActivity + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class PrivateProfileActivity { + public static final String SERIALIZED_NAME_INSTANCE_ID = "instanceId"; + @SerializedName(SERIALIZED_NAME_INSTANCE_ID) + @javax.annotation.Nullable + private String instanceId; + + public static final String SERIALIZED_NAME_LAST_ACTIVITY = "last_activity"; + @SerializedName(SERIALIZED_NAME_LAST_ACTIVITY) + @javax.annotation.Nullable + private String lastActivity; + + public static final String SERIALIZED_NAME_LAST_LOGIN = "last_login"; + @SerializedName(SERIALIZED_NAME_LAST_LOGIN) + @javax.annotation.Nullable + private String lastLogin; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable + private String location; + + public static final String SERIALIZED_NAME_PLATFORM = "platform"; + @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nullable + private String platform; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private UserState state = UserState.OFFLINE; + + public static final String SERIALIZED_NAME_TRAVELING_TO_INSTANCE = "travelingToInstance"; + @SerializedName(SERIALIZED_NAME_TRAVELING_TO_INSTANCE) + @javax.annotation.Nullable + private String travelingToInstance; + + public static final String SERIALIZED_NAME_TRAVELING_TO_LOCATION = "travelingToLocation"; + @SerializedName(SERIALIZED_NAME_TRAVELING_TO_LOCATION) + @javax.annotation.Nullable + private String travelingToLocation; + + public static final String SERIALIZED_NAME_TRAVELING_TO_WORLD = "travelingToWorld"; + @SerializedName(SERIALIZED_NAME_TRAVELING_TO_WORLD) + @javax.annotation.Nullable + private String travelingToWorld; + + public static final String SERIALIZED_NAME_WORLD_ID = "worldId"; + @SerializedName(SERIALIZED_NAME_WORLD_ID) + @javax.annotation.Nullable + private String worldId; + + public PrivateProfileActivity() { + } + + public PrivateProfileActivity instanceId(@javax.annotation.Nullable String instanceId) { + this.instanceId = instanceId; + return this; + } + + /** + * InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. + * @return instanceId + */ + @javax.annotation.Nullable + public String getInstanceId() { + return instanceId; + } + + public void setInstanceId(@javax.annotation.Nullable String instanceId) { + this.instanceId = instanceId; + } + + + public PrivateProfileActivity lastActivity(@javax.annotation.Nullable String lastActivity) { + this.lastActivity = lastActivity; + return this; + } + + /** + * Either a date-time or an empty string. + * @return lastActivity + */ + @javax.annotation.Nullable + public String getLastActivity() { + return lastActivity; + } + + public void setLastActivity(@javax.annotation.Nullable String lastActivity) { + this.lastActivity = lastActivity; + } + + + public PrivateProfileActivity lastLogin(@javax.annotation.Nullable String lastLogin) { + this.lastLogin = lastLogin; + return this; + } + + /** + * Either a date-time or an empty string. + * @return lastLogin + */ + @javax.annotation.Nullable + public String getLastLogin() { + return lastLogin; + } + + public void setLastLogin(@javax.annotation.Nullable String lastLogin) { + this.lastLogin = lastLogin; + } + + + public PrivateProfileActivity location(@javax.annotation.Nullable String location) { + this.location = location; + return this; + } + + /** + * Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list. + * @return location + */ + @javax.annotation.Nullable + public String getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nullable String location) { + this.location = location; + } + + + public PrivateProfileActivity platform(@javax.annotation.Nullable String platform) { + this.platform = platform; + return this; + } + + /** + * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. + * @return platform + */ + @javax.annotation.Nullable + public String getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nullable String platform) { + this.platform = platform; + } + + + public PrivateProfileActivity state(@javax.annotation.Nullable UserState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public UserState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable UserState state) { + this.state = state; + } + + + public PrivateProfileActivity travelingToInstance(@javax.annotation.Nullable String travelingToInstance) { + this.travelingToInstance = travelingToInstance; + return this; + } + + /** + * Get travelingToInstance + * @return travelingToInstance + */ + @javax.annotation.Nullable + public String getTravelingToInstance() { + return travelingToInstance; + } + + public void setTravelingToInstance(@javax.annotation.Nullable String travelingToInstance) { + this.travelingToInstance = travelingToInstance; + } + + + public PrivateProfileActivity travelingToLocation(@javax.annotation.Nullable String travelingToLocation) { + this.travelingToLocation = travelingToLocation; + return this; + } + + /** + * Get travelingToLocation + * @return travelingToLocation + */ + @javax.annotation.Nullable + public String getTravelingToLocation() { + return travelingToLocation; + } + + public void setTravelingToLocation(@javax.annotation.Nullable String travelingToLocation) { + this.travelingToLocation = travelingToLocation; + } + + + public PrivateProfileActivity travelingToWorld(@javax.annotation.Nullable String travelingToWorld) { + this.travelingToWorld = travelingToWorld; + return this; + } + + /** + * Get travelingToWorld + * @return travelingToWorld + */ + @javax.annotation.Nullable + public String getTravelingToWorld() { + return travelingToWorld; + } + + public void setTravelingToWorld(@javax.annotation.Nullable String travelingToWorld) { + this.travelingToWorld = travelingToWorld; + } + + + public PrivateProfileActivity worldId(@javax.annotation.Nullable String worldId) { + this.worldId = worldId; + return this; + } + + /** + * WorldID be \"offline\" on User profiles if you are not friends with that user. + * @return worldId + */ + @javax.annotation.Nullable + public String getWorldId() { + return worldId; + } + + public void setWorldId(@javax.annotation.Nullable String worldId) { + this.worldId = worldId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrivateProfileActivity privateProfileActivity = (PrivateProfileActivity) o; + return Objects.equals(this.instanceId, privateProfileActivity.instanceId) && + Objects.equals(this.lastActivity, privateProfileActivity.lastActivity) && + Objects.equals(this.lastLogin, privateProfileActivity.lastLogin) && + Objects.equals(this.location, privateProfileActivity.location) && + Objects.equals(this.platform, privateProfileActivity.platform) && + Objects.equals(this.state, privateProfileActivity.state) && + Objects.equals(this.travelingToInstance, privateProfileActivity.travelingToInstance) && + Objects.equals(this.travelingToLocation, privateProfileActivity.travelingToLocation) && + Objects.equals(this.travelingToWorld, privateProfileActivity.travelingToWorld) && + Objects.equals(this.worldId, privateProfileActivity.worldId); + } + + @Override + public int hashCode() { + return Objects.hash(instanceId, lastActivity, lastLogin, location, platform, state, travelingToInstance, travelingToLocation, travelingToWorld, worldId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrivateProfileActivity {\n"); + sb.append(" instanceId: ").append(toIndentedString(instanceId)).append("\n"); + sb.append(" lastActivity: ").append(toIndentedString(lastActivity)).append("\n"); + sb.append(" lastLogin: ").append(toIndentedString(lastLogin)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" travelingToInstance: ").append(toIndentedString(travelingToInstance)).append("\n"); + sb.append(" travelingToLocation: ").append(toIndentedString(travelingToLocation)).append("\n"); + sb.append(" travelingToWorld: ").append(toIndentedString(travelingToWorld)).append("\n"); + sb.append(" worldId: ").append(toIndentedString(worldId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("instanceId", "last_activity", "last_login", "location", "platform", "state", "travelingToInstance", "travelingToLocation", "travelingToWorld", "worldId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PrivateProfileActivity + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrivateProfileActivity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PrivateProfileActivity is not found in the empty JSON string", PrivateProfileActivity.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PrivateProfileActivity.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PrivateProfileActivity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("instanceId") != null && !jsonObj.get("instanceId").isJsonNull()) && !jsonObj.get("instanceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `instanceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceId").toString())); + } + if ((jsonObj.get("last_activity") != null && !jsonObj.get("last_activity").isJsonNull()) && !jsonObj.get("last_activity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_activity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_activity").toString())); + } + if ((jsonObj.get("last_login") != null && !jsonObj.get("last_login").isJsonNull()) && !jsonObj.get("last_login").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_login` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_login").toString())); + } + if ((jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) && !jsonObj.get("location").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); + } + if ((jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) && !jsonObj.get("platform").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + UserState.validateJsonElement(jsonObj.get("state")); + } + if ((jsonObj.get("travelingToInstance") != null && !jsonObj.get("travelingToInstance").isJsonNull()) && !jsonObj.get("travelingToInstance").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `travelingToInstance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToInstance").toString())); + } + if ((jsonObj.get("travelingToLocation") != null && !jsonObj.get("travelingToLocation").isJsonNull()) && !jsonObj.get("travelingToLocation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `travelingToLocation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToLocation").toString())); + } + if ((jsonObj.get("travelingToWorld") != null && !jsonObj.get("travelingToWorld").isJsonNull()) && !jsonObj.get("travelingToWorld").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `travelingToWorld` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToWorld").toString())); + } + if ((jsonObj.get("worldId") != null && !jsonObj.get("worldId").isJsonNull()) && !jsonObj.get("worldId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrivateProfileActivity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrivateProfileActivity' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PrivateProfileActivity.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PrivateProfileActivity value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PrivateProfileActivity read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PrivateProfileActivity given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrivateProfileActivity + * @throws IOException if the JSON string is invalid with respect to PrivateProfileActivity + */ + public static PrivateProfileActivity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrivateProfileActivity.class); + } + + /** + * Convert an instance of PrivateProfileActivity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/Product.java b/src/main/java/io/github/vrchatapi/model/Product.java index 934547be..8ce33554 100644 --- a/src/main/java/io/github/vrchatapi/model/Product.java +++ b/src/main/java/io/github/vrchatapi/model/Product.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,18 +13,16 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ProductType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -38,13 +36,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -52,584 +52,527 @@ /** * Product */ -@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 Product { public static final String SERIALIZED_NAME_ARCHIVED = "archived"; @SerializedName(SERIALIZED_NAME_ARCHIVED) + @javax.annotation.Nullable private Boolean archived; public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nullable private OffsetDateTime created; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_GROUP_ACCESS = "groupAccess"; @SerializedName(SERIALIZED_NAME_GROUP_ACCESS) + @javax.annotation.Nullable private Boolean groupAccess = false; public static final String SERIALIZED_NAME_GROUP_ACCESS_REMOVE = "groupAccessRemove"; @SerializedName(SERIALIZED_NAME_GROUP_ACCESS_REMOVE) + @javax.annotation.Nullable private Boolean groupAccessRemove = false; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nullable private String groupId; public static final String SERIALIZED_NAME_GROUP_ROLE_ID = "groupRoleId"; @SerializedName(SERIALIZED_NAME_GROUP_ROLE_ID) + @javax.annotation.Nullable private String groupRoleId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nonnull private String imageId; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_PARENT_LISTINGS = "parentListings"; @SerializedName(SERIALIZED_NAME_PARENT_LISTINGS) + @javax.annotation.Nonnull private List parentListings = new ArrayList<>(); public static final String SERIALIZED_NAME_PRODUCT_TYPE = "productType"; @SerializedName(SERIALIZED_NAME_PRODUCT_TYPE) + @javax.annotation.Nonnull private ProductType productType = ProductType.UDON; public static final String SERIALIZED_NAME_PRODUCT_TYPE_LABEL = "productTypeLabel"; @SerializedName(SERIALIZED_NAME_PRODUCT_TYPE_LABEL) + @javax.annotation.Nullable private String productTypeLabel; public static final String SERIALIZED_NAME_PURCHASE_COUNT = "purchaseCount"; @SerializedName(SERIALIZED_NAME_PURCHASE_COUNT) + @javax.annotation.Nullable private Integer purchaseCount; public static final String SERIALIZED_NAME_PURCHASE_COUNT_QUANTITY = "purchaseCountQuantity"; @SerializedName(SERIALIZED_NAME_PURCHASE_COUNT_QUANTITY) + @javax.annotation.Nullable private Integer purchaseCountQuantity; public static final String SERIALIZED_NAME_SELLER_DISPLAY_NAME = "sellerDisplayName"; @SerializedName(SERIALIZED_NAME_SELLER_DISPLAY_NAME) + @javax.annotation.Nonnull private String sellerDisplayName; public static final String SERIALIZED_NAME_SELLER_ID = "sellerId"; @SerializedName(SERIALIZED_NAME_SELLER_ID) + @javax.annotation.Nonnull private String sellerId; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_UPDATED = "updated"; @SerializedName(SERIALIZED_NAME_UPDATED) + @javax.annotation.Nullable private OffsetDateTime updated; public static final String SERIALIZED_NAME_USE_FOR_SUBSCRIBER_LIST = "useForSubscriberList"; @SerializedName(SERIALIZED_NAME_USE_FOR_SUBSCRIBER_LIST) + @javax.annotation.Nullable private Boolean useForSubscriberList = false; public Product() { } - public Product archived(Boolean archived) { - + public Product archived(@javax.annotation.Nullable Boolean archived) { this.archived = archived; return this; } - /** + /** * Get archived * @return archived - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getArchived() { return archived; } - - public void setArchived(Boolean archived) { + public void setArchived(@javax.annotation.Nullable Boolean archived) { this.archived = archived; } - public Product created(OffsetDateTime created) { - + public Product created(@javax.annotation.Nullable OffsetDateTime created) { this.created = created; return this; } - /** + /** * Get created * @return created - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreated() { return created; } - - public void setCreated(OffsetDateTime created) { + public void setCreated(@javax.annotation.Nullable OffsetDateTime created) { this.created = created; } - public Product description(String description) { - + public Product description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public Product displayName(String displayName) { - + public Product displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public Product groupAccess(Boolean groupAccess) { - + public Product groupAccess(@javax.annotation.Nullable Boolean groupAccess) { this.groupAccess = groupAccess; return this; } - /** + /** * Get groupAccess * @return groupAccess - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getGroupAccess() { return groupAccess; } - - public void setGroupAccess(Boolean groupAccess) { + public void setGroupAccess(@javax.annotation.Nullable Boolean groupAccess) { this.groupAccess = groupAccess; } - public Product groupAccessRemove(Boolean groupAccessRemove) { - + public Product groupAccessRemove(@javax.annotation.Nullable Boolean groupAccessRemove) { this.groupAccessRemove = groupAccessRemove; return this; } - /** + /** * Get groupAccessRemove * @return groupAccessRemove - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getGroupAccessRemove() { return groupAccessRemove; } - - public void setGroupAccessRemove(Boolean groupAccessRemove) { + public void setGroupAccessRemove(@javax.annotation.Nullable Boolean groupAccessRemove) { this.groupAccessRemove = groupAccessRemove; } - public Product groupId(String groupId) { - + public Product groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } - public Product groupRoleId(String groupRoleId) { - + public Product groupRoleId(@javax.annotation.Nullable String groupRoleId) { this.groupRoleId = groupRoleId; return this; } - /** + /** * Get groupRoleId * @return groupRoleId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grol_459d3911-f672-44bc-b84d-e54ffe7960fe", value = "") - public String getGroupRoleId() { return groupRoleId; } - - public void setGroupRoleId(String groupRoleId) { + public void setGroupRoleId(@javax.annotation.Nullable String groupRoleId) { this.groupRoleId = groupRoleId; } - public Product id(String id) { - + public Product id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "prod_bfbc2315-247a-44d7-bfea-5237f8d56cb4", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Product imageId(String imageId) { - + public Product imageId(@javax.annotation.Nonnull String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", required = true, value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nonnull String imageId) { this.imageId = imageId; } - public Product imageUrl(String imageUrl) { - + public Product imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public Product parentListings(List parentListings) { - + public Product parentListings(@javax.annotation.Nonnull List parentListings) { this.parentListings = parentListings; return this; } public Product addParentListingsItem(String parentListingsItem) { + if (this.parentListings == null) { + this.parentListings = new ArrayList<>(); + } this.parentListings.add(parentListingsItem); return this; } - /** + /** * Get parentListings * @return parentListings - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getParentListings() { return parentListings; } - - public void setParentListings(List parentListings) { + public void setParentListings(@javax.annotation.Nonnull List parentListings) { this.parentListings = parentListings; } - public Product productType(ProductType productType) { - + public Product productType(@javax.annotation.Nonnull ProductType productType) { this.productType = productType; return this; } - /** + /** * Get productType * @return productType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ProductType getProductType() { return productType; } - - public void setProductType(ProductType productType) { + public void setProductType(@javax.annotation.Nonnull ProductType productType) { this.productType = productType; } - public Product productTypeLabel(String productTypeLabel) { - + public Product productTypeLabel(@javax.annotation.Nullable String productTypeLabel) { this.productTypeLabel = productTypeLabel; return this; } - /** + /** * Get productTypeLabel * @return productTypeLabel - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProductTypeLabel() { return productTypeLabel; } - - public void setProductTypeLabel(String productTypeLabel) { + public void setProductTypeLabel(@javax.annotation.Nullable String productTypeLabel) { this.productTypeLabel = productTypeLabel; } - public Product purchaseCount(Integer purchaseCount) { - + public Product purchaseCount(@javax.annotation.Nullable Integer purchaseCount) { this.purchaseCount = purchaseCount; return this; } - /** + /** * Get purchaseCount * @return purchaseCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getPurchaseCount() { return purchaseCount; } - - public void setPurchaseCount(Integer purchaseCount) { + public void setPurchaseCount(@javax.annotation.Nullable Integer purchaseCount) { this.purchaseCount = purchaseCount; } - public Product purchaseCountQuantity(Integer purchaseCountQuantity) { - + public Product purchaseCountQuantity(@javax.annotation.Nullable Integer purchaseCountQuantity) { this.purchaseCountQuantity = purchaseCountQuantity; return this; } - /** + /** * Get purchaseCountQuantity * @return purchaseCountQuantity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getPurchaseCountQuantity() { return purchaseCountQuantity; } - - public void setPurchaseCountQuantity(Integer purchaseCountQuantity) { + public void setPurchaseCountQuantity(@javax.annotation.Nullable Integer purchaseCountQuantity) { this.purchaseCountQuantity = purchaseCountQuantity; } - public Product sellerDisplayName(String sellerDisplayName) { - + public Product sellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { this.sellerDisplayName = sellerDisplayName; return this; } - /** + /** * Get sellerDisplayName * @return sellerDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSellerDisplayName() { return sellerDisplayName; } - - public void setSellerDisplayName(String sellerDisplayName) { + public void setSellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { this.sellerDisplayName = sellerDisplayName; } - public Product sellerId(String sellerId) { - + public Product sellerId(@javax.annotation.Nonnull String sellerId) { this.sellerId = sellerId; return this; } - /** + /** * Get sellerId * @return sellerId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSellerId() { return sellerId; } - - public void setSellerId(String sellerId) { + public void setSellerId(@javax.annotation.Nonnull String sellerId) { this.sellerId = sellerId; } - public Product tags(List tags) { - + public Product tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public Product addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public Product updated(OffsetDateTime updated) { - + public Product updated(@javax.annotation.Nullable OffsetDateTime updated) { this.updated = updated; return this; } - /** + /** * Get updated * @return updated - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdated() { return updated; } - - public void setUpdated(OffsetDateTime updated) { + public void setUpdated(@javax.annotation.Nullable OffsetDateTime updated) { this.updated = updated; } - public Product useForSubscriberList(Boolean useForSubscriberList) { - + public Product useForSubscriberList(@javax.annotation.Nullable Boolean useForSubscriberList) { this.useForSubscriberList = useForSubscriberList; return this; } - /** + /** * Get useForSubscriberList * @return useForSubscriberList - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getUseForSubscriberList() { return useForSubscriberList; } - - public void setUseForSubscriberList(Boolean useForSubscriberList) { + public void setUseForSubscriberList(@javax.annotation.Nullable Boolean useForSubscriberList) { this.useForSubscriberList = useForSubscriberList; } @@ -717,10 +660,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -729,110 +669,83 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("archived"); - openapiFields.add("created"); - openapiFields.add("description"); - openapiFields.add("displayName"); - openapiFields.add("groupAccess"); - openapiFields.add("groupAccessRemove"); - openapiFields.add("groupId"); - openapiFields.add("groupRoleId"); - openapiFields.add("id"); - openapiFields.add("imageId"); - openapiFields.add("imageUrl"); - openapiFields.add("parentListings"); - openapiFields.add("productType"); - openapiFields.add("productTypeLabel"); - openapiFields.add("purchaseCount"); - openapiFields.add("purchaseCountQuantity"); - openapiFields.add("sellerDisplayName"); - openapiFields.add("sellerId"); - openapiFields.add("tags"); - openapiFields.add("updated"); - openapiFields.add("useForSubscriberList"); + openapiFields = new HashSet(Arrays.asList("archived", "created", "description", "displayName", "groupAccess", "groupAccessRemove", "groupId", "groupRoleId", "id", "imageId", "imageUrl", "parentListings", "productType", "productTypeLabel", "purchaseCount", "purchaseCountQuantity", "sellerDisplayName", "sellerId", "tags", "updated", "useForSubscriberList")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageId"); - openapiRequiredFields.add("parentListings"); - openapiRequiredFields.add("productType"); - openapiRequiredFields.add("sellerDisplayName"); - openapiRequiredFields.add("sellerId"); - openapiRequiredFields.add("tags"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Product - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Product.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Product is not found in the empty JSON string", Product.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("description", "displayName", "id", "imageId", "parentListings", "productType", "sellerDisplayName", "sellerId", "tags")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Product + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Product.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Product is not found in the empty JSON string", Product.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Product.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Product` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Product` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Product.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("groupId") != null && !jsonObj.get("groupId").isJsonNull()) && !jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if ((jsonObj.get("groupRoleId") != null && !jsonObj.get("groupRoleId").isJsonNull()) && !jsonObj.get("groupRoleId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupRoleId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupRoleId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupRoleId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupRoleId").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } // ensure the required json array is present if (jsonObj.get("parentListings") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("parentListings").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `parentListings` to be an array in the JSON string but got `%s`", jsonObj.get("parentListings").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentListings` to be an array in the JSON string but got `%s`", jsonObj.get("parentListings").toString())); } + // validate the required field `productType` + ProductType.validateJsonElement(jsonObj.get("productType")); if ((jsonObj.get("productTypeLabel") != null && !jsonObj.get("productTypeLabel").isJsonNull()) && !jsonObj.get("productTypeLabel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `productTypeLabel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productTypeLabel").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `productTypeLabel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productTypeLabel").toString())); } if (!jsonObj.get("sellerDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sellerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sellerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerDisplayName").toString())); } if (!jsonObj.get("sellerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -856,31 +769,31 @@ public void write(JsonWriter out, Product value) throws IOException { @Override public Product read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Product given an JSON string - * - * @param jsonString JSON string - * @return An instance of Product - * @throws IOException if the JSON string is invalid with respect to Product - */ + /** + * Create an instance of Product given an JSON string + * + * @param jsonString JSON string + * @return An instance of Product + * @throws IOException if the JSON string is invalid with respect to Product + */ public static Product fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Product.class); } - /** - * Convert an instance of Product to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Product to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ProductListing.java b/src/main/java/io/github/vrchatapi/model/ProductListing.java index 395a29e0..23436c27 100644 --- a/src/main/java/io/github/vrchatapi/model/ProductListing.java +++ b/src/main/java/io/github/vrchatapi/model/ProductListing.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,11 +22,10 @@ import io.github.vrchatapi.model.ProductListingType; import io.github.vrchatapi.model.ProductListingVariant; import io.github.vrchatapi.model.ProductType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -41,13 +39,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -55,468 +55,454 @@ /** * ProductListing */ -@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 ProductListing { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) + @javax.annotation.Nonnull private Boolean active; public static final String SERIALIZED_NAME_ARCHIVED = "archived"; @SerializedName(SERIALIZED_NAME_ARCHIVED) + @javax.annotation.Nullable private Boolean archived; public static final String SERIALIZED_NAME_BUYER_REFUNDABLE = "buyerRefundable"; @SerializedName(SERIALIZED_NAME_BUYER_REFUNDABLE) + @javax.annotation.Nonnull private Boolean buyerRefundable; public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nullable private OffsetDateTime created; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_DURATION = "duration"; @SerializedName(SERIALIZED_NAME_DURATION) + @javax.annotation.Nullable private Integer duration; public static final String SERIALIZED_NAME_DURATION_TYPE = "durationType"; @SerializedName(SERIALIZED_NAME_DURATION_TYPE) + @javax.annotation.Nullable private String durationType; public static final String SERIALIZED_NAME_GROUP_ICON = "groupIcon"; @SerializedName(SERIALIZED_NAME_GROUP_ICON) + @javax.annotation.Nullable private String groupIcon; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nullable private String groupId; public static final String SERIALIZED_NAME_GROUP_NAME = "groupName"; @SerializedName(SERIALIZED_NAME_GROUP_NAME) + @javax.annotation.Nullable private String groupName; public static final String SERIALIZED_NAME_HAS_AVATAR = "hasAvatar"; @SerializedName(SERIALIZED_NAME_HAS_AVATAR) + @javax.annotation.Nonnull private Boolean hasAvatar; public static final String SERIALIZED_NAME_HAS_UDON = "hasUdon"; @SerializedName(SERIALIZED_NAME_HAS_UDON) + @javax.annotation.Nonnull private Boolean hasUdon; public static final String SERIALIZED_NAME_HYDRATED_PRODUCTS = "hydratedProducts"; @SerializedName(SERIALIZED_NAME_HYDRATED_PRODUCTS) - private List hydratedProducts = null; + @javax.annotation.Nullable + private List hydratedProducts = new ArrayList<>(); public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nullable private String imageId; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_LISTING_TYPE = "listingType"; @SerializedName(SERIALIZED_NAME_LISTING_TYPE) + @javax.annotation.Nonnull private ProductListingType listingType = ProductListingType.SUBSCRIPTION; public static final String SERIALIZED_NAME_LISTING_VARIANTS = "listingVariants"; @SerializedName(SERIALIZED_NAME_LISTING_VARIANTS) - private List listingVariants = null; + @javax.annotation.Nullable + private List listingVariants = new ArrayList<>(); public static final String SERIALIZED_NAME_PERMANENT = "permanent"; @SerializedName(SERIALIZED_NAME_PERMANENT) + @javax.annotation.Nullable private Boolean permanent; public static final String SERIALIZED_NAME_PRICE_TOKENS = "priceTokens"; @SerializedName(SERIALIZED_NAME_PRICE_TOKENS) + @javax.annotation.Nonnull private Integer priceTokens; public static final String SERIALIZED_NAME_PRODUCT_IDS = "productIds"; @SerializedName(SERIALIZED_NAME_PRODUCT_IDS) + @javax.annotation.Nonnull private List productIds = new ArrayList<>(); public static final String SERIALIZED_NAME_PRODUCT_TYPE = "productType"; @SerializedName(SERIALIZED_NAME_PRODUCT_TYPE) + @javax.annotation.Nonnull private ProductType productType = ProductType.UDON; public static final String SERIALIZED_NAME_PRODUCTS = "products"; @SerializedName(SERIALIZED_NAME_PRODUCTS) + @javax.annotation.Nonnull private List products = new ArrayList<>(); public static final String SERIALIZED_NAME_PURCHASE_COUNT = "purchaseCount"; @SerializedName(SERIALIZED_NAME_PURCHASE_COUNT) + @javax.annotation.Nullable private Integer purchaseCount; public static final String SERIALIZED_NAME_PURCHASE_COUNT_QUANTITY = "purchaseCountQuantity"; @SerializedName(SERIALIZED_NAME_PURCHASE_COUNT_QUANTITY) + @javax.annotation.Nullable private Integer purchaseCountQuantity; public static final String SERIALIZED_NAME_QUANTIFIABLE = "quantifiable"; @SerializedName(SERIALIZED_NAME_QUANTIFIABLE) + @javax.annotation.Nullable private Boolean quantifiable; public static final String SERIALIZED_NAME_RECURRABLE = "recurrable"; @SerializedName(SERIALIZED_NAME_RECURRABLE) + @javax.annotation.Nonnull private Boolean recurrable; public static final String SERIALIZED_NAME_REFUNDABLE = "refundable"; @SerializedName(SERIALIZED_NAME_REFUNDABLE) + @javax.annotation.Nonnull private Boolean refundable; public static final String SERIALIZED_NAME_SELLER_DISPLAY_NAME = "sellerDisplayName"; @SerializedName(SERIALIZED_NAME_SELLER_DISPLAY_NAME) + @javax.annotation.Nonnull private String sellerDisplayName; public static final String SERIALIZED_NAME_SELLER_ID = "sellerId"; @SerializedName(SERIALIZED_NAME_SELLER_ID) + @javax.annotation.Nonnull private String sellerId; public static final String SERIALIZED_NAME_SOLD_BY_VRC = "soldByVrc"; @SerializedName(SERIALIZED_NAME_SOLD_BY_VRC) + @javax.annotation.Nullable private Boolean soldByVrc; public static final String SERIALIZED_NAME_STACKABLE = "stackable"; @SerializedName(SERIALIZED_NAME_STACKABLE) + @javax.annotation.Nonnull private Boolean stackable; public static final String SERIALIZED_NAME_STORE_IDS = "storeIds"; @SerializedName(SERIALIZED_NAME_STORE_IDS) + @javax.annotation.Nonnull private List storeIds = new ArrayList<>(); public static final String SERIALIZED_NAME_SUBTITLE = "subtitle"; @SerializedName(SERIALIZED_NAME_SUBTITLE) + @javax.annotation.Nullable private String subtitle; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_UPDATED = "updated"; @SerializedName(SERIALIZED_NAME_UPDATED) + @javax.annotation.Nullable private OffsetDateTime updated; public static final String SERIALIZED_NAME_VRC_PLUS_DISCOUNT_PRICE = "vrcPlusDiscountPrice"; @SerializedName(SERIALIZED_NAME_VRC_PLUS_DISCOUNT_PRICE) + @javax.annotation.Nullable private Integer vrcPlusDiscountPrice; public static final String SERIALIZED_NAME_WHEN_TO_EXPIRE = "whenToExpire"; @SerializedName(SERIALIZED_NAME_WHEN_TO_EXPIRE) + @javax.annotation.Nullable private OffsetDateTime whenToExpire; public ProductListing() { } - public ProductListing active(Boolean active) { - + public ProductListing active(@javax.annotation.Nonnull Boolean active) { this.active = active; return this; } - /** + /** * Get active * @return active - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getActive() { return active; } - - public void setActive(Boolean active) { + public void setActive(@javax.annotation.Nonnull Boolean active) { this.active = active; } - public ProductListing archived(Boolean archived) { - + public ProductListing archived(@javax.annotation.Nullable Boolean archived) { this.archived = archived; return this; } - /** + /** * Get archived * @return archived - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getArchived() { return archived; } - - public void setArchived(Boolean archived) { + public void setArchived(@javax.annotation.Nullable Boolean archived) { this.archived = archived; } - public ProductListing buyerRefundable(Boolean buyerRefundable) { - + public ProductListing buyerRefundable(@javax.annotation.Nonnull Boolean buyerRefundable) { this.buyerRefundable = buyerRefundable; return this; } - /** + /** * Get buyerRefundable * @return buyerRefundable - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getBuyerRefundable() { return buyerRefundable; } - - public void setBuyerRefundable(Boolean buyerRefundable) { + public void setBuyerRefundable(@javax.annotation.Nonnull Boolean buyerRefundable) { this.buyerRefundable = buyerRefundable; } - public ProductListing created(OffsetDateTime created) { - + public ProductListing created(@javax.annotation.Nullable OffsetDateTime created) { this.created = created; return this; } - /** + /** * Get created * @return created - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreated() { return created; } - - public void setCreated(OffsetDateTime created) { + public void setCreated(@javax.annotation.Nullable OffsetDateTime created) { this.created = created; } - public ProductListing description(String description) { - + public ProductListing description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public ProductListing displayName(String displayName) { - + public ProductListing displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public ProductListing duration(Integer duration) { - + public ProductListing duration(@javax.annotation.Nullable Integer duration) { this.duration = duration; return this; } - /** + /** * Get duration * @return duration - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getDuration() { return duration; } - - public void setDuration(Integer duration) { + public void setDuration(@javax.annotation.Nullable Integer duration) { this.duration = duration; } - public ProductListing durationType(String durationType) { - + public ProductListing durationType(@javax.annotation.Nullable String durationType) { this.durationType = durationType; return this; } - /** + /** * Get durationType * @return durationType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDurationType() { return durationType; } - - public void setDurationType(String durationType) { + public void setDurationType(@javax.annotation.Nullable String durationType) { this.durationType = durationType; } - public ProductListing groupIcon(String groupIcon) { - + public ProductListing groupIcon(@javax.annotation.Nullable String groupIcon) { this.groupIcon = groupIcon; return this; } - /** + /** * Get groupIcon * @return groupIcon - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getGroupIcon() { return groupIcon; } - - public void setGroupIcon(String groupIcon) { + public void setGroupIcon(@javax.annotation.Nullable String groupIcon) { this.groupIcon = groupIcon; } - public ProductListing groupId(String groupId) { - + public ProductListing groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } - public ProductListing groupName(String groupName) { - + public ProductListing groupName(@javax.annotation.Nullable String groupName) { this.groupName = groupName; return this; } - /** + /** * Get groupName * @return groupName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getGroupName() { return groupName; } - - public void setGroupName(String groupName) { + public void setGroupName(@javax.annotation.Nullable String groupName) { this.groupName = groupName; } - public ProductListing hasAvatar(Boolean hasAvatar) { - + public ProductListing hasAvatar(@javax.annotation.Nonnull Boolean hasAvatar) { this.hasAvatar = hasAvatar; return this; } - /** + /** * Get hasAvatar * @return hasAvatar - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getHasAvatar() { return hasAvatar; } - - public void setHasAvatar(Boolean hasAvatar) { + public void setHasAvatar(@javax.annotation.Nonnull Boolean hasAvatar) { this.hasAvatar = hasAvatar; } - public ProductListing hasUdon(Boolean hasUdon) { - + public ProductListing hasUdon(@javax.annotation.Nonnull Boolean hasUdon) { this.hasUdon = hasUdon; return this; } - /** + /** * Get hasUdon * @return hasUdon - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getHasUdon() { return hasUdon; } - - public void setHasUdon(Boolean hasUdon) { + public void setHasUdon(@javax.annotation.Nonnull Boolean hasUdon) { this.hasUdon = hasUdon; } - public ProductListing hydratedProducts(List hydratedProducts) { - + public ProductListing hydratedProducts(@javax.annotation.Nullable List hydratedProducts) { this.hydratedProducts = hydratedProducts; return this; } @@ -529,117 +515,97 @@ public ProductListing addHydratedProductsItem(Product hydratedProductsItem) { return this; } - /** + /** * Get hydratedProducts * @return hydratedProducts - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getHydratedProducts() { return hydratedProducts; } - - public void setHydratedProducts(List hydratedProducts) { + public void setHydratedProducts(@javax.annotation.Nullable List hydratedProducts) { this.hydratedProducts = hydratedProducts; } - public ProductListing id(String id) { - + public ProductListing id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "prod_bfbc2315-247a-44d7-bfea-5237f8d56cb4", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public ProductListing imageId(String imageId) { - + public ProductListing imageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; } - public ProductListing imageUrl(String imageUrl) { - + public ProductListing imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public ProductListing listingType(ProductListingType listingType) { - + public ProductListing listingType(@javax.annotation.Nonnull ProductListingType listingType) { this.listingType = listingType; return this; } - /** + /** * Get listingType * @return listingType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ProductListingType getListingType() { return listingType; } - - public void setListingType(ProductListingType listingType) { + public void setListingType(@javax.annotation.Nonnull ProductListingType listingType) { this.listingType = listingType; } - public ProductListing listingVariants(List listingVariants) { - + public ProductListing listingVariants(@javax.annotation.Nullable List listingVariants) { this.listingVariants = listingVariants; return this; } @@ -652,408 +618,349 @@ public ProductListing addListingVariantsItem(ProductListingVariant listingVarian return this; } - /** + /** * Get listingVariants * @return listingVariants - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getListingVariants() { return listingVariants; } - - public void setListingVariants(List listingVariants) { + public void setListingVariants(@javax.annotation.Nullable List listingVariants) { this.listingVariants = listingVariants; } - public ProductListing permanent(Boolean permanent) { - + public ProductListing permanent(@javax.annotation.Nullable Boolean permanent) { this.permanent = permanent; return this; } - /** + /** * Get permanent * @return permanent - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getPermanent() { return permanent; } - - public void setPermanent(Boolean permanent) { + public void setPermanent(@javax.annotation.Nullable Boolean permanent) { this.permanent = permanent; } - public ProductListing priceTokens(Integer priceTokens) { - + public ProductListing priceTokens(@javax.annotation.Nonnull Integer priceTokens) { this.priceTokens = priceTokens; return this; } - /** + /** * Get priceTokens * @return priceTokens - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPriceTokens() { return priceTokens; } - - public void setPriceTokens(Integer priceTokens) { + public void setPriceTokens(@javax.annotation.Nonnull Integer priceTokens) { this.priceTokens = priceTokens; } - public ProductListing productIds(List productIds) { - + public ProductListing productIds(@javax.annotation.Nonnull List productIds) { this.productIds = productIds; return this; } public ProductListing addProductIdsItem(String productIdsItem) { + if (this.productIds == null) { + this.productIds = new ArrayList<>(); + } this.productIds.add(productIdsItem); return this; } - /** + /** * Get productIds * @return productIds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getProductIds() { return productIds; } - - public void setProductIds(List productIds) { + public void setProductIds(@javax.annotation.Nonnull List productIds) { this.productIds = productIds; } - public ProductListing productType(ProductType productType) { - + public ProductListing productType(@javax.annotation.Nonnull ProductType productType) { this.productType = productType; return this; } - /** + /** * Get productType * @return productType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ProductType getProductType() { return productType; } - - public void setProductType(ProductType productType) { + public void setProductType(@javax.annotation.Nonnull ProductType productType) { this.productType = productType; } - public ProductListing products(List products) { - + public ProductListing products(@javax.annotation.Nonnull List products) { this.products = products; return this; } public ProductListing addProductsItem(Object productsItem) { + if (this.products == null) { + this.products = new ArrayList<>(); + } this.products.add(productsItem); return this; } - /** + /** * Get products * @return products - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getProducts() { return products; } - - public void setProducts(List products) { + public void setProducts(@javax.annotation.Nonnull List products) { this.products = products; } - public ProductListing purchaseCount(Integer purchaseCount) { - + public ProductListing purchaseCount(@javax.annotation.Nullable Integer purchaseCount) { this.purchaseCount = purchaseCount; return this; } - /** + /** * Get purchaseCount * @return purchaseCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getPurchaseCount() { return purchaseCount; } - - public void setPurchaseCount(Integer purchaseCount) { + public void setPurchaseCount(@javax.annotation.Nullable Integer purchaseCount) { this.purchaseCount = purchaseCount; } - public ProductListing purchaseCountQuantity(Integer purchaseCountQuantity) { - + public ProductListing purchaseCountQuantity(@javax.annotation.Nullable Integer purchaseCountQuantity) { this.purchaseCountQuantity = purchaseCountQuantity; return this; } - /** + /** * Get purchaseCountQuantity * @return purchaseCountQuantity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getPurchaseCountQuantity() { return purchaseCountQuantity; } - - public void setPurchaseCountQuantity(Integer purchaseCountQuantity) { + public void setPurchaseCountQuantity(@javax.annotation.Nullable Integer purchaseCountQuantity) { this.purchaseCountQuantity = purchaseCountQuantity; } - public ProductListing quantifiable(Boolean quantifiable) { - + public ProductListing quantifiable(@javax.annotation.Nullable Boolean quantifiable) { this.quantifiable = quantifiable; return this; } - /** + /** * Get quantifiable * @return quantifiable - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getQuantifiable() { return quantifiable; } - - public void setQuantifiable(Boolean quantifiable) { + public void setQuantifiable(@javax.annotation.Nullable Boolean quantifiable) { this.quantifiable = quantifiable; } - public ProductListing recurrable(Boolean recurrable) { - + public ProductListing recurrable(@javax.annotation.Nonnull Boolean recurrable) { this.recurrable = recurrable; return this; } - /** + /** * Get recurrable * @return recurrable - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getRecurrable() { return recurrable; } - - public void setRecurrable(Boolean recurrable) { + public void setRecurrable(@javax.annotation.Nonnull Boolean recurrable) { this.recurrable = recurrable; } - public ProductListing refundable(Boolean refundable) { - + public ProductListing refundable(@javax.annotation.Nonnull Boolean refundable) { this.refundable = refundable; return this; } - /** + /** * Get refundable * @return refundable - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getRefundable() { return refundable; } - - public void setRefundable(Boolean refundable) { + public void setRefundable(@javax.annotation.Nonnull Boolean refundable) { this.refundable = refundable; } - public ProductListing sellerDisplayName(String sellerDisplayName) { - + public ProductListing sellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { this.sellerDisplayName = sellerDisplayName; return this; } - /** + /** * Get sellerDisplayName * @return sellerDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSellerDisplayName() { return sellerDisplayName; } - - public void setSellerDisplayName(String sellerDisplayName) { + public void setSellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { this.sellerDisplayName = sellerDisplayName; } - public ProductListing sellerId(String sellerId) { - + public ProductListing sellerId(@javax.annotation.Nonnull String sellerId) { this.sellerId = sellerId; return this; } - /** + /** * Get sellerId * @return sellerId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSellerId() { return sellerId; } - - public void setSellerId(String sellerId) { + public void setSellerId(@javax.annotation.Nonnull String sellerId) { this.sellerId = sellerId; } - public ProductListing soldByVrc(Boolean soldByVrc) { - + public ProductListing soldByVrc(@javax.annotation.Nullable Boolean soldByVrc) { this.soldByVrc = soldByVrc; return this; } - /** + /** * Get soldByVrc * @return soldByVrc - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getSoldByVrc() { return soldByVrc; } - - public void setSoldByVrc(Boolean soldByVrc) { + public void setSoldByVrc(@javax.annotation.Nullable Boolean soldByVrc) { this.soldByVrc = soldByVrc; } - public ProductListing stackable(Boolean stackable) { - + public ProductListing stackable(@javax.annotation.Nonnull Boolean stackable) { this.stackable = stackable; return this; } - /** + /** * Get stackable * @return stackable - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getStackable() { return stackable; } - - public void setStackable(Boolean stackable) { + public void setStackable(@javax.annotation.Nonnull Boolean stackable) { this.stackable = stackable; } - public ProductListing storeIds(List storeIds) { - + public ProductListing storeIds(@javax.annotation.Nonnull List storeIds) { this.storeIds = storeIds; return this; } public ProductListing addStoreIdsItem(String storeIdsItem) { + if (this.storeIds == null) { + this.storeIds = new ArrayList<>(); + } this.storeIds.add(storeIdsItem); return this; } - /** + /** * Get storeIds * @return storeIds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getStoreIds() { return storeIds; } - - public void setStoreIds(List storeIds) { + public void setStoreIds(@javax.annotation.Nonnull List storeIds) { this.storeIds = storeIds; } - public ProductListing subtitle(String subtitle) { - + public ProductListing subtitle(@javax.annotation.Nullable String subtitle) { this.subtitle = subtitle; return this; } - /** + /** * Get subtitle * @return subtitle - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getSubtitle() { return subtitle; } - - public void setSubtitle(String subtitle) { + public void setSubtitle(@javax.annotation.Nullable String subtitle) { this.subtitle = subtitle; } - public ProductListing tags(List tags) { - + public ProductListing tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -1066,88 +973,73 @@ public ProductListing addTagsItem(String tagsItem) { return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public ProductListing updated(OffsetDateTime updated) { - + public ProductListing updated(@javax.annotation.Nullable OffsetDateTime updated) { this.updated = updated; return this; } - /** + /** * Get updated * @return updated - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdated() { return updated; } - - public void setUpdated(OffsetDateTime updated) { + public void setUpdated(@javax.annotation.Nullable OffsetDateTime updated) { this.updated = updated; } - public ProductListing vrcPlusDiscountPrice(Integer vrcPlusDiscountPrice) { - + public ProductListing vrcPlusDiscountPrice(@javax.annotation.Nullable Integer vrcPlusDiscountPrice) { this.vrcPlusDiscountPrice = vrcPlusDiscountPrice; return this; } - /** + /** * Get vrcPlusDiscountPrice * @return vrcPlusDiscountPrice - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getVrcPlusDiscountPrice() { return vrcPlusDiscountPrice; } - - public void setVrcPlusDiscountPrice(Integer vrcPlusDiscountPrice) { + public void setVrcPlusDiscountPrice(@javax.annotation.Nullable Integer vrcPlusDiscountPrice) { this.vrcPlusDiscountPrice = vrcPlusDiscountPrice; } - public ProductListing whenToExpire(OffsetDateTime whenToExpire) { - + public ProductListing whenToExpire(@javax.annotation.Nullable OffsetDateTime whenToExpire) { this.whenToExpire = whenToExpire; return this; } - /** + /** * Get whenToExpire * @return whenToExpire - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getWhenToExpire() { return whenToExpire; } - - public void setWhenToExpire(OffsetDateTime whenToExpire) { + public void setWhenToExpire(@javax.annotation.Nullable OffsetDateTime whenToExpire) { this.whenToExpire = whenToExpire; } @@ -1271,10 +1163,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -1283,148 +1172,94 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("active"); - openapiFields.add("archived"); - openapiFields.add("buyerRefundable"); - openapiFields.add("created"); - openapiFields.add("description"); - openapiFields.add("displayName"); - openapiFields.add("duration"); - openapiFields.add("durationType"); - openapiFields.add("groupIcon"); - openapiFields.add("groupId"); - openapiFields.add("groupName"); - openapiFields.add("hasAvatar"); - openapiFields.add("hasUdon"); - openapiFields.add("hydratedProducts"); - openapiFields.add("id"); - openapiFields.add("imageId"); - openapiFields.add("imageUrl"); - openapiFields.add("listingType"); - openapiFields.add("listingVariants"); - openapiFields.add("permanent"); - openapiFields.add("priceTokens"); - openapiFields.add("productIds"); - openapiFields.add("productType"); - openapiFields.add("products"); - openapiFields.add("purchaseCount"); - openapiFields.add("purchaseCountQuantity"); - openapiFields.add("quantifiable"); - openapiFields.add("recurrable"); - openapiFields.add("refundable"); - openapiFields.add("sellerDisplayName"); - openapiFields.add("sellerId"); - openapiFields.add("soldByVrc"); - openapiFields.add("stackable"); - openapiFields.add("storeIds"); - openapiFields.add("subtitle"); - openapiFields.add("tags"); - openapiFields.add("updated"); - openapiFields.add("vrcPlusDiscountPrice"); - openapiFields.add("whenToExpire"); + openapiFields = new HashSet(Arrays.asList("active", "archived", "buyerRefundable", "created", "description", "displayName", "duration", "durationType", "groupIcon", "groupId", "groupName", "hasAvatar", "hasUdon", "hydratedProducts", "id", "imageId", "imageUrl", "listingType", "listingVariants", "permanent", "priceTokens", "productIds", "productType", "products", "purchaseCount", "purchaseCountQuantity", "quantifiable", "recurrable", "refundable", "sellerDisplayName", "sellerId", "soldByVrc", "stackable", "storeIds", "subtitle", "tags", "updated", "vrcPlusDiscountPrice", "whenToExpire")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("active"); - openapiRequiredFields.add("buyerRefundable"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("hasAvatar"); - openapiRequiredFields.add("hasUdon"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("listingType"); - openapiRequiredFields.add("priceTokens"); - openapiRequiredFields.add("productIds"); - openapiRequiredFields.add("productType"); - openapiRequiredFields.add("products"); - openapiRequiredFields.add("recurrable"); - openapiRequiredFields.add("refundable"); - openapiRequiredFields.add("sellerDisplayName"); - openapiRequiredFields.add("sellerId"); - openapiRequiredFields.add("stackable"); - openapiRequiredFields.add("storeIds"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ProductListing - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ProductListing.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProductListing is not found in the empty JSON string", ProductListing.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("active", "buyerRefundable", "description", "displayName", "hasAvatar", "hasUdon", "id", "listingType", "priceTokens", "productIds", "productType", "products", "recurrable", "refundable", "sellerDisplayName", "sellerId", "stackable", "storeIds")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductListing + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductListing.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ProductListing is not found in the empty JSON string", ProductListing.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ProductListing.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductListing` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ProductListing` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ProductListing.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("durationType") != null && !jsonObj.get("durationType").isJsonNull()) && !jsonObj.get("durationType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `durationType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("durationType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `durationType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("durationType").toString())); } if ((jsonObj.get("groupIcon") != null && !jsonObj.get("groupIcon").isJsonNull()) && !jsonObj.get("groupIcon").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupIcon").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupIcon").toString())); } if ((jsonObj.get("groupId") != null && !jsonObj.get("groupId").isJsonNull()) && !jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if ((jsonObj.get("groupName") != null && !jsonObj.get("groupName").isJsonNull()) && !jsonObj.get("groupName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString())); } if (jsonObj.get("hydratedProducts") != null && !jsonObj.get("hydratedProducts").isJsonNull()) { JsonArray jsonArrayhydratedProducts = jsonObj.getAsJsonArray("hydratedProducts"); if (jsonArrayhydratedProducts != null) { // ensure the json data is an array if (!jsonObj.get("hydratedProducts").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `hydratedProducts` to be an array in the JSON string but got `%s`", jsonObj.get("hydratedProducts").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `hydratedProducts` to be an array in the JSON string but got `%s`", jsonObj.get("hydratedProducts").toString())); } // validate the optional field `hydratedProducts` (array) for (int i = 0; i < jsonArrayhydratedProducts.size(); i++) { - Product.validateJsonObject(jsonArrayhydratedProducts.get(i).getAsJsonObject()); + Product.validateJsonElement(jsonArrayhydratedProducts.get(i)); }; } } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } + // validate the required field `listingType` + ProductListingType.validateJsonElement(jsonObj.get("listingType")); if (jsonObj.get("listingVariants") != null && !jsonObj.get("listingVariants").isJsonNull()) { JsonArray jsonArraylistingVariants = jsonObj.getAsJsonArray("listingVariants"); if (jsonArraylistingVariants != null) { // ensure the json data is an array if (!jsonObj.get("listingVariants").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `listingVariants` to be an array in the JSON string but got `%s`", jsonObj.get("listingVariants").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingVariants` to be an array in the JSON string but got `%s`", jsonObj.get("listingVariants").toString())); } // validate the optional field `listingVariants` (array) for (int i = 0; i < jsonArraylistingVariants.size(); i++) { - ProductListingVariant.validateJsonObject(jsonArraylistingVariants.get(i).getAsJsonObject()); + ProductListingVariant.validateJsonElement(jsonArraylistingVariants.get(i)); }; } } @@ -1432,32 +1267,34 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.get("productIds") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("productIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `productIds` to be an array in the JSON string but got `%s`", jsonObj.get("productIds").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `productIds` to be an array in the JSON string but got `%s`", jsonObj.get("productIds").toString())); } + // validate the required field `productType` + ProductType.validateJsonElement(jsonObj.get("productType")); // ensure the required json array is present if (jsonObj.get("products") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("products").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `products` to be an array in the JSON string but got `%s`", jsonObj.get("products").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `products` to be an array in the JSON string but got `%s`", jsonObj.get("products").toString())); } if (!jsonObj.get("sellerDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sellerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sellerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerDisplayName").toString())); } if (!jsonObj.get("sellerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); } // ensure the required json array is present if (jsonObj.get("storeIds") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("storeIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `storeIds` to be an array in the JSON string but got `%s`", jsonObj.get("storeIds").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `storeIds` to be an array in the JSON string but got `%s`", jsonObj.get("storeIds").toString())); } if ((jsonObj.get("subtitle") != null && !jsonObj.get("subtitle").isJsonNull()) && !jsonObj.get("subtitle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subtitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subtitle").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subtitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subtitle").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -1481,31 +1318,31 @@ public void write(JsonWriter out, ProductListing value) throws IOException { @Override public ProductListing read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ProductListing given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProductListing - * @throws IOException if the JSON string is invalid with respect to ProductListing - */ + /** + * Create an instance of ProductListing given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductListing + * @throws IOException if the JSON string is invalid with respect to ProductListing + */ public static ProductListing fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ProductListing.class); } - /** - * Convert an instance of ProductListing to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ProductListing to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ProductListingType.java b/src/main/java/io/github/vrchatapi/model/ProductListingType.java index cea9f937..d8a83036 100644 --- a/src/main/java/io/github/vrchatapi/model/ProductListingType.java +++ b/src/main/java/io/github/vrchatapi/model/ProductListingType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -72,5 +72,10 @@ public ProductListingType read(final JsonReader jsonReader) throws IOException { return ProductListingType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ProductListingType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/ProductListingVariant.java b/src/main/java/io/github/vrchatapi/model/ProductListingVariant.java index 05410d97..abb5ff4a 100644 --- a/src/main/java/io/github/vrchatapi/model/ProductListingVariant.java +++ b/src/main/java/io/github/vrchatapi/model/ProductListingVariant.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,169 +48,151 @@ /** * ProductListingVariant */ -@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 ProductListingVariant { public static final String SERIALIZED_NAME_EFFECTIVE_FROM = "effectiveFrom"; @SerializedName(SERIALIZED_NAME_EFFECTIVE_FROM) + @javax.annotation.Nullable private OffsetDateTime effectiveFrom; public static final String SERIALIZED_NAME_LISTING_VARIANT_ID = "listingVariantId"; @SerializedName(SERIALIZED_NAME_LISTING_VARIANT_ID) + @javax.annotation.Nonnull private String listingVariantId; public static final String SERIALIZED_NAME_NON_REFUNDABLE = "nonRefundable"; @SerializedName(SERIALIZED_NAME_NON_REFUNDABLE) + @javax.annotation.Nonnull private Boolean nonRefundable; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @SerializedName(SERIALIZED_NAME_QUANTITY) + @javax.annotation.Nonnull private Integer quantity; public static final String SERIALIZED_NAME_SELLER_VARIANT = "sellerVariant"; @SerializedName(SERIALIZED_NAME_SELLER_VARIANT) + @javax.annotation.Nonnull private Boolean sellerVariant; public static final String SERIALIZED_NAME_UNIT_PRICE_TOKENS = "unitPriceTokens"; @SerializedName(SERIALIZED_NAME_UNIT_PRICE_TOKENS) + @javax.annotation.Nonnull private Integer unitPriceTokens; public ProductListingVariant() { } - public ProductListingVariant effectiveFrom(OffsetDateTime effectiveFrom) { - + public ProductListingVariant effectiveFrom(@javax.annotation.Nullable OffsetDateTime effectiveFrom) { this.effectiveFrom = effectiveFrom; return this; } - /** + /** * Get effectiveFrom * @return effectiveFrom - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getEffectiveFrom() { return effectiveFrom; } - - public void setEffectiveFrom(OffsetDateTime effectiveFrom) { + public void setEffectiveFrom(@javax.annotation.Nullable OffsetDateTime effectiveFrom) { this.effectiveFrom = effectiveFrom; } - public ProductListingVariant listingVariantId(String listingVariantId) { - + public ProductListingVariant listingVariantId(@javax.annotation.Nonnull String listingVariantId) { this.listingVariantId = listingVariantId; return this; } - /** + /** * Get listingVariantId * @return listingVariantId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "listvar_e8658b56-1662-436c-935a-afcf6a7d4fed", required = true, value = "") - public String getListingVariantId() { return listingVariantId; } - - public void setListingVariantId(String listingVariantId) { + public void setListingVariantId(@javax.annotation.Nonnull String listingVariantId) { this.listingVariantId = listingVariantId; } - public ProductListingVariant nonRefundable(Boolean nonRefundable) { - + public ProductListingVariant nonRefundable(@javax.annotation.Nonnull Boolean nonRefundable) { this.nonRefundable = nonRefundable; return this; } - /** + /** * Get nonRefundable * @return nonRefundable - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getNonRefundable() { return nonRefundable; } - - public void setNonRefundable(Boolean nonRefundable) { + public void setNonRefundable(@javax.annotation.Nonnull Boolean nonRefundable) { this.nonRefundable = nonRefundable; } - public ProductListingVariant quantity(Integer quantity) { - + public ProductListingVariant quantity(@javax.annotation.Nonnull Integer quantity) { this.quantity = quantity; return this; } - /** + /** * Get quantity * @return quantity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getQuantity() { return quantity; } - - public void setQuantity(Integer quantity) { + public void setQuantity(@javax.annotation.Nonnull Integer quantity) { this.quantity = quantity; } - public ProductListingVariant sellerVariant(Boolean sellerVariant) { - + public ProductListingVariant sellerVariant(@javax.annotation.Nonnull Boolean sellerVariant) { this.sellerVariant = sellerVariant; return this; } - /** + /** * Get sellerVariant * @return sellerVariant - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getSellerVariant() { return sellerVariant; } - - public void setSellerVariant(Boolean sellerVariant) { + public void setSellerVariant(@javax.annotation.Nonnull Boolean sellerVariant) { this.sellerVariant = sellerVariant; } - public ProductListingVariant unitPriceTokens(Integer unitPriceTokens) { - + public ProductListingVariant unitPriceTokens(@javax.annotation.Nonnull Integer unitPriceTokens) { this.unitPriceTokens = unitPriceTokens; return this; } - /** + /** * Get unitPriceTokens * @return unitPriceTokens - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getUnitPriceTokens() { return unitPriceTokens; } - - public void setUnitPriceTokens(Integer unitPriceTokens) { + public void setUnitPriceTokens(@javax.annotation.Nonnull Integer unitPriceTokens) { this.unitPriceTokens = unitPriceTokens; } @@ -257,10 +239,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -269,52 +248,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("effectiveFrom"); - openapiFields.add("listingVariantId"); - openapiFields.add("nonRefundable"); - openapiFields.add("quantity"); - openapiFields.add("sellerVariant"); - openapiFields.add("unitPriceTokens"); + openapiFields = new HashSet(Arrays.asList("effectiveFrom", "listingVariantId", "nonRefundable", "quantity", "sellerVariant", "unitPriceTokens")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("listingVariantId"); - openapiRequiredFields.add("nonRefundable"); - openapiRequiredFields.add("quantity"); - openapiRequiredFields.add("sellerVariant"); - openapiRequiredFields.add("unitPriceTokens"); + openapiRequiredFields = new HashSet(Arrays.asList("listingVariantId", "nonRefundable", "quantity", "sellerVariant", "unitPriceTokens")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ProductListingVariant - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ProductListingVariant.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProductListingVariant is not found in the empty JSON string", ProductListingVariant.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductListingVariant + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductListingVariant.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ProductListingVariant is not found in the empty JSON string", ProductListingVariant.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ProductListingVariant.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductListingVariant` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ProductListingVariant` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ProductListingVariant.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("listingVariantId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingVariantId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingVariantId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingVariantId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingVariantId").toString())); } } @@ -338,31 +307,31 @@ public void write(JsonWriter out, ProductListingVariant value) throws IOExceptio @Override public ProductListingVariant read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ProductListingVariant given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProductListingVariant - * @throws IOException if the JSON string is invalid with respect to ProductListingVariant - */ + /** + * Create an instance of ProductListingVariant given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductListingVariant + * @throws IOException if the JSON string is invalid with respect to ProductListingVariant + */ public static ProductListingVariant fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ProductListingVariant.class); } - /** - * Convert an instance of ProductListingVariant to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ProductListingVariant to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ProductPurchase.java b/src/main/java/io/github/vrchatapi/model/ProductPurchase.java index bd581bb1..26af5aa8 100644 --- a/src/main/java/io/github/vrchatapi/model/ProductPurchase.java +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchase.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,11 +21,10 @@ import io.github.vrchatapi.model.ProductListingType; import io.github.vrchatapi.model.ProductPurchaseProduct; import io.github.vrchatapi.model.ProductPurchasePurchaseContext; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -39,13 +37,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -53,1119 +53,999 @@ /** * ProductPurchase */ -@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 ProductPurchase { public static final String SERIALIZED_NAME_BUYER_DISPLAY_NAME = "buyerDisplayName"; @SerializedName(SERIALIZED_NAME_BUYER_DISPLAY_NAME) + @javax.annotation.Nonnull private String buyerDisplayName; public static final String SERIALIZED_NAME_BUYER_ID = "buyerId"; @SerializedName(SERIALIZED_NAME_BUYER_ID) + @javax.annotation.Nonnull private String buyerId; public static final String SERIALIZED_NAME_FIRST_PARTY = "firstParty"; @SerializedName(SERIALIZED_NAME_FIRST_PARTY) + @javax.annotation.Nullable private Boolean firstParty; public static final String SERIALIZED_NAME_IS_BUYER = "isBuyer"; @SerializedName(SERIALIZED_NAME_IS_BUYER) + @javax.annotation.Nonnull private Boolean isBuyer; public static final String SERIALIZED_NAME_IS_GIFT = "isGift"; @SerializedName(SERIALIZED_NAME_IS_GIFT) + @javax.annotation.Nonnull private Boolean isGift; public static final String SERIALIZED_NAME_IS_RECEIVER = "isReceiver"; @SerializedName(SERIALIZED_NAME_IS_RECEIVER) + @javax.annotation.Nonnull private Boolean isReceiver; public static final String SERIALIZED_NAME_IS_SELLER = "isSeller"; @SerializedName(SERIALIZED_NAME_IS_SELLER) + @javax.annotation.Nonnull private Boolean isSeller; public static final String SERIALIZED_NAME_LEDGER_TRANSACTION_ID = "ledgerTransactionId"; @SerializedName(SERIALIZED_NAME_LEDGER_TRANSACTION_ID) + @javax.annotation.Nullable private Integer ledgerTransactionId; public static final String SERIALIZED_NAME_LISTING_CURRENTLY_AVAILABLE = "listingCurrentlyAvailable"; @SerializedName(SERIALIZED_NAME_LISTING_CURRENTLY_AVAILABLE) + @javax.annotation.Nonnull private Boolean listingCurrentlyAvailable; public static final String SERIALIZED_NAME_LISTING_DESCRIPTION = "listingDescription"; @SerializedName(SERIALIZED_NAME_LISTING_DESCRIPTION) + @javax.annotation.Nullable private String listingDescription; public static final String SERIALIZED_NAME_LISTING_DISPLAY_NAME = "listingDisplayName"; @SerializedName(SERIALIZED_NAME_LISTING_DISPLAY_NAME) + @javax.annotation.Nonnull private String listingDisplayName; public static final String SERIALIZED_NAME_LISTING_ID = "listingId"; @SerializedName(SERIALIZED_NAME_LISTING_ID) + @javax.annotation.Nonnull private String listingId; public static final String SERIALIZED_NAME_LISTING_IMAGE_ID = "listingImageId"; @SerializedName(SERIALIZED_NAME_LISTING_IMAGE_ID) + @javax.annotation.Nonnull private String listingImageId; public static final String SERIALIZED_NAME_LISTING_SUBTITLE = "listingSubtitle"; @SerializedName(SERIALIZED_NAME_LISTING_SUBTITLE) + @javax.annotation.Nonnull private String listingSubtitle; public static final String SERIALIZED_NAME_LISTING_TYPE = "listingType"; @SerializedName(SERIALIZED_NAME_LISTING_TYPE) + @javax.annotation.Nonnull private ProductListingType listingType = ProductListingType.SUBSCRIPTION; public static final String SERIALIZED_NAME_PRODUCTS = "products"; @SerializedName(SERIALIZED_NAME_PRODUCTS) + @javax.annotation.Nonnull private List products = new ArrayList<>(); public static final String SERIALIZED_NAME_PURCHASE_ACTIVE = "purchaseActive"; @SerializedName(SERIALIZED_NAME_PURCHASE_ACTIVE) + @javax.annotation.Nonnull private Boolean purchaseActive; public static final String SERIALIZED_NAME_PURCHASE_CONTEXT = "purchaseContext"; @SerializedName(SERIALIZED_NAME_PURCHASE_CONTEXT) + @javax.annotation.Nonnull private ProductPurchasePurchaseContext purchaseContext; public static final String SERIALIZED_NAME_PURCHASE_CURRENT_STATUS = "purchaseCurrentStatus"; @SerializedName(SERIALIZED_NAME_PURCHASE_CURRENT_STATUS) + @javax.annotation.Nonnull private String purchaseCurrentStatus; public static final String SERIALIZED_NAME_PURCHASE_DATE = "purchaseDate"; @SerializedName(SERIALIZED_NAME_PURCHASE_DATE) + @javax.annotation.Nonnull private OffsetDateTime purchaseDate; public static final String SERIALIZED_NAME_PURCHASE_DURATION = "purchaseDuration"; @SerializedName(SERIALIZED_NAME_PURCHASE_DURATION) + @javax.annotation.Nullable private Integer purchaseDuration; public static final String SERIALIZED_NAME_PURCHASE_DURATION_TYPE = "purchaseDurationType"; @SerializedName(SERIALIZED_NAME_PURCHASE_DURATION_TYPE) + @javax.annotation.Nullable private String purchaseDurationType; public static final String SERIALIZED_NAME_PURCHASE_END_DATE = "purchaseEndDate"; @SerializedName(SERIALIZED_NAME_PURCHASE_END_DATE) + @javax.annotation.Nullable private OffsetDateTime purchaseEndDate; public static final String SERIALIZED_NAME_PURCHASE_FEE = "purchaseFee"; @SerializedName(SERIALIZED_NAME_PURCHASE_FEE) + @javax.annotation.Nullable private Integer purchaseFee; public static final String SERIALIZED_NAME_PURCHASE_ID = "purchaseId"; @SerializedName(SERIALIZED_NAME_PURCHASE_ID) + @javax.annotation.Nonnull private String purchaseId; public static final String SERIALIZED_NAME_PURCHASE_LATEST = "purchaseLatest"; @SerializedName(SERIALIZED_NAME_PURCHASE_LATEST) + @javax.annotation.Nonnull private Boolean purchaseLatest; public static final String SERIALIZED_NAME_PURCHASE_PRICE = "purchasePrice"; @SerializedName(SERIALIZED_NAME_PURCHASE_PRICE) + @javax.annotation.Nonnull private Integer purchasePrice; public static final String SERIALIZED_NAME_PURCHASE_QUANTITY = "purchaseQuantity"; @SerializedName(SERIALIZED_NAME_PURCHASE_QUANTITY) + @javax.annotation.Nonnull private Integer purchaseQuantity; public static final String SERIALIZED_NAME_PURCHASE_START_DATE = "purchaseStartDate"; @SerializedName(SERIALIZED_NAME_PURCHASE_START_DATE) + @javax.annotation.Nullable private OffsetDateTime purchaseStartDate; public static final String SERIALIZED_NAME_PURCHASE_TOKEN = "purchaseToken"; @SerializedName(SERIALIZED_NAME_PURCHASE_TOKEN) + @javax.annotation.Nullable private Object purchaseToken; public static final String SERIALIZED_NAME_PURCHASE_TYPE = "purchaseType"; @SerializedName(SERIALIZED_NAME_PURCHASE_TYPE) + @javax.annotation.Nonnull private String purchaseType; public static final String SERIALIZED_NAME_PURCHASE_UNIT_PRICE = "purchaseUnitPrice"; @SerializedName(SERIALIZED_NAME_PURCHASE_UNIT_PRICE) + @javax.annotation.Nonnull private Integer purchaseUnitPrice; public static final String SERIALIZED_NAME_PURCHASE_VALUE = "purchaseValue"; @SerializedName(SERIALIZED_NAME_PURCHASE_VALUE) + @javax.annotation.Nullable private Integer purchaseValue; public static final String SERIALIZED_NAME_RECEIVER_DISPLAY_NAME = "receiverDisplayName"; @SerializedName(SERIALIZED_NAME_RECEIVER_DISPLAY_NAME) + @javax.annotation.Nonnull private String receiverDisplayName; public static final String SERIALIZED_NAME_RECEIVER_ID = "receiverId"; @SerializedName(SERIALIZED_NAME_RECEIVER_ID) + @javax.annotation.Nonnull private String receiverId; public static final String SERIALIZED_NAME_RECURRABLE = "recurrable"; @SerializedName(SERIALIZED_NAME_RECURRABLE) + @javax.annotation.Nonnull private Boolean recurrable; public static final String SERIALIZED_NAME_REFUNDABLE = "refundable"; @SerializedName(SERIALIZED_NAME_REFUNDABLE) + @javax.annotation.Nonnull private Boolean refundable; public static final String SERIALIZED_NAME_SELLER_DISPLAY_NAME = "sellerDisplayName"; @SerializedName(SERIALIZED_NAME_SELLER_DISPLAY_NAME) + @javax.annotation.Nonnull private String sellerDisplayName; public static final String SERIALIZED_NAME_SELLER_ID = "sellerId"; @SerializedName(SERIALIZED_NAME_SELLER_ID) + @javax.annotation.Nonnull private String sellerId; public static final String SERIALIZED_NAME_STACKABLE = "stackable"; @SerializedName(SERIALIZED_NAME_STACKABLE) + @javax.annotation.Nonnull private Boolean stackable; public static final String SERIALIZED_NAME_WILL_RECUR = "willRecur"; @SerializedName(SERIALIZED_NAME_WILL_RECUR) + @javax.annotation.Nonnull private Boolean willRecur; public ProductPurchase() { } - public ProductPurchase buyerDisplayName(String buyerDisplayName) { - + public ProductPurchase buyerDisplayName(@javax.annotation.Nonnull String buyerDisplayName) { this.buyerDisplayName = buyerDisplayName; return this; } - /** + /** * Get buyerDisplayName * @return buyerDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getBuyerDisplayName() { return buyerDisplayName; } - - public void setBuyerDisplayName(String buyerDisplayName) { + public void setBuyerDisplayName(@javax.annotation.Nonnull String buyerDisplayName) { this.buyerDisplayName = buyerDisplayName; } - public ProductPurchase buyerId(String buyerId) { - + public ProductPurchase buyerId(@javax.annotation.Nonnull String buyerId) { this.buyerId = buyerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return buyerId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getBuyerId() { return buyerId; } - - public void setBuyerId(String buyerId) { + public void setBuyerId(@javax.annotation.Nonnull String buyerId) { this.buyerId = buyerId; } - public ProductPurchase firstParty(Boolean firstParty) { - + public ProductPurchase firstParty(@javax.annotation.Nullable Boolean firstParty) { this.firstParty = firstParty; return this; } - /** + /** * Get firstParty * @return firstParty - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getFirstParty() { return firstParty; } - - public void setFirstParty(Boolean firstParty) { + public void setFirstParty(@javax.annotation.Nullable Boolean firstParty) { this.firstParty = firstParty; } - public ProductPurchase isBuyer(Boolean isBuyer) { - + public ProductPurchase isBuyer(@javax.annotation.Nonnull Boolean isBuyer) { this.isBuyer = isBuyer; return this; } - /** + /** * Get isBuyer * @return isBuyer - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsBuyer() { return isBuyer; } - - public void setIsBuyer(Boolean isBuyer) { + public void setIsBuyer(@javax.annotation.Nonnull Boolean isBuyer) { this.isBuyer = isBuyer; } - public ProductPurchase isGift(Boolean isGift) { - + public ProductPurchase isGift(@javax.annotation.Nonnull Boolean isGift) { this.isGift = isGift; return this; } - /** + /** * Get isGift * @return isGift - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsGift() { return isGift; } - - public void setIsGift(Boolean isGift) { + public void setIsGift(@javax.annotation.Nonnull Boolean isGift) { this.isGift = isGift; } - public ProductPurchase isReceiver(Boolean isReceiver) { - + public ProductPurchase isReceiver(@javax.annotation.Nonnull Boolean isReceiver) { this.isReceiver = isReceiver; return this; } - /** + /** * Get isReceiver * @return isReceiver - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsReceiver() { return isReceiver; } - - public void setIsReceiver(Boolean isReceiver) { + public void setIsReceiver(@javax.annotation.Nonnull Boolean isReceiver) { this.isReceiver = isReceiver; } - public ProductPurchase isSeller(Boolean isSeller) { - + public ProductPurchase isSeller(@javax.annotation.Nonnull Boolean isSeller) { this.isSeller = isSeller; return this; } - /** + /** * Get isSeller * @return isSeller - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsSeller() { return isSeller; } - - public void setIsSeller(Boolean isSeller) { + public void setIsSeller(@javax.annotation.Nonnull Boolean isSeller) { this.isSeller = isSeller; } - public ProductPurchase ledgerTransactionId(Integer ledgerTransactionId) { - + public ProductPurchase ledgerTransactionId(@javax.annotation.Nullable Integer ledgerTransactionId) { this.ledgerTransactionId = ledgerTransactionId; return this; } - /** + /** * Get ledgerTransactionId * @return ledgerTransactionId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getLedgerTransactionId() { return ledgerTransactionId; } - - public void setLedgerTransactionId(Integer ledgerTransactionId) { + public void setLedgerTransactionId(@javax.annotation.Nullable Integer ledgerTransactionId) { this.ledgerTransactionId = ledgerTransactionId; } - public ProductPurchase listingCurrentlyAvailable(Boolean listingCurrentlyAvailable) { - + public ProductPurchase listingCurrentlyAvailable(@javax.annotation.Nonnull Boolean listingCurrentlyAvailable) { this.listingCurrentlyAvailable = listingCurrentlyAvailable; return this; } - /** + /** * Get listingCurrentlyAvailable * @return listingCurrentlyAvailable - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getListingCurrentlyAvailable() { return listingCurrentlyAvailable; } - - public void setListingCurrentlyAvailable(Boolean listingCurrentlyAvailable) { + public void setListingCurrentlyAvailable(@javax.annotation.Nonnull Boolean listingCurrentlyAvailable) { this.listingCurrentlyAvailable = listingCurrentlyAvailable; } - public ProductPurchase listingDescription(String listingDescription) { - + public ProductPurchase listingDescription(@javax.annotation.Nullable String listingDescription) { this.listingDescription = listingDescription; return this; } - /** + /** * Get listingDescription * @return listingDescription - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getListingDescription() { return listingDescription; } - - public void setListingDescription(String listingDescription) { + public void setListingDescription(@javax.annotation.Nullable String listingDescription) { this.listingDescription = listingDescription; } - public ProductPurchase listingDisplayName(String listingDisplayName) { - + public ProductPurchase listingDisplayName(@javax.annotation.Nonnull String listingDisplayName) { this.listingDisplayName = listingDisplayName; return this; } - /** + /** * Get listingDisplayName * @return listingDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getListingDisplayName() { return listingDisplayName; } - - public void setListingDisplayName(String listingDisplayName) { + public void setListingDisplayName(@javax.annotation.Nonnull String listingDisplayName) { this.listingDisplayName = listingDisplayName; } - public ProductPurchase listingId(String listingId) { - + public ProductPurchase listingId(@javax.annotation.Nonnull String listingId) { this.listingId = listingId; return this; } - /** + /** * Get listingId * @return listingId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "prod_bfbc2315-247a-44d7-bfea-5237f8d56cb4", required = true, value = "") - public String getListingId() { return listingId; } - - public void setListingId(String listingId) { + public void setListingId(@javax.annotation.Nonnull String listingId) { this.listingId = listingId; } - public ProductPurchase listingImageId(String listingImageId) { - + public ProductPurchase listingImageId(@javax.annotation.Nonnull String listingImageId) { this.listingImageId = listingImageId; return this; } - /** + /** * Get listingImageId * @return listingImageId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", required = true, value = "") - public String getListingImageId() { return listingImageId; } - - public void setListingImageId(String listingImageId) { + public void setListingImageId(@javax.annotation.Nonnull String listingImageId) { this.listingImageId = listingImageId; } - public ProductPurchase listingSubtitle(String listingSubtitle) { - + public ProductPurchase listingSubtitle(@javax.annotation.Nonnull String listingSubtitle) { this.listingSubtitle = listingSubtitle; return this; } - /** + /** * Get listingSubtitle * @return listingSubtitle - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getListingSubtitle() { return listingSubtitle; } - - public void setListingSubtitle(String listingSubtitle) { + public void setListingSubtitle(@javax.annotation.Nonnull String listingSubtitle) { this.listingSubtitle = listingSubtitle; } - public ProductPurchase listingType(ProductListingType listingType) { - + public ProductPurchase listingType(@javax.annotation.Nonnull ProductListingType listingType) { this.listingType = listingType; return this; } - /** + /** * Get listingType * @return listingType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ProductListingType getListingType() { return listingType; } - - public void setListingType(ProductListingType listingType) { + public void setListingType(@javax.annotation.Nonnull ProductListingType listingType) { this.listingType = listingType; } - public ProductPurchase products(List products) { - + public ProductPurchase products(@javax.annotation.Nonnull List products) { this.products = products; return this; } public ProductPurchase addProductsItem(ProductPurchaseProduct productsItem) { + if (this.products == null) { + this.products = new ArrayList<>(); + } this.products.add(productsItem); return this; } - /** + /** * Get products * @return products - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getProducts() { return products; } - - public void setProducts(List products) { + public void setProducts(@javax.annotation.Nonnull List products) { this.products = products; } - public ProductPurchase purchaseActive(Boolean purchaseActive) { - + public ProductPurchase purchaseActive(@javax.annotation.Nonnull Boolean purchaseActive) { this.purchaseActive = purchaseActive; return this; } - /** + /** * Get purchaseActive * @return purchaseActive - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getPurchaseActive() { return purchaseActive; } - - public void setPurchaseActive(Boolean purchaseActive) { + public void setPurchaseActive(@javax.annotation.Nonnull Boolean purchaseActive) { this.purchaseActive = purchaseActive; } - public ProductPurchase purchaseContext(ProductPurchasePurchaseContext purchaseContext) { - + public ProductPurchase purchaseContext(@javax.annotation.Nonnull ProductPurchasePurchaseContext purchaseContext) { this.purchaseContext = purchaseContext; return this; } - /** + /** * Get purchaseContext * @return purchaseContext - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ProductPurchasePurchaseContext getPurchaseContext() { return purchaseContext; } - - public void setPurchaseContext(ProductPurchasePurchaseContext purchaseContext) { + public void setPurchaseContext(@javax.annotation.Nonnull ProductPurchasePurchaseContext purchaseContext) { this.purchaseContext = purchaseContext; } - public ProductPurchase purchaseCurrentStatus(String purchaseCurrentStatus) { - + public ProductPurchase purchaseCurrentStatus(@javax.annotation.Nonnull String purchaseCurrentStatus) { this.purchaseCurrentStatus = purchaseCurrentStatus; return this; } - /** + /** * Get purchaseCurrentStatus * @return purchaseCurrentStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getPurchaseCurrentStatus() { return purchaseCurrentStatus; } - - public void setPurchaseCurrentStatus(String purchaseCurrentStatus) { + public void setPurchaseCurrentStatus(@javax.annotation.Nonnull String purchaseCurrentStatus) { this.purchaseCurrentStatus = purchaseCurrentStatus; } - public ProductPurchase purchaseDate(OffsetDateTime purchaseDate) { - + public ProductPurchase purchaseDate(@javax.annotation.Nonnull OffsetDateTime purchaseDate) { this.purchaseDate = purchaseDate; return this; } - /** + /** * Get purchaseDate * @return purchaseDate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getPurchaseDate() { return purchaseDate; } - - public void setPurchaseDate(OffsetDateTime purchaseDate) { + public void setPurchaseDate(@javax.annotation.Nonnull OffsetDateTime purchaseDate) { this.purchaseDate = purchaseDate; } - public ProductPurchase purchaseDuration(Integer purchaseDuration) { - + public ProductPurchase purchaseDuration(@javax.annotation.Nullable Integer purchaseDuration) { this.purchaseDuration = purchaseDuration; return this; } - /** + /** * Get purchaseDuration * @return purchaseDuration - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getPurchaseDuration() { return purchaseDuration; } - - public void setPurchaseDuration(Integer purchaseDuration) { + public void setPurchaseDuration(@javax.annotation.Nullable Integer purchaseDuration) { this.purchaseDuration = purchaseDuration; } - public ProductPurchase purchaseDurationType(String purchaseDurationType) { - + public ProductPurchase purchaseDurationType(@javax.annotation.Nullable String purchaseDurationType) { this.purchaseDurationType = purchaseDurationType; return this; } - /** + /** * Get purchaseDurationType * @return purchaseDurationType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPurchaseDurationType() { return purchaseDurationType; } - - public void setPurchaseDurationType(String purchaseDurationType) { + public void setPurchaseDurationType(@javax.annotation.Nullable String purchaseDurationType) { this.purchaseDurationType = purchaseDurationType; } - public ProductPurchase purchaseEndDate(OffsetDateTime purchaseEndDate) { - + public ProductPurchase purchaseEndDate(@javax.annotation.Nullable OffsetDateTime purchaseEndDate) { this.purchaseEndDate = purchaseEndDate; return this; } - /** + /** * Get purchaseEndDate * @return purchaseEndDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getPurchaseEndDate() { return purchaseEndDate; } - - public void setPurchaseEndDate(OffsetDateTime purchaseEndDate) { + public void setPurchaseEndDate(@javax.annotation.Nullable OffsetDateTime purchaseEndDate) { this.purchaseEndDate = purchaseEndDate; } - public ProductPurchase purchaseFee(Integer purchaseFee) { - + public ProductPurchase purchaseFee(@javax.annotation.Nullable Integer purchaseFee) { this.purchaseFee = purchaseFee; return this; } - /** + /** * Get purchaseFee * @return purchaseFee - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getPurchaseFee() { return purchaseFee; } - - public void setPurchaseFee(Integer purchaseFee) { + public void setPurchaseFee(@javax.annotation.Nullable Integer purchaseFee) { this.purchaseFee = purchaseFee; } - public ProductPurchase purchaseId(String purchaseId) { - + public ProductPurchase purchaseId(@javax.annotation.Nonnull String purchaseId) { this.purchaseId = purchaseId; return this; } - /** + /** * Get purchaseId * @return purchaseId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "pur_f0446b91-e0f7-403e-8932-609d5057898c", required = true, value = "") - public String getPurchaseId() { return purchaseId; } - - public void setPurchaseId(String purchaseId) { + public void setPurchaseId(@javax.annotation.Nonnull String purchaseId) { this.purchaseId = purchaseId; } - public ProductPurchase purchaseLatest(Boolean purchaseLatest) { - + public ProductPurchase purchaseLatest(@javax.annotation.Nonnull Boolean purchaseLatest) { this.purchaseLatest = purchaseLatest; return this; } - /** + /** * Get purchaseLatest * @return purchaseLatest - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getPurchaseLatest() { return purchaseLatest; } - - public void setPurchaseLatest(Boolean purchaseLatest) { + public void setPurchaseLatest(@javax.annotation.Nonnull Boolean purchaseLatest) { this.purchaseLatest = purchaseLatest; } - public ProductPurchase purchasePrice(Integer purchasePrice) { - + public ProductPurchase purchasePrice(@javax.annotation.Nonnull Integer purchasePrice) { this.purchasePrice = purchasePrice; return this; } - /** + /** * Get purchasePrice * @return purchasePrice - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPurchasePrice() { return purchasePrice; } - - public void setPurchasePrice(Integer purchasePrice) { + public void setPurchasePrice(@javax.annotation.Nonnull Integer purchasePrice) { this.purchasePrice = purchasePrice; } - public ProductPurchase purchaseQuantity(Integer purchaseQuantity) { - + public ProductPurchase purchaseQuantity(@javax.annotation.Nonnull Integer purchaseQuantity) { this.purchaseQuantity = purchaseQuantity; return this; } - /** + /** * Get purchaseQuantity * @return purchaseQuantity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPurchaseQuantity() { return purchaseQuantity; } - - public void setPurchaseQuantity(Integer purchaseQuantity) { + public void setPurchaseQuantity(@javax.annotation.Nonnull Integer purchaseQuantity) { this.purchaseQuantity = purchaseQuantity; } - public ProductPurchase purchaseStartDate(OffsetDateTime purchaseStartDate) { - + public ProductPurchase purchaseStartDate(@javax.annotation.Nullable OffsetDateTime purchaseStartDate) { this.purchaseStartDate = purchaseStartDate; return this; } - /** + /** * Get purchaseStartDate * @return purchaseStartDate - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getPurchaseStartDate() { return purchaseStartDate; } - - public void setPurchaseStartDate(OffsetDateTime purchaseStartDate) { + public void setPurchaseStartDate(@javax.annotation.Nullable OffsetDateTime purchaseStartDate) { this.purchaseStartDate = purchaseStartDate; } - public ProductPurchase purchaseToken(Object purchaseToken) { - + public ProductPurchase purchaseToken(@javax.annotation.Nullable Object purchaseToken) { this.purchaseToken = purchaseToken; return this; } - /** + /** * Get purchaseToken * @return purchaseToken - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public Object getPurchaseToken() { return purchaseToken; } - - public void setPurchaseToken(Object purchaseToken) { + public void setPurchaseToken(@javax.annotation.Nullable Object purchaseToken) { this.purchaseToken = purchaseToken; } - public ProductPurchase purchaseType(String purchaseType) { - + public ProductPurchase purchaseType(@javax.annotation.Nonnull String purchaseType) { this.purchaseType = purchaseType; return this; } - /** + /** * Get purchaseType * @return purchaseType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getPurchaseType() { return purchaseType; } - - public void setPurchaseType(String purchaseType) { + public void setPurchaseType(@javax.annotation.Nonnull String purchaseType) { this.purchaseType = purchaseType; } - public ProductPurchase purchaseUnitPrice(Integer purchaseUnitPrice) { - + public ProductPurchase purchaseUnitPrice(@javax.annotation.Nonnull Integer purchaseUnitPrice) { this.purchaseUnitPrice = purchaseUnitPrice; return this; } - /** + /** * Get purchaseUnitPrice * @return purchaseUnitPrice - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getPurchaseUnitPrice() { return purchaseUnitPrice; } - - public void setPurchaseUnitPrice(Integer purchaseUnitPrice) { + public void setPurchaseUnitPrice(@javax.annotation.Nonnull Integer purchaseUnitPrice) { this.purchaseUnitPrice = purchaseUnitPrice; } - public ProductPurchase purchaseValue(Integer purchaseValue) { - + public ProductPurchase purchaseValue(@javax.annotation.Nullable Integer purchaseValue) { this.purchaseValue = purchaseValue; return this; } - /** + /** * Get purchaseValue * @return purchaseValue - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getPurchaseValue() { return purchaseValue; } - - public void setPurchaseValue(Integer purchaseValue) { + public void setPurchaseValue(@javax.annotation.Nullable Integer purchaseValue) { this.purchaseValue = purchaseValue; } - public ProductPurchase receiverDisplayName(String receiverDisplayName) { - + public ProductPurchase receiverDisplayName(@javax.annotation.Nonnull String receiverDisplayName) { this.receiverDisplayName = receiverDisplayName; return this; } - /** + /** * Get receiverDisplayName * @return receiverDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getReceiverDisplayName() { return receiverDisplayName; } - - public void setReceiverDisplayName(String receiverDisplayName) { + public void setReceiverDisplayName(@javax.annotation.Nonnull String receiverDisplayName) { this.receiverDisplayName = receiverDisplayName; } - public ProductPurchase receiverId(String receiverId) { - + public ProductPurchase receiverId(@javax.annotation.Nonnull String receiverId) { this.receiverId = receiverId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return receiverId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getReceiverId() { return receiverId; } - - public void setReceiverId(String receiverId) { + public void setReceiverId(@javax.annotation.Nonnull String receiverId) { this.receiverId = receiverId; } - public ProductPurchase recurrable(Boolean recurrable) { - + public ProductPurchase recurrable(@javax.annotation.Nonnull Boolean recurrable) { this.recurrable = recurrable; return this; } - /** + /** * Get recurrable * @return recurrable - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getRecurrable() { return recurrable; } - - public void setRecurrable(Boolean recurrable) { + public void setRecurrable(@javax.annotation.Nonnull Boolean recurrable) { this.recurrable = recurrable; } - public ProductPurchase refundable(Boolean refundable) { - + public ProductPurchase refundable(@javax.annotation.Nonnull Boolean refundable) { this.refundable = refundable; return this; } - /** + /** * Get refundable * @return refundable - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getRefundable() { return refundable; } - - public void setRefundable(Boolean refundable) { + public void setRefundable(@javax.annotation.Nonnull Boolean refundable) { this.refundable = refundable; } - public ProductPurchase sellerDisplayName(String sellerDisplayName) { - + public ProductPurchase sellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { this.sellerDisplayName = sellerDisplayName; return this; } - /** + /** * Get sellerDisplayName * @return sellerDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSellerDisplayName() { return sellerDisplayName; } - - public void setSellerDisplayName(String sellerDisplayName) { + public void setSellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { this.sellerDisplayName = sellerDisplayName; } - public ProductPurchase sellerId(String sellerId) { - + public ProductPurchase sellerId(@javax.annotation.Nonnull String sellerId) { this.sellerId = sellerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return sellerId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getSellerId() { return sellerId; } - - public void setSellerId(String sellerId) { + public void setSellerId(@javax.annotation.Nonnull String sellerId) { this.sellerId = sellerId; } - public ProductPurchase stackable(Boolean stackable) { - + public ProductPurchase stackable(@javax.annotation.Nonnull Boolean stackable) { this.stackable = stackable; return this; } - /** + /** * Get stackable * @return stackable - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getStackable() { return stackable; } - - public void setStackable(Boolean stackable) { + public void setStackable(@javax.annotation.Nonnull Boolean stackable) { this.stackable = stackable; } - public ProductPurchase willRecur(Boolean willRecur) { - + public ProductPurchase willRecur(@javax.annotation.Nonnull Boolean willRecur) { this.willRecur = willRecur; return this; } - /** + /** * Get willRecur * @return willRecur - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getWillRecur() { return willRecur; } - - public void setWillRecur(Boolean willRecur) { + public void setWillRecur(@javax.annotation.Nonnull Boolean willRecur) { this.willRecur = willRecur; } @@ -1282,10 +1162,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -1294,170 +1171,98 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("buyerDisplayName"); - openapiFields.add("buyerId"); - openapiFields.add("firstParty"); - openapiFields.add("isBuyer"); - openapiFields.add("isGift"); - openapiFields.add("isReceiver"); - openapiFields.add("isSeller"); - openapiFields.add("ledgerTransactionId"); - openapiFields.add("listingCurrentlyAvailable"); - openapiFields.add("listingDescription"); - openapiFields.add("listingDisplayName"); - openapiFields.add("listingId"); - openapiFields.add("listingImageId"); - openapiFields.add("listingSubtitle"); - openapiFields.add("listingType"); - openapiFields.add("products"); - openapiFields.add("purchaseActive"); - openapiFields.add("purchaseContext"); - openapiFields.add("purchaseCurrentStatus"); - openapiFields.add("purchaseDate"); - openapiFields.add("purchaseDuration"); - openapiFields.add("purchaseDurationType"); - openapiFields.add("purchaseEndDate"); - openapiFields.add("purchaseFee"); - openapiFields.add("purchaseId"); - openapiFields.add("purchaseLatest"); - openapiFields.add("purchasePrice"); - openapiFields.add("purchaseQuantity"); - openapiFields.add("purchaseStartDate"); - openapiFields.add("purchaseToken"); - openapiFields.add("purchaseType"); - openapiFields.add("purchaseUnitPrice"); - openapiFields.add("purchaseValue"); - openapiFields.add("receiverDisplayName"); - openapiFields.add("receiverId"); - openapiFields.add("recurrable"); - openapiFields.add("refundable"); - openapiFields.add("sellerDisplayName"); - openapiFields.add("sellerId"); - openapiFields.add("stackable"); - openapiFields.add("willRecur"); + openapiFields = new HashSet(Arrays.asList("buyerDisplayName", "buyerId", "firstParty", "isBuyer", "isGift", "isReceiver", "isSeller", "ledgerTransactionId", "listingCurrentlyAvailable", "listingDescription", "listingDisplayName", "listingId", "listingImageId", "listingSubtitle", "listingType", "products", "purchaseActive", "purchaseContext", "purchaseCurrentStatus", "purchaseDate", "purchaseDuration", "purchaseDurationType", "purchaseEndDate", "purchaseFee", "purchaseId", "purchaseLatest", "purchasePrice", "purchaseQuantity", "purchaseStartDate", "purchaseToken", "purchaseType", "purchaseUnitPrice", "purchaseValue", "receiverDisplayName", "receiverId", "recurrable", "refundable", "sellerDisplayName", "sellerId", "stackable", "willRecur")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("buyerDisplayName"); - openapiRequiredFields.add("buyerId"); - openapiRequiredFields.add("isBuyer"); - openapiRequiredFields.add("isGift"); - openapiRequiredFields.add("isReceiver"); - openapiRequiredFields.add("isSeller"); - openapiRequiredFields.add("listingCurrentlyAvailable"); - openapiRequiredFields.add("listingDisplayName"); - openapiRequiredFields.add("listingId"); - openapiRequiredFields.add("listingImageId"); - openapiRequiredFields.add("listingSubtitle"); - openapiRequiredFields.add("listingType"); - openapiRequiredFields.add("products"); - openapiRequiredFields.add("purchaseActive"); - openapiRequiredFields.add("purchaseContext"); - openapiRequiredFields.add("purchaseCurrentStatus"); - openapiRequiredFields.add("purchaseDate"); - openapiRequiredFields.add("purchaseEndDate"); - openapiRequiredFields.add("purchaseId"); - openapiRequiredFields.add("purchaseLatest"); - openapiRequiredFields.add("purchasePrice"); - openapiRequiredFields.add("purchaseQuantity"); - openapiRequiredFields.add("purchaseStartDate"); - openapiRequiredFields.add("purchaseToken"); - openapiRequiredFields.add("purchaseType"); - openapiRequiredFields.add("purchaseUnitPrice"); - openapiRequiredFields.add("receiverDisplayName"); - openapiRequiredFields.add("receiverId"); - openapiRequiredFields.add("recurrable"); - openapiRequiredFields.add("refundable"); - openapiRequiredFields.add("sellerDisplayName"); - openapiRequiredFields.add("sellerId"); - openapiRequiredFields.add("stackable"); - openapiRequiredFields.add("willRecur"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ProductPurchase - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ProductPurchase.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProductPurchase is not found in the empty JSON string", ProductPurchase.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("buyerDisplayName", "buyerId", "isBuyer", "isGift", "isReceiver", "isSeller", "listingCurrentlyAvailable", "listingDisplayName", "listingId", "listingImageId", "listingSubtitle", "listingType", "products", "purchaseActive", "purchaseContext", "purchaseCurrentStatus", "purchaseDate", "purchaseEndDate", "purchaseId", "purchaseLatest", "purchasePrice", "purchaseQuantity", "purchaseStartDate", "purchaseToken", "purchaseType", "purchaseUnitPrice", "receiverDisplayName", "receiverId", "recurrable", "refundable", "sellerDisplayName", "sellerId", "stackable", "willRecur")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductPurchase + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductPurchase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ProductPurchase is not found in the empty JSON string", ProductPurchase.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ProductPurchase.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductPurchase` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ProductPurchase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ProductPurchase.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("buyerDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `buyerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyerDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `buyerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyerDisplayName").toString())); } if (!jsonObj.get("buyerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `buyerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `buyerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyerId").toString())); } if ((jsonObj.get("listingDescription") != null && !jsonObj.get("listingDescription").isJsonNull()) && !jsonObj.get("listingDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingDescription").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingDescription").toString())); } if (!jsonObj.get("listingDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingDisplayName").toString())); } if (!jsonObj.get("listingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingId").toString())); } if (!jsonObj.get("listingImageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingImageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingImageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingImageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingImageId").toString())); } if (!jsonObj.get("listingSubtitle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingSubtitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingSubtitle").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingSubtitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingSubtitle").toString())); } - // ensure the json data is an array - if (!jsonObj.get("products").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `products` to be an array in the JSON string but got `%s`", jsonObj.get("products").toString())); + // validate the required field `listingType` + ProductListingType.validateJsonElement(jsonObj.get("listingType")); + if (jsonObj.get("products") != null) { + if (!jsonObj.get("products").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `products` to be an array in the JSON string but got `%s`", jsonObj.get("products").toString())); + } + JsonArray jsonArrayproducts = jsonObj.getAsJsonArray("products"); + // validate the required field `products` (array) + for (int i = 0; i < jsonArrayproducts.size(); i++) { + ProductPurchaseProduct.validateJsonElement(jsonArrayproducts.get(i)); + } } - - JsonArray jsonArrayproducts = jsonObj.getAsJsonArray("products"); - // validate the required field `products` (array) - for (int i = 0; i < jsonArrayproducts.size(); i++) { - ProductPurchaseProduct.validateJsonObject(jsonArrayproducts.get(i).getAsJsonObject()); - }; // validate the required field `purchaseContext` - ProductPurchasePurchaseContext.validateJsonObject(jsonObj.getAsJsonObject("purchaseContext")); + ProductPurchasePurchaseContext.validateJsonElement(jsonObj.get("purchaseContext")); if (!jsonObj.get("purchaseCurrentStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `purchaseCurrentStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseCurrentStatus").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `purchaseCurrentStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseCurrentStatus").toString())); } if ((jsonObj.get("purchaseDurationType") != null && !jsonObj.get("purchaseDurationType").isJsonNull()) && !jsonObj.get("purchaseDurationType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `purchaseDurationType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseDurationType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `purchaseDurationType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseDurationType").toString())); } if (!jsonObj.get("purchaseId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `purchaseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `purchaseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseId").toString())); } if (!jsonObj.get("purchaseType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `purchaseType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `purchaseType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseType").toString())); } if (!jsonObj.get("receiverDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `receiverDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `receiverDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverDisplayName").toString())); } if (!jsonObj.get("receiverId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `receiverId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `receiverId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverId").toString())); } if (!jsonObj.get("sellerDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sellerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sellerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerDisplayName").toString())); } if (!jsonObj.get("sellerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); } } @@ -1481,31 +1286,31 @@ public void write(JsonWriter out, ProductPurchase value) throws IOException { @Override public ProductPurchase read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ProductPurchase given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProductPurchase - * @throws IOException if the JSON string is invalid with respect to ProductPurchase - */ + /** + * Create an instance of ProductPurchase given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductPurchase + * @throws IOException if the JSON string is invalid with respect to ProductPurchase + */ public static ProductPurchase fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ProductPurchase.class); } - /** - * Convert an instance of ProductPurchase to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ProductPurchase to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ProductPurchaseHistory.java b/src/main/java/io/github/vrchatapi/model/ProductPurchaseHistory.java index fc3c7b37..29af8e96 100644 --- a/src/main/java/io/github/vrchatapi/model/ProductPurchaseHistory.java +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchaseHistory.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,18 +13,16 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ProductPurchaseRecord; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,93 +51,87 @@ /** * ProductPurchaseHistory */ -@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 ProductPurchaseHistory { public static final String SERIALIZED_NAME_END_DATE = "endDate"; @SerializedName(SERIALIZED_NAME_END_DATE) + @javax.annotation.Nonnull private OffsetDateTime endDate; public static final String SERIALIZED_NAME_START_DATE = "startDate"; @SerializedName(SERIALIZED_NAME_START_DATE) + @javax.annotation.Nonnull private OffsetDateTime startDate; public static final String SERIALIZED_NAME_TRANSACTIONS = "transactions"; @SerializedName(SERIALIZED_NAME_TRANSACTIONS) + @javax.annotation.Nonnull private List transactions = new ArrayList<>(); public ProductPurchaseHistory() { } - public ProductPurchaseHistory endDate(OffsetDateTime endDate) { - + public ProductPurchaseHistory endDate(@javax.annotation.Nonnull OffsetDateTime endDate) { this.endDate = endDate; return this; } - /** + /** * Get endDate * @return endDate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getEndDate() { return endDate; } - - public void setEndDate(OffsetDateTime endDate) { + public void setEndDate(@javax.annotation.Nonnull OffsetDateTime endDate) { this.endDate = endDate; } - public ProductPurchaseHistory startDate(OffsetDateTime startDate) { - + public ProductPurchaseHistory startDate(@javax.annotation.Nonnull OffsetDateTime startDate) { this.startDate = startDate; return this; } - /** + /** * Get startDate * @return startDate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getStartDate() { return startDate; } - - public void setStartDate(OffsetDateTime startDate) { + public void setStartDate(@javax.annotation.Nonnull OffsetDateTime startDate) { this.startDate = startDate; } - public ProductPurchaseHistory transactions(List transactions) { - + public ProductPurchaseHistory transactions(@javax.annotation.Nonnull List transactions) { this.transactions = transactions; return this; } public ProductPurchaseHistory addTransactionsItem(ProductPurchaseRecord transactionsItem) { + if (this.transactions == null) { + this.transactions = new ArrayList<>(); + } this.transactions.add(transactionsItem); return this; } - /** + /** * Get transactions * @return transactions - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTransactions() { return transactions; } - - public void setTransactions(List transactions) { + public void setTransactions(@javax.annotation.Nonnull List transactions) { this.transactions = transactions; } @@ -178,10 +172,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -190,55 +181,50 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("endDate"); - openapiFields.add("startDate"); - openapiFields.add("transactions"); + openapiFields = new HashSet(Arrays.asList("endDate", "startDate", "transactions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("endDate"); - openapiRequiredFields.add("startDate"); - openapiRequiredFields.add("transactions"); + openapiRequiredFields = new HashSet(Arrays.asList("endDate", "startDate", "transactions")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ProductPurchaseHistory - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ProductPurchaseHistory.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProductPurchaseHistory is not found in the empty JSON string", ProductPurchaseHistory.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductPurchaseHistory + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductPurchaseHistory.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ProductPurchaseHistory is not found in the empty JSON string", ProductPurchaseHistory.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ProductPurchaseHistory.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductPurchaseHistory` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ProductPurchaseHistory` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ProductPurchaseHistory.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("transactions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `transactions` to be an array in the JSON string but got `%s`", jsonObj.get("transactions").toString())); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("transactions") != null) { + if (!jsonObj.get("transactions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transactions` to be an array in the JSON string but got `%s`", jsonObj.get("transactions").toString())); + } + JsonArray jsonArraytransactions = jsonObj.getAsJsonArray("transactions"); + // validate the required field `transactions` (array) + for (int i = 0; i < jsonArraytransactions.size(); i++) { + ProductPurchaseRecord.validateJsonElement(jsonArraytransactions.get(i)); + } } - - JsonArray jsonArraytransactions = jsonObj.getAsJsonArray("transactions"); - // validate the required field `transactions` (array) - for (int i = 0; i < jsonArraytransactions.size(); i++) { - ProductPurchaseRecord.validateJsonObject(jsonArraytransactions.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -261,31 +247,31 @@ public void write(JsonWriter out, ProductPurchaseHistory value) throws IOExcepti @Override public ProductPurchaseHistory read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ProductPurchaseHistory given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProductPurchaseHistory - * @throws IOException if the JSON string is invalid with respect to ProductPurchaseHistory - */ + /** + * Create an instance of ProductPurchaseHistory given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductPurchaseHistory + * @throws IOException if the JSON string is invalid with respect to ProductPurchaseHistory + */ public static ProductPurchaseHistory fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ProductPurchaseHistory.class); } - /** - * Convert an instance of ProductPurchaseHistory to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ProductPurchaseHistory to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ProductPurchaseLocationType.java b/src/main/java/io/github/vrchatapi/model/ProductPurchaseLocationType.java index eacdfd4c..c9843c27 100644 --- a/src/main/java/io/github/vrchatapi/model/ProductPurchaseLocationType.java +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchaseLocationType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -86,5 +86,10 @@ public ProductPurchaseLocationType read(final JsonReader jsonReader) throws IOEx return ProductPurchaseLocationType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ProductPurchaseLocationType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/ProductPurchaseProduct.java b/src/main/java/io/github/vrchatapi/model/ProductPurchaseProduct.java index 1384d31b..01ec74e7 100644 --- a/src/main/java/io/github/vrchatapi/model/ProductPurchaseProduct.java +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchaseProduct.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ProductType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,142 +49,127 @@ /** * ProductPurchaseProduct */ -@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 ProductPurchaseProduct { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nullable private String imageId; public static final String SERIALIZED_NAME_LICENSE_ID = "licenseId"; @SerializedName(SERIALIZED_NAME_LICENSE_ID) + @javax.annotation.Nullable private String licenseId; public static final String SERIALIZED_NAME_PRODUCT_TYPE = "productType"; @SerializedName(SERIALIZED_NAME_PRODUCT_TYPE) + @javax.annotation.Nonnull private ProductType productType = ProductType.UDON; public ProductPurchaseProduct() { } - public ProductPurchaseProduct displayName(String displayName) { - + public ProductPurchaseProduct displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public ProductPurchaseProduct id(String id) { - + public ProductPurchaseProduct id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "prod_bfbc2315-247a-44d7-bfea-5237f8d56cb4", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public ProductPurchaseProduct imageId(String imageId) { - + public ProductPurchaseProduct imageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; } - public ProductPurchaseProduct licenseId(String licenseId) { - + public ProductPurchaseProduct licenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; return this; } - /** + /** * Get licenseId * @return licenseId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getLicenseId() { return licenseId; } - - public void setLicenseId(String licenseId) { + public void setLicenseId(@javax.annotation.Nullable String licenseId) { this.licenseId = licenseId; } - public ProductPurchaseProduct productType(ProductType productType) { - + public ProductPurchaseProduct productType(@javax.annotation.Nonnull ProductType productType) { this.productType = productType; return this; } - /** + /** * Get productType * @return productType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ProductType getProductType() { return productType; } - - public void setProductType(ProductType productType) { + public void setProductType(@javax.annotation.Nonnull ProductType productType) { this.productType = productType; } @@ -240,10 +225,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -252,59 +234,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("displayName"); - openapiFields.add("id"); - openapiFields.add("imageId"); - openapiFields.add("licenseId"); - openapiFields.add("productType"); + openapiFields = new HashSet(Arrays.asList("displayName", "id", "imageId", "licenseId", "productType")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("productType"); + openapiRequiredFields = new HashSet(Arrays.asList("displayName", "id", "productType")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ProductPurchaseProduct - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ProductPurchaseProduct.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProductPurchaseProduct is not found in the empty JSON string", ProductPurchaseProduct.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductPurchaseProduct + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductPurchaseProduct.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ProductPurchaseProduct is not found in the empty JSON string", ProductPurchaseProduct.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ProductPurchaseProduct.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductPurchaseProduct` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ProductPurchaseProduct` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ProductPurchaseProduct.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } if ((jsonObj.get("licenseId") != null && !jsonObj.get("licenseId").isJsonNull()) && !jsonObj.get("licenseId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `licenseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("licenseId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `licenseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("licenseId").toString())); } + // validate the required field `productType` + ProductType.validateJsonElement(jsonObj.get("productType")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -327,31 +304,31 @@ public void write(JsonWriter out, ProductPurchaseProduct value) throws IOExcepti @Override public ProductPurchaseProduct read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ProductPurchaseProduct given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProductPurchaseProduct - * @throws IOException if the JSON string is invalid with respect to ProductPurchaseProduct - */ + /** + * Create an instance of ProductPurchaseProduct given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductPurchaseProduct + * @throws IOException if the JSON string is invalid with respect to ProductPurchaseProduct + */ public static ProductPurchaseProduct fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ProductPurchaseProduct.class); } - /** - * Convert an instance of ProductPurchaseProduct to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ProductPurchaseProduct to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ProductPurchasePurchaseContext.java b/src/main/java/io/github/vrchatapi/model/ProductPurchasePurchaseContext.java index 4d304c45..68fa88f8 100644 --- a/src/main/java/io/github/vrchatapi/model/ProductPurchasePurchaseContext.java +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchasePurchaseContext.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,88 +47,79 @@ /** * ProductPurchasePurchaseContext */ -@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 ProductPurchasePurchaseContext { public static final String SERIALIZED_NAME_LOCATION_TYPE = "locationType"; @SerializedName(SERIALIZED_NAME_LOCATION_TYPE) + @javax.annotation.Nullable private String locationType; public static final String SERIALIZED_NAME_WORLD_ID = "worldId"; @SerializedName(SERIALIZED_NAME_WORLD_ID) + @javax.annotation.Nullable private String worldId; public static final String SERIALIZED_NAME_WORLD_NAME = "worldName"; @SerializedName(SERIALIZED_NAME_WORLD_NAME) + @javax.annotation.Nullable private String worldName; public ProductPurchasePurchaseContext() { } - public ProductPurchasePurchaseContext locationType(String locationType) { - + public ProductPurchasePurchaseContext locationType(@javax.annotation.Nullable String locationType) { this.locationType = locationType; return this; } - /** + /** * Get locationType * @return locationType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "undefined", value = "") - public String getLocationType() { return locationType; } - - public void setLocationType(String locationType) { + public void setLocationType(@javax.annotation.Nullable String locationType) { this.locationType = locationType; } - public ProductPurchasePurchaseContext worldId(String worldId) { - + public ProductPurchasePurchaseContext worldId(@javax.annotation.Nullable String worldId) { this.worldId = worldId; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return worldId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getWorldId() { return worldId; } - - public void setWorldId(String worldId) { + public void setWorldId(@javax.annotation.Nullable String worldId) { this.worldId = worldId; } - public ProductPurchasePurchaseContext worldName(String worldName) { - + public ProductPurchasePurchaseContext worldName(@javax.annotation.Nullable String worldName) { this.worldName = worldName; return this; } - /** + /** * Get worldName * @return worldName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getWorldName() { return worldName; } - - public void setWorldName(String worldName) { + public void setWorldName(@javax.annotation.Nullable String worldName) { this.worldName = worldName; } @@ -169,10 +160,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -181,43 +169,41 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("locationType"); - openapiFields.add("worldId"); - openapiFields.add("worldName"); + openapiFields = new HashSet(Arrays.asList("locationType", "worldId", "worldName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ProductPurchasePurchaseContext - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ProductPurchasePurchaseContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProductPurchasePurchaseContext is not found in the empty JSON string", ProductPurchasePurchaseContext.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductPurchasePurchaseContext + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductPurchasePurchaseContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ProductPurchasePurchaseContext is not found in the empty JSON string", ProductPurchasePurchaseContext.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ProductPurchasePurchaseContext.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductPurchasePurchaseContext` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ProductPurchasePurchaseContext` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("locationType") != null && !jsonObj.get("locationType").isJsonNull()) && !jsonObj.get("locationType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `locationType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locationType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `locationType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locationType").toString())); } if ((jsonObj.get("worldId") != null && !jsonObj.get("worldId").isJsonNull()) && !jsonObj.get("worldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); } if ((jsonObj.get("worldName") != null && !jsonObj.get("worldName").isJsonNull()) && !jsonObj.get("worldName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldName").toString())); } } @@ -241,31 +227,31 @@ public void write(JsonWriter out, ProductPurchasePurchaseContext value) throws I @Override public ProductPurchasePurchaseContext read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ProductPurchasePurchaseContext given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProductPurchasePurchaseContext - * @throws IOException if the JSON string is invalid with respect to ProductPurchasePurchaseContext - */ + /** + * Create an instance of ProductPurchasePurchaseContext given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductPurchasePurchaseContext + * @throws IOException if the JSON string is invalid with respect to ProductPurchasePurchaseContext + */ public static ProductPurchasePurchaseContext fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ProductPurchasePurchaseContext.class); } - /** - * Convert an instance of ProductPurchasePurchaseContext to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ProductPurchasePurchaseContext to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ProductPurchaseRecord.java b/src/main/java/io/github/vrchatapi/model/ProductPurchaseRecord.java index 2c64c748..f75e9257 100644 --- a/src/main/java/io/github/vrchatapi/model/ProductPurchaseRecord.java +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchaseRecord.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ProductListingType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,331 +49,295 @@ /** * ProductPurchaseRecord */ -@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 ProductPurchaseRecord { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) + @javax.annotation.Nonnull private Integer amount; public static final String SERIALIZED_NAME_BALANCE = "balance"; @SerializedName(SERIALIZED_NAME_BALANCE) + @javax.annotation.Nonnull private Integer balance; public static final String SERIALIZED_NAME_DATE = "date"; @SerializedName(SERIALIZED_NAME_DATE) + @javax.annotation.Nonnull private OffsetDateTime date; public static final String SERIALIZED_NAME_FROM_USER_DISPLAY_NAME = "fromUserDisplayName"; @SerializedName(SERIALIZED_NAME_FROM_USER_DISPLAY_NAME) + @javax.annotation.Nonnull private String fromUserDisplayName; public static final String SERIALIZED_NAME_LISTING_DISPLAY_NAME = "listingDisplayName"; @SerializedName(SERIALIZED_NAME_LISTING_DISPLAY_NAME) + @javax.annotation.Nonnull private String listingDisplayName; public static final String SERIALIZED_NAME_LISTING_TYPE = "listingType"; @SerializedName(SERIALIZED_NAME_LISTING_TYPE) + @javax.annotation.Nonnull private ProductListingType listingType = ProductListingType.SUBSCRIPTION; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nonnull private String platform; public static final String SERIALIZED_NAME_PURCHASE_ID = "purchaseId"; @SerializedName(SERIALIZED_NAME_PURCHASE_ID) + @javax.annotation.Nonnull private String purchaseId; public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nonnull private Integer reason; public static final String SERIALIZED_NAME_REASON_LABEL = "reasonLabel"; @SerializedName(SERIALIZED_NAME_REASON_LABEL) + @javax.annotation.Nonnull private String reasonLabel; public static final String SERIALIZED_NAME_TRANSACTION_ID = "transactionId"; @SerializedName(SERIALIZED_NAME_TRANSACTION_ID) + @javax.annotation.Nonnull private Integer transactionId; public static final String SERIALIZED_NAME_TRANSACTION_LINE_ID = "transactionLineId"; @SerializedName(SERIALIZED_NAME_TRANSACTION_LINE_ID) + @javax.annotation.Nonnull private Integer transactionLineId; public ProductPurchaseRecord() { } - public ProductPurchaseRecord amount(Integer amount) { - + public ProductPurchaseRecord amount(@javax.annotation.Nonnull Integer amount) { this.amount = amount; return this; } - /** + /** * Get amount * @return amount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "399", required = true, value = "") - public Integer getAmount() { return amount; } - - public void setAmount(Integer amount) { + public void setAmount(@javax.annotation.Nonnull Integer amount) { this.amount = amount; } - public ProductPurchaseRecord balance(Integer balance) { - + public ProductPurchaseRecord balance(@javax.annotation.Nonnull Integer balance) { this.balance = balance; return this; } - /** + /** * Get balance * @return balance - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "399", required = true, value = "") - public Integer getBalance() { return balance; } - - public void setBalance(Integer balance) { + public void setBalance(@javax.annotation.Nonnull Integer balance) { this.balance = balance; } - public ProductPurchaseRecord date(OffsetDateTime date) { - + public ProductPurchaseRecord date(@javax.annotation.Nonnull OffsetDateTime date) { this.date = date; return this; } - /** + /** * Get date * @return date - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getDate() { return date; } - - public void setDate(OffsetDateTime date) { + public void setDate(@javax.annotation.Nonnull OffsetDateTime date) { this.date = date; } - public ProductPurchaseRecord fromUserDisplayName(String fromUserDisplayName) { - + public ProductPurchaseRecord fromUserDisplayName(@javax.annotation.Nonnull String fromUserDisplayName) { this.fromUserDisplayName = fromUserDisplayName; return this; } - /** + /** * Get fromUserDisplayName * @return fromUserDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "VRChat", required = true, value = "") - public String getFromUserDisplayName() { return fromUserDisplayName; } - - public void setFromUserDisplayName(String fromUserDisplayName) { + public void setFromUserDisplayName(@javax.annotation.Nonnull String fromUserDisplayName) { this.fromUserDisplayName = fromUserDisplayName; } - public ProductPurchaseRecord listingDisplayName(String listingDisplayName) { - + public ProductPurchaseRecord listingDisplayName(@javax.annotation.Nonnull String listingDisplayName) { this.listingDisplayName = listingDisplayName; return this; } - /** + /** * Get listingDisplayName * @return listingDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Lucky Red Envelope", required = true, value = "") - public String getListingDisplayName() { return listingDisplayName; } - - public void setListingDisplayName(String listingDisplayName) { + public void setListingDisplayName(@javax.annotation.Nonnull String listingDisplayName) { this.listingDisplayName = listingDisplayName; } - public ProductPurchaseRecord listingType(ProductListingType listingType) { - + public ProductPurchaseRecord listingType(@javax.annotation.Nonnull ProductListingType listingType) { this.listingType = listingType; return this; } - /** + /** * Get listingType * @return listingType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ProductListingType getListingType() { return listingType; } - - public void setListingType(ProductListingType listingType) { + public void setListingType(@javax.annotation.Nonnull ProductListingType listingType) { this.listingType = listingType; } - public ProductPurchaseRecord platform(String platform) { - + public ProductPurchaseRecord platform(@javax.annotation.Nonnull String platform) { this.platform = platform; return this; } - /** + /** * Where (first- or third-party) the purchase was made * @return platform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "VRChat", required = true, value = "Where (first- or third-party) the purchase was made") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nonnull String platform) { this.platform = platform; } - public ProductPurchaseRecord purchaseId(String purchaseId) { - + public ProductPurchaseRecord purchaseId(@javax.annotation.Nonnull String purchaseId) { this.purchaseId = purchaseId; return this; } - /** + /** * Get purchaseId * @return purchaseId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "pur_f0446b91-e0f7-403e-8932-609d5057898c", required = true, value = "") - public String getPurchaseId() { return purchaseId; } - - public void setPurchaseId(String purchaseId) { + public void setPurchaseId(@javax.annotation.Nonnull String purchaseId) { this.purchaseId = purchaseId; } - public ProductPurchaseRecord reason(Integer reason) { - + public ProductPurchaseRecord reason(@javax.annotation.Nonnull Integer reason) { this.reason = reason; return this; } - /** + /** * Get reason * @return reason - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "3002", required = true, value = "") - public Integer getReason() { return reason; } - - public void setReason(Integer reason) { + public void setReason(@javax.annotation.Nonnull Integer reason) { this.reason = reason; } - public ProductPurchaseRecord reasonLabel(String reasonLabel) { - + public ProductPurchaseRecord reasonLabel(@javax.annotation.Nonnull String reasonLabel) { this.reasonLabel = reasonLabel; return this; } - /** + /** * Get reasonLabel * @return reasonLabel - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Promo Credit", required = true, value = "") - public String getReasonLabel() { return reasonLabel; } - - public void setReasonLabel(String reasonLabel) { + public void setReasonLabel(@javax.annotation.Nonnull String reasonLabel) { this.reasonLabel = reasonLabel; } - public ProductPurchaseRecord transactionId(Integer transactionId) { - + public ProductPurchaseRecord transactionId(@javax.annotation.Nonnull Integer transactionId) { this.transactionId = transactionId; return this; } - /** + /** * Get transactionId * @return transactionId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTransactionId() { return transactionId; } - - public void setTransactionId(Integer transactionId) { + public void setTransactionId(@javax.annotation.Nonnull Integer transactionId) { this.transactionId = transactionId; } - public ProductPurchaseRecord transactionLineId(Integer transactionLineId) { - + public ProductPurchaseRecord transactionLineId(@javax.annotation.Nonnull Integer transactionLineId) { this.transactionLineId = transactionLineId; return this; } - /** + /** * Get transactionLineId * @return transactionLineId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTransactionLineId() { return transactionLineId; } - - public void setTransactionLineId(Integer transactionLineId) { + public void setTransactionLineId(@javax.annotation.Nonnull Integer transactionLineId) { this.transactionLineId = transactionLineId; } @@ -432,10 +396,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -444,77 +405,56 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("date"); - openapiFields.add("fromUserDisplayName"); - openapiFields.add("listingDisplayName"); - openapiFields.add("listingType"); - openapiFields.add("platform"); - openapiFields.add("purchaseId"); - openapiFields.add("reason"); - openapiFields.add("reasonLabel"); - openapiFields.add("transactionId"); - openapiFields.add("transactionLineId"); + openapiFields = new HashSet(Arrays.asList("amount", "balance", "date", "fromUserDisplayName", "listingDisplayName", "listingType", "platform", "purchaseId", "reason", "reasonLabel", "transactionId", "transactionLineId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("date"); - openapiRequiredFields.add("fromUserDisplayName"); - openapiRequiredFields.add("listingDisplayName"); - openapiRequiredFields.add("listingType"); - openapiRequiredFields.add("platform"); - openapiRequiredFields.add("purchaseId"); - openapiRequiredFields.add("reason"); - openapiRequiredFields.add("reasonLabel"); - openapiRequiredFields.add("transactionId"); - openapiRequiredFields.add("transactionLineId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ProductPurchaseRecord - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ProductPurchaseRecord.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProductPurchaseRecord is not found in the empty JSON string", ProductPurchaseRecord.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("amount", "balance", "date", "fromUserDisplayName", "listingDisplayName", "listingType", "platform", "purchaseId", "reason", "reasonLabel", "transactionId", "transactionLineId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProductPurchaseRecord + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProductPurchaseRecord.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ProductPurchaseRecord is not found in the empty JSON string", ProductPurchaseRecord.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ProductPurchaseRecord.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductPurchaseRecord` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ProductPurchaseRecord` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ProductPurchaseRecord.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fromUserDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fromUserDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fromUserDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fromUserDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fromUserDisplayName").toString())); } if (!jsonObj.get("listingDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingDisplayName").toString())); } + // validate the required field `listingType` + ProductListingType.validateJsonElement(jsonObj.get("listingType")); if (!jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if (!jsonObj.get("purchaseId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `purchaseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `purchaseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseId").toString())); } if (!jsonObj.get("reasonLabel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reasonLabel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reasonLabel").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reasonLabel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reasonLabel").toString())); } } @@ -538,31 +478,31 @@ public void write(JsonWriter out, ProductPurchaseRecord value) throws IOExceptio @Override public ProductPurchaseRecord read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ProductPurchaseRecord given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProductPurchaseRecord - * @throws IOException if the JSON string is invalid with respect to ProductPurchaseRecord - */ + /** + * Create an instance of ProductPurchaseRecord given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProductPurchaseRecord + * @throws IOException if the JSON string is invalid with respect to ProductPurchaseRecord + */ public static ProductPurchaseRecord fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ProductPurchaseRecord.class); } - /** - * Convert an instance of ProductPurchaseRecord to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ProductPurchaseRecord to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ProductType.java b/src/main/java/io/github/vrchatapi/model/ProductType.java index 02a2536c..f8709e79 100644 --- a/src/main/java/io/github/vrchatapi/model/ProductType.java +++ b/src/main/java/io/github/vrchatapi/model/ProductType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -72,5 +72,10 @@ public ProductType read(final JsonReader jsonReader) throws IOException { return ProductType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ProductType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/ProfileRepresentedGroup.java b/src/main/java/io/github/vrchatapi/model/ProfileRepresentedGroup.java new file mode 100644 index 00000000..237c371f --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ProfileRepresentedGroup.java @@ -0,0 +1,300 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * ProfileRepresentedGroup + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class ProfileRepresentedGroup { + public static final String SERIALIZED_NAME_BANNER_URL = "bannerUrl"; + @SerializedName(SERIALIZED_NAME_BANNER_URL) + @javax.annotation.Nullable + private String bannerUrl; + + public static final String SERIALIZED_NAME_ICON_URL = "iconUrl"; + @SerializedName(SERIALIZED_NAME_ICON_URL) + @javax.annotation.Nullable + private String iconUrl; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public ProfileRepresentedGroup() { + } + + public ProfileRepresentedGroup bannerUrl(@javax.annotation.Nullable String bannerUrl) { + this.bannerUrl = bannerUrl; + return this; + } + + /** + * Get bannerUrl + * @return bannerUrl + */ + @javax.annotation.Nullable + public String getBannerUrl() { + return bannerUrl; + } + + public void setBannerUrl(@javax.annotation.Nullable String bannerUrl) { + this.bannerUrl = bannerUrl; + } + + + public ProfileRepresentedGroup iconUrl(@javax.annotation.Nullable String iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + * Get iconUrl + * @return iconUrl + */ + @javax.annotation.Nullable + public String getIconUrl() { + return iconUrl; + } + + public void setIconUrl(@javax.annotation.Nullable String iconUrl) { + this.iconUrl = iconUrl; + } + + + public ProfileRepresentedGroup id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public ProfileRepresentedGroup name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProfileRepresentedGroup profileRepresentedGroup = (ProfileRepresentedGroup) o; + return Objects.equals(this.bannerUrl, profileRepresentedGroup.bannerUrl) && + Objects.equals(this.iconUrl, profileRepresentedGroup.iconUrl) && + Objects.equals(this.id, profileRepresentedGroup.id) && + Objects.equals(this.name, profileRepresentedGroup.name); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(bannerUrl, iconUrl, id, name); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProfileRepresentedGroup {\n"); + sb.append(" bannerUrl: ").append(toIndentedString(bannerUrl)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("bannerUrl", "iconUrl", "id", "name")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProfileRepresentedGroup + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProfileRepresentedGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ProfileRepresentedGroup is not found in the empty JSON string", ProfileRepresentedGroup.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProfileRepresentedGroup.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ProfileRepresentedGroup` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("bannerUrl") != null && !jsonObj.get("bannerUrl").isJsonNull()) && !jsonObj.get("bannerUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerUrl").toString())); + } + if ((jsonObj.get("iconUrl") != null && !jsonObj.get("iconUrl").isJsonNull()) && !jsonObj.get("iconUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProfileRepresentedGroup.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProfileRepresentedGroup' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProfileRepresentedGroup.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProfileRepresentedGroup value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProfileRepresentedGroup read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProfileRepresentedGroup given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProfileRepresentedGroup + * @throws IOException if the JSON string is invalid with respect to ProfileRepresentedGroup + */ + public static ProfileRepresentedGroup fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProfileRepresentedGroup.class); + } + + /** + * Convert an instance of ProfileRepresentedGroup to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/Prop.java b/src/main/java/io/github/vrchatapi/model/Prop.java index c75b9229..cb3f2f8e 100644 --- a/src/main/java/io/github/vrchatapi/model/Prop.java +++ b/src/main/java/io/github/vrchatapi/model/Prop.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,11 +20,10 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.PropUnityPackage; import io.github.vrchatapi.model.ReleaseStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -40,13 +38,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -54,452 +54,409 @@ /** * */ -@ApiModel(description = "") -@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 Prop { public static final String SERIALIZED_NAME_CREATED_AT = "_created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "_updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nonnull private String authorId; public static final String SERIALIZED_NAME_AUTHOR_NAME = "authorName"; @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nonnull private String authorName; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_MAX_COUNT_PER_USER = "maxCountPerUser"; @SerializedName(SERIALIZED_NAME_MAX_COUNT_PER_USER) + @javax.annotation.Nonnull private Integer maxCountPerUser = 1; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_RELEASE_STATUS = "releaseStatus"; @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) + @javax.annotation.Nonnull private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; public static final String SERIALIZED_NAME_SPAWN_TYPE = "spawnType"; @SerializedName(SERIALIZED_NAME_SPAWN_TYPE) + @javax.annotation.Nonnull private Integer spawnType = 1; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_THUMBNAIL_IMAGE_URL = "thumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nonnull private String thumbnailImageUrl; public static final String SERIALIZED_NAME_UNITY_PACKAGE_URL = "unityPackageUrl"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGE_URL) + @javax.annotation.Nullable private String unityPackageUrl; public static final String SERIALIZED_NAME_UNITY_PACKAGES = "unityPackages"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGES) + @javax.annotation.Nonnull private Set unityPackages = new LinkedHashSet<>(); public static final String SERIALIZED_NAME_WORLD_PLACEMENT_MASK = "worldPlacementMask"; @SerializedName(SERIALIZED_NAME_WORLD_PLACEMENT_MASK) + @javax.annotation.Nonnull private Integer worldPlacementMask = 1; public Prop() { } - public Prop createdAt(OffsetDateTime createdAt) { - + public Prop createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public Prop updatedAt(OffsetDateTime updatedAt) { - + public Prop updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public Prop authorId(String authorId) { - + public Prop authorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; } - public Prop authorName(String authorName) { - + public Prop authorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; return this; } - /** + /** * Get authorName * @return authorName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAuthorName() { return authorName; } - - public void setAuthorName(String authorName) { + public void setAuthorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; } - public Prop description(String description) { - + public Prop description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public Prop id(String id) { - + public Prop id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "prop_829ba6f6-b837-49d9-b9a9-056b82103b58", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Prop imageUrl(String imageUrl) { - + public Prop imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public Prop maxCountPerUser(Integer maxCountPerUser) { - + public Prop maxCountPerUser(@javax.annotation.Nonnull Integer maxCountPerUser) { this.maxCountPerUser = maxCountPerUser; return this; } - /** + /** * Get maxCountPerUser * @return maxCountPerUser - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getMaxCountPerUser() { return maxCountPerUser; } - - public void setMaxCountPerUser(Integer maxCountPerUser) { + public void setMaxCountPerUser(@javax.annotation.Nonnull Integer maxCountPerUser) { this.maxCountPerUser = maxCountPerUser; } - public Prop name(String name) { - + public Prop name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public Prop releaseStatus(ReleaseStatus releaseStatus) { - + public Prop releaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; return this; } - /** + /** * Get releaseStatus * @return releaseStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ReleaseStatus getReleaseStatus() { return releaseStatus; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { + public void setReleaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; } - public Prop spawnType(Integer spawnType) { - + public Prop spawnType(@javax.annotation.Nonnull Integer spawnType) { this.spawnType = spawnType; return this; } - /** + /** * How a prop is summoned and interacted with. 0: the prop fixed to some surface in the world 1: the prop is a pickup and may be held by users 2: ??? * minimum: 0 * @return spawnType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "How a prop is summoned and interacted with. 0: the prop fixed to some surface in the world 1: the prop is a pickup and may be held by users 2: ???") - public Integer getSpawnType() { return spawnType; } - - public void setSpawnType(Integer spawnType) { + public void setSpawnType(@javax.annotation.Nonnull Integer spawnType) { this.spawnType = spawnType; } - public Prop tags(List tags) { - + public Prop tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public Prop addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public Prop thumbnailImageUrl(String thumbnailImageUrl) { - + public Prop thumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; return this; } - /** + /** * Get thumbnailImageUrl * @return thumbnailImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getThumbnailImageUrl() { return thumbnailImageUrl; } - - public void setThumbnailImageUrl(String thumbnailImageUrl) { + public void setThumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; } - public Prop unityPackageUrl(String unityPackageUrl) { - + public Prop unityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; return this; } - /** + /** * Get unityPackageUrl * @return unityPackageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getUnityPackageUrl() { return unityPackageUrl; } - - public void setUnityPackageUrl(String unityPackageUrl) { + public void setUnityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; } - public Prop unityPackages(Set unityPackages) { - + public Prop unityPackages(@javax.annotation.Nonnull Set unityPackages) { this.unityPackages = unityPackages; return this; } public Prop addUnityPackagesItem(PropUnityPackage unityPackagesItem) { + if (this.unityPackages == null) { + this.unityPackages = new LinkedHashSet<>(); + } this.unityPackages.add(unityPackagesItem); return this; } - /** + /** * Get unityPackages * @return unityPackages - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Set getUnityPackages() { return unityPackages; } - - public void setUnityPackages(Set unityPackages) { + public void setUnityPackages(@javax.annotation.Nonnull Set unityPackages) { this.unityPackages = unityPackages; } - public Prop worldPlacementMask(Integer worldPlacementMask) { - + public Prop worldPlacementMask(@javax.annotation.Nonnull Integer worldPlacementMask) { this.worldPlacementMask = worldPlacementMask; return this; } - /** + /** * Bitmask for restrictions on what world surfaces a prop may be summoned. 0: no restrictions 1: floors 2: walls 4: ceilings * minimum: 0 * @return worldPlacementMask - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Bitmask for restrictions on what world surfaces a prop may be summoned. 0: no restrictions 1: floors 2: walls 4: ceilings") - public Integer getWorldPlacementMask() { return worldPlacementMask; } - - public void setWorldPlacementMask(Integer worldPlacementMask) { + public void setWorldPlacementMask(@javax.annotation.Nonnull Integer worldPlacementMask) { this.worldPlacementMask = worldPlacementMask; } @@ -566,10 +523,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -578,111 +532,82 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("_created_at"); - openapiFields.add("_updated_at"); - openapiFields.add("authorId"); - openapiFields.add("authorName"); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("maxCountPerUser"); - openapiFields.add("name"); - openapiFields.add("releaseStatus"); - openapiFields.add("spawnType"); - openapiFields.add("tags"); - openapiFields.add("thumbnailImageUrl"); - openapiFields.add("unityPackageUrl"); - openapiFields.add("unityPackages"); - openapiFields.add("worldPlacementMask"); + openapiFields = new HashSet(Arrays.asList("_created_at", "_updated_at", "authorId", "authorName", "description", "id", "imageUrl", "maxCountPerUser", "name", "releaseStatus", "spawnType", "tags", "thumbnailImageUrl", "unityPackageUrl", "unityPackages", "worldPlacementMask")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("_created_at"); - openapiRequiredFields.add("_updated_at"); - openapiRequiredFields.add("authorId"); - openapiRequiredFields.add("authorName"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("maxCountPerUser"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("releaseStatus"); - openapiRequiredFields.add("spawnType"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("thumbnailImageUrl"); - openapiRequiredFields.add("unityPackageUrl"); - openapiRequiredFields.add("unityPackages"); - openapiRequiredFields.add("worldPlacementMask"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Prop - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Prop.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Prop is not found in the empty JSON string", Prop.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("_created_at", "_updated_at", "authorId", "authorName", "description", "id", "imageUrl", "maxCountPerUser", "name", "releaseStatus", "spawnType", "tags", "thumbnailImageUrl", "unityPackageUrl", "unityPackages", "worldPlacementMask")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Prop + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Prop.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Prop is not found in the empty JSON string", Prop.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Prop.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Prop` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Prop` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Prop.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if (!jsonObj.get("authorName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } + // validate the required field `releaseStatus` + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("thumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); } - if (!jsonObj.get("unityPackageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); + if ((jsonObj.get("unityPackageUrl") != null && !jsonObj.get("unityPackageUrl").isJsonNull()) && !jsonObj.get("unityPackageUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); } - // ensure the json data is an array - if (!jsonObj.get("unityPackages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); + if (jsonObj.get("unityPackages") != null) { + if (!jsonObj.get("unityPackages").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); + } + JsonArray jsonArrayunityPackages = jsonObj.getAsJsonArray("unityPackages"); + // validate the required field `unityPackages` (array) + for (int i = 0; i < jsonArrayunityPackages.size(); i++) { + PropUnityPackage.validateJsonElement(jsonArrayunityPackages.get(i)); + } } - - JsonArray jsonArrayunityPackages = jsonObj.getAsJsonArray("unityPackages"); - // validate the required field `unityPackages` (array) - for (int i = 0; i < jsonArrayunityPackages.size(); i++) { - PropUnityPackage.validateJsonObject(jsonArrayunityPackages.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -705,31 +630,31 @@ public void write(JsonWriter out, Prop value) throws IOException { @Override public Prop read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Prop given an JSON string - * - * @param jsonString JSON string - * @return An instance of Prop - * @throws IOException if the JSON string is invalid with respect to Prop - */ + /** + * Create an instance of Prop given an JSON string + * + * @param jsonString JSON string + * @return An instance of Prop + * @throws IOException if the JSON string is invalid with respect to Prop + */ public static Prop fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Prop.class); } - /** - * Convert an instance of Prop to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Prop to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PropPublishStatus.java b/src/main/java/io/github/vrchatapi/model/PropPublishStatus.java index 73918245..143a6f58 100644 --- a/src/main/java/io/github/vrchatapi/model/PropPublishStatus.java +++ b/src/main/java/io/github/vrchatapi/model/PropPublishStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * PropPublishStatus */ -@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 PropPublishStatus { public static final String SERIALIZED_NAME_CAN_PUBLISH = "canPublish"; @SerializedName(SERIALIZED_NAME_CAN_PUBLISH) + @javax.annotation.Nullable private Boolean canPublish = false; public PropPublishStatus() { } - public PropPublishStatus canPublish(Boolean canPublish) { - + public PropPublishStatus canPublish(@javax.annotation.Nullable Boolean canPublish) { this.canPublish = canPublish; return this; } - /** + /** * Get canPublish * @return canPublish - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getCanPublish() { return canPublish; } - - public void setCanPublish(Boolean canPublish) { + public void setCanPublish(@javax.annotation.Nullable Boolean canPublish) { this.canPublish = canPublish; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,33 +117,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("canPublish"); + openapiFields = new HashSet(Arrays.asList("canPublish")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PropPublishStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PropPublishStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PropPublishStatus is not found in the empty JSON string", PropPublishStatus.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PropPublishStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PropPublishStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PropPublishStatus is not found in the empty JSON string", PropPublishStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PropPublishStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PropPublishStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PropPublishStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -172,31 +166,31 @@ public void write(JsonWriter out, PropPublishStatus value) throws IOException { @Override public PropPublishStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PropPublishStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of PropPublishStatus - * @throws IOException if the JSON string is invalid with respect to PropPublishStatus - */ + /** + * Create an instance of PropPublishStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of PropPublishStatus + * @throws IOException if the JSON string is invalid with respect to PropPublishStatus + */ public static PropPublishStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PropPublishStatus.class); } - /** - * Convert an instance of PropPublishStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PropPublishStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PropUnityPackage.java b/src/main/java/io/github/vrchatapi/model/PropUnityPackage.java index 2782fb93..f35b1a1d 100644 --- a/src/main/java/io/github/vrchatapi/model/PropUnityPackage.java +++ b/src/main/java/io/github/vrchatapi/model/PropUnityPackage.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,171 +47,152 @@ /** * */ -@ApiModel(description = "") -@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 PropUnityPackage { public static final String SERIALIZED_NAME_ASSET_URL = "assetUrl"; @SerializedName(SERIALIZED_NAME_ASSET_URL) + @javax.annotation.Nonnull private String assetUrl; public static final String SERIALIZED_NAME_ASSET_VERSION = "assetVersion"; @SerializedName(SERIALIZED_NAME_ASSET_VERSION) + @javax.annotation.Nonnull private Integer assetVersion; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nonnull private String platform; public static final String SERIALIZED_NAME_PROP_SIGNATURE = "propSignature"; @SerializedName(SERIALIZED_NAME_PROP_SIGNATURE) + @javax.annotation.Nonnull private String propSignature; public static final String SERIALIZED_NAME_UNITY_VERSION = "unityVersion"; @SerializedName(SERIALIZED_NAME_UNITY_VERSION) + @javax.annotation.Nonnull private String unityVersion = "2022.3.22f1"; public static final String SERIALIZED_NAME_VARIANT = "variant"; @SerializedName(SERIALIZED_NAME_VARIANT) + @javax.annotation.Nonnull private String variant; public PropUnityPackage() { } - public PropUnityPackage assetUrl(String assetUrl) { - + public PropUnityPackage assetUrl(@javax.annotation.Nonnull String assetUrl) { this.assetUrl = assetUrl; return this; } - /** + /** * Get assetUrl * @return assetUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/file/file_c991c050-8b43-4046-8182-24d068524ac5/24/file", required = true, value = "") - public String getAssetUrl() { return assetUrl; } - - public void setAssetUrl(String assetUrl) { + public void setAssetUrl(@javax.annotation.Nonnull String assetUrl) { this.assetUrl = assetUrl; } - public PropUnityPackage assetVersion(Integer assetVersion) { - + public PropUnityPackage assetVersion(@javax.annotation.Nonnull Integer assetVersion) { this.assetVersion = assetVersion; return this; } - /** + /** * Get assetVersion * minimum: 0 * @return assetVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "4", required = true, value = "") - public Integer getAssetVersion() { return assetVersion; } - - public void setAssetVersion(Integer assetVersion) { + public void setAssetVersion(@javax.annotation.Nonnull Integer assetVersion) { this.assetVersion = assetVersion; } - public PropUnityPackage platform(String platform) { - + public PropUnityPackage platform(@javax.annotation.Nonnull String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows", required = true, value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nonnull String platform) { this.platform = platform; } - public PropUnityPackage propSignature(String propSignature) { - + public PropUnityPackage propSignature(@javax.annotation.Nonnull String propSignature) { this.propSignature = propSignature; return this; } - /** + /** * Get propSignature * @return propSignature - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getPropSignature() { return propSignature; } - - public void setPropSignature(String propSignature) { + public void setPropSignature(@javax.annotation.Nonnull String propSignature) { this.propSignature = propSignature; } - public PropUnityPackage unityVersion(String unityVersion) { - + public PropUnityPackage unityVersion(@javax.annotation.Nonnull String unityVersion) { this.unityVersion = unityVersion; return this; } - /** + /** * Get unityVersion * @return unityVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2022.3.22f1", required = true, value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nonnull String unityVersion) { this.unityVersion = unityVersion; } - public PropUnityPackage variant(String variant) { - + public PropUnityPackage variant(@javax.annotation.Nonnull String variant) { this.variant = variant; return this; } - /** + /** * Get variant * @return variant - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getVariant() { return variant; } - - public void setVariant(String variant) { + public void setVariant(@javax.annotation.Nonnull String variant) { this.variant = variant; } @@ -258,10 +239,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -270,65 +248,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assetUrl"); - openapiFields.add("assetVersion"); - openapiFields.add("platform"); - openapiFields.add("propSignature"); - openapiFields.add("unityVersion"); - openapiFields.add("variant"); + openapiFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "platform", "propSignature", "unityVersion", "variant")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("assetUrl"); - openapiRequiredFields.add("assetVersion"); - openapiRequiredFields.add("platform"); - openapiRequiredFields.add("propSignature"); - openapiRequiredFields.add("unityVersion"); - openapiRequiredFields.add("variant"); + openapiRequiredFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "platform", "propSignature", "unityVersion", "variant")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PropUnityPackage - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PropUnityPackage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PropUnityPackage is not found in the empty JSON string", PropUnityPackage.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PropUnityPackage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PropUnityPackage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PropUnityPackage is not found in the empty JSON string", PropUnityPackage.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PropUnityPackage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PropUnityPackage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PropUnityPackage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : PropUnityPackage.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("assetUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); } if (!jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if (!jsonObj.get("propSignature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `propSignature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propSignature").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `propSignature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propSignature").toString())); } if (!jsonObj.get("unityVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); } if (!jsonObj.get("variant").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `variant` to be a primitive type in the JSON string but got `%s`", jsonObj.get("variant").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `variant` to be a primitive type in the JSON string but got `%s`", jsonObj.get("variant").toString())); } } @@ -352,31 +319,31 @@ public void write(JsonWriter out, PropUnityPackage value) throws IOException { @Override public PropUnityPackage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PropUnityPackage given an JSON string - * - * @param jsonString JSON string - * @return An instance of PropUnityPackage - * @throws IOException if the JSON string is invalid with respect to PropUnityPackage - */ + /** + * Create an instance of PropUnityPackage given an JSON string + * + * @param jsonString JSON string + * @return An instance of PropUnityPackage + * @throws IOException if the JSON string is invalid with respect to PropUnityPackage + */ public static PropUnityPackage fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PropUnityPackage.class); } - /** - * Convert an instance of PropUnityPackage to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PropUnityPackage to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PublicProfile.java b/src/main/java/io/github/vrchatapi/model/PublicProfile.java new file mode 100644 index 00000000..22fcf698 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PublicProfile.java @@ -0,0 +1,837 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.github.vrchatapi.model.AgeVerificationStatus; +import io.github.vrchatapi.model.Badge; +import io.github.vrchatapi.model.ProfileRepresentedGroup; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * PublicProfile + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class PublicProfile { + public static final String SERIALIZED_NAME_AGE_VERIFICATION_STATUS = "ageVerificationStatus"; + @SerializedName(SERIALIZED_NAME_AGE_VERIFICATION_STATUS) + @javax.annotation.Nullable + private AgeVerificationStatus ageVerificationStatus; + + public static final String SERIALIZED_NAME_AGE_VERIFIED = "ageVerified"; + @SerializedName(SERIALIZED_NAME_AGE_VERIFIED) + @javax.annotation.Nullable + private Boolean ageVerified; + + public static final String SERIALIZED_NAME_BACKGROUND_TYPE = "backgroundType"; + @SerializedName(SERIALIZED_NAME_BACKGROUND_TYPE) + @javax.annotation.Nullable + private String backgroundType; + + public static final String SERIALIZED_NAME_BADGES = "badges"; + @SerializedName(SERIALIZED_NAME_BADGES) + @javax.annotation.Nullable + private List badges = new ArrayList<>(); + + public static final String SERIALIZED_NAME_BANNER_COLOR = "bannerColor"; + @SerializedName(SERIALIZED_NAME_BANNER_COLOR) + @javax.annotation.Nullable + private String bannerColor; + + public static final String SERIALIZED_NAME_BANNER_TYPE = "bannerType"; + @SerializedName(SERIALIZED_NAME_BANNER_TYPE) + @javax.annotation.Nullable + private String bannerType; + + public static final String SERIALIZED_NAME_BIO = "bio"; + @SerializedName(SERIALIZED_NAME_BIO) + @javax.annotation.Nullable + private String bio; + + public static final String SERIALIZED_NAME_BIO_LINKS = "bioLinks"; + @SerializedName(SERIALIZED_NAME_BIO_LINKS) + @javax.annotation.Nullable + private List bioLinks = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable + private String displayName; + + public static final String SERIALIZED_NAME_HAS_VRC_PLUS = "hasVrcPlus"; + @SerializedName(SERIALIZED_NAME_HAS_VRC_PLUS) + @javax.annotation.Nullable + private Boolean hasVrcPlus; + + public static final String SERIALIZED_NAME_ICON_FRAME = "iconFrame"; + @SerializedName(SERIALIZED_NAME_ICON_FRAME) + @javax.annotation.Nullable + private String iconFrame; + + public static final String SERIALIZED_NAME_ICON_URL = "iconUrl"; + @SerializedName(SERIALIZED_NAME_ICON_URL) + @javax.annotation.Nullable + private String iconUrl; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_IS_ECONOMY_CREATOR = "isEconomyCreator"; + @SerializedName(SERIALIZED_NAME_IS_ECONOMY_CREATOR) + @javax.annotation.Nullable + private Boolean isEconomyCreator; + + public static final String SERIALIZED_NAME_LANGUAGES = "languages"; + @SerializedName(SERIALIZED_NAME_LANGUAGES) + @javax.annotation.Nullable + private List languages = new ArrayList<>(); + + public static final String SERIALIZED_NAME_NAMEPLATE_EFFECT = "nameplateEffect"; + @SerializedName(SERIALIZED_NAME_NAMEPLATE_EFFECT) + @javax.annotation.Nullable + private String nameplateEffect; + + public static final String SERIALIZED_NAME_PROFILE_EFFECT = "profileEffect"; + @SerializedName(SERIALIZED_NAME_PROFILE_EFFECT) + @javax.annotation.Nullable + private String profileEffect; + + public static final String SERIALIZED_NAME_PRONOUNS = "pronouns"; + @SerializedName(SERIALIZED_NAME_PRONOUNS) + @javax.annotation.Nullable + private String pronouns; + + public static final String SERIALIZED_NAME_REPRESENTED_GROUP = "representedGroup"; + @SerializedName(SERIALIZED_NAME_REPRESENTED_GROUP) + @javax.annotation.Nullable + private ProfileRepresentedGroup representedGroup; + + public static final String SERIALIZED_NAME_THEME_ID = "themeId"; + @SerializedName(SERIALIZED_NAME_THEME_ID) + @javax.annotation.Nullable + private String themeId; + + public static final String SERIALIZED_NAME_TRUST_TAGS = "trustTags"; + @SerializedName(SERIALIZED_NAME_TRUST_TAGS) + @javax.annotation.Nullable + private List trustTags = new ArrayList<>(); + + public PublicProfile() { + } + + public PublicProfile ageVerificationStatus(@javax.annotation.Nullable AgeVerificationStatus ageVerificationStatus) { + this.ageVerificationStatus = ageVerificationStatus; + return this; + } + + /** + * Get ageVerificationStatus + * @return ageVerificationStatus + */ + @javax.annotation.Nullable + public AgeVerificationStatus getAgeVerificationStatus() { + return ageVerificationStatus; + } + + public void setAgeVerificationStatus(@javax.annotation.Nullable AgeVerificationStatus ageVerificationStatus) { + this.ageVerificationStatus = ageVerificationStatus; + } + + + public PublicProfile ageVerified(@javax.annotation.Nullable Boolean ageVerified) { + this.ageVerified = ageVerified; + return this; + } + + /** + * `true` if, user is age verified (not 18+). + * @return ageVerified + */ + @javax.annotation.Nullable + public Boolean getAgeVerified() { + return ageVerified; + } + + public void setAgeVerified(@javax.annotation.Nullable Boolean ageVerified) { + this.ageVerified = ageVerified; + } + + + public PublicProfile backgroundType(@javax.annotation.Nullable String backgroundType) { + this.backgroundType = backgroundType; + return this; + } + + /** + * Get backgroundType + * @return backgroundType + */ + @javax.annotation.Nullable + public String getBackgroundType() { + return backgroundType; + } + + public void setBackgroundType(@javax.annotation.Nullable String backgroundType) { + this.backgroundType = backgroundType; + } + + + public PublicProfile badges(@javax.annotation.Nullable List badges) { + this.badges = badges; + return this; + } + + public PublicProfile addBadgesItem(Badge badgesItem) { + if (this.badges == null) { + this.badges = new ArrayList<>(); + } + this.badges.add(badgesItem); + return this; + } + + /** + * Get badges + * @return badges + */ + @javax.annotation.Nullable + public List getBadges() { + return badges; + } + + public void setBadges(@javax.annotation.Nullable List badges) { + this.badges = badges; + } + + + public PublicProfile bannerColor(@javax.annotation.Nullable String bannerColor) { + this.bannerColor = bannerColor; + return this; + } + + /** + * Get bannerColor + * @return bannerColor + */ + @javax.annotation.Nullable + public String getBannerColor() { + return bannerColor; + } + + public void setBannerColor(@javax.annotation.Nullable String bannerColor) { + this.bannerColor = bannerColor; + } + + + public PublicProfile bannerType(@javax.annotation.Nullable String bannerType) { + this.bannerType = bannerType; + return this; + } + + /** + * Get bannerType + * @return bannerType + */ + @javax.annotation.Nullable + public String getBannerType() { + return bannerType; + } + + public void setBannerType(@javax.annotation.Nullable String bannerType) { + this.bannerType = bannerType; + } + + + public PublicProfile bio(@javax.annotation.Nullable String bio) { + this.bio = bio; + return this; + } + + /** + * Get bio + * @return bio + */ + @javax.annotation.Nullable + public String getBio() { + return bio; + } + + public void setBio(@javax.annotation.Nullable String bio) { + this.bio = bio; + } + + + public PublicProfile bioLinks(@javax.annotation.Nullable List bioLinks) { + this.bioLinks = bioLinks; + return this; + } + + public PublicProfile addBioLinksItem(String bioLinksItem) { + if (this.bioLinks == null) { + this.bioLinks = new ArrayList<>(); + } + this.bioLinks.add(bioLinksItem); + return this; + } + + /** + * Get bioLinks + * @return bioLinks + */ + @javax.annotation.Nullable + public List getBioLinks() { + return bioLinks; + } + + public void setBioLinks(@javax.annotation.Nullable List bioLinks) { + this.bioLinks = bioLinks; + } + + + public PublicProfile displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public PublicProfile hasVrcPlus(@javax.annotation.Nullable Boolean hasVrcPlus) { + this.hasVrcPlus = hasVrcPlus; + return this; + } + + /** + * Get hasVrcPlus + * @return hasVrcPlus + */ + @javax.annotation.Nullable + public Boolean getHasVrcPlus() { + return hasVrcPlus; + } + + public void setHasVrcPlus(@javax.annotation.Nullable Boolean hasVrcPlus) { + this.hasVrcPlus = hasVrcPlus; + } + + + public PublicProfile iconFrame(@javax.annotation.Nullable String iconFrame) { + this.iconFrame = iconFrame; + return this; + } + + /** + * Get iconFrame + * @return iconFrame + */ + @javax.annotation.Nullable + public String getIconFrame() { + return iconFrame; + } + + public void setIconFrame(@javax.annotation.Nullable String iconFrame) { + this.iconFrame = iconFrame; + } + + + public PublicProfile iconUrl(@javax.annotation.Nullable String iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + * Get iconUrl + * @return iconUrl + */ + @javax.annotation.Nullable + public String getIconUrl() { + return iconUrl; + } + + public void setIconUrl(@javax.annotation.Nullable String iconUrl) { + this.iconUrl = iconUrl; + } + + + public PublicProfile id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public PublicProfile isEconomyCreator(@javax.annotation.Nullable Boolean isEconomyCreator) { + this.isEconomyCreator = isEconomyCreator; + return this; + } + + /** + * Get isEconomyCreator + * @return isEconomyCreator + */ + @javax.annotation.Nullable + public Boolean getIsEconomyCreator() { + return isEconomyCreator; + } + + public void setIsEconomyCreator(@javax.annotation.Nullable Boolean isEconomyCreator) { + this.isEconomyCreator = isEconomyCreator; + } + + + public PublicProfile languages(@javax.annotation.Nullable List languages) { + this.languages = languages; + return this; + } + + public PublicProfile addLanguagesItem(String languagesItem) { + if (this.languages == null) { + this.languages = new ArrayList<>(); + } + this.languages.add(languagesItem); + return this; + } + + /** + * Get languages + * @return languages + */ + @javax.annotation.Nullable + public List getLanguages() { + return languages; + } + + public void setLanguages(@javax.annotation.Nullable List languages) { + this.languages = languages; + } + + + public PublicProfile nameplateEffect(@javax.annotation.Nullable String nameplateEffect) { + this.nameplateEffect = nameplateEffect; + return this; + } + + /** + * Get nameplateEffect + * @return nameplateEffect + */ + @javax.annotation.Nullable + public String getNameplateEffect() { + return nameplateEffect; + } + + public void setNameplateEffect(@javax.annotation.Nullable String nameplateEffect) { + this.nameplateEffect = nameplateEffect; + } + + + public PublicProfile profileEffect(@javax.annotation.Nullable String profileEffect) { + this.profileEffect = profileEffect; + return this; + } + + /** + * Get profileEffect + * @return profileEffect + */ + @javax.annotation.Nullable + public String getProfileEffect() { + return profileEffect; + } + + public void setProfileEffect(@javax.annotation.Nullable String profileEffect) { + this.profileEffect = profileEffect; + } + + + public PublicProfile pronouns(@javax.annotation.Nullable String pronouns) { + this.pronouns = pronouns; + return this; + } + + /** + * Get pronouns + * @return pronouns + */ + @javax.annotation.Nullable + public String getPronouns() { + return pronouns; + } + + public void setPronouns(@javax.annotation.Nullable String pronouns) { + this.pronouns = pronouns; + } + + + public PublicProfile representedGroup(@javax.annotation.Nullable ProfileRepresentedGroup representedGroup) { + this.representedGroup = representedGroup; + return this; + } + + /** + * Get representedGroup + * @return representedGroup + */ + @javax.annotation.Nullable + public ProfileRepresentedGroup getRepresentedGroup() { + return representedGroup; + } + + public void setRepresentedGroup(@javax.annotation.Nullable ProfileRepresentedGroup representedGroup) { + this.representedGroup = representedGroup; + } + + + public PublicProfile themeId(@javax.annotation.Nullable String themeId) { + this.themeId = themeId; + return this; + } + + /** + * Get themeId + * @return themeId + */ + @javax.annotation.Nullable + public String getThemeId() { + return themeId; + } + + public void setThemeId(@javax.annotation.Nullable String themeId) { + this.themeId = themeId; + } + + + public PublicProfile trustTags(@javax.annotation.Nullable List trustTags) { + this.trustTags = trustTags; + return this; + } + + public PublicProfile addTrustTagsItem(String trustTagsItem) { + if (this.trustTags == null) { + this.trustTags = new ArrayList<>(); + } + this.trustTags.add(trustTagsItem); + return this; + } + + /** + * Get trustTags + * @return trustTags + */ + @javax.annotation.Nullable + public List getTrustTags() { + return trustTags; + } + + public void setTrustTags(@javax.annotation.Nullable List trustTags) { + this.trustTags = trustTags; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PublicProfile publicProfile = (PublicProfile) o; + return Objects.equals(this.ageVerificationStatus, publicProfile.ageVerificationStatus) && + Objects.equals(this.ageVerified, publicProfile.ageVerified) && + Objects.equals(this.backgroundType, publicProfile.backgroundType) && + Objects.equals(this.badges, publicProfile.badges) && + Objects.equals(this.bannerColor, publicProfile.bannerColor) && + Objects.equals(this.bannerType, publicProfile.bannerType) && + Objects.equals(this.bio, publicProfile.bio) && + Objects.equals(this.bioLinks, publicProfile.bioLinks) && + Objects.equals(this.displayName, publicProfile.displayName) && + Objects.equals(this.hasVrcPlus, publicProfile.hasVrcPlus) && + Objects.equals(this.iconFrame, publicProfile.iconFrame) && + Objects.equals(this.iconUrl, publicProfile.iconUrl) && + Objects.equals(this.id, publicProfile.id) && + Objects.equals(this.isEconomyCreator, publicProfile.isEconomyCreator) && + Objects.equals(this.languages, publicProfile.languages) && + Objects.equals(this.nameplateEffect, publicProfile.nameplateEffect) && + Objects.equals(this.profileEffect, publicProfile.profileEffect) && + Objects.equals(this.pronouns, publicProfile.pronouns) && + Objects.equals(this.representedGroup, publicProfile.representedGroup) && + Objects.equals(this.themeId, publicProfile.themeId) && + Objects.equals(this.trustTags, publicProfile.trustTags); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(ageVerificationStatus, ageVerified, backgroundType, badges, bannerColor, bannerType, bio, bioLinks, displayName, hasVrcPlus, iconFrame, iconUrl, id, isEconomyCreator, languages, nameplateEffect, profileEffect, pronouns, representedGroup, themeId, trustTags); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PublicProfile {\n"); + sb.append(" ageVerificationStatus: ").append(toIndentedString(ageVerificationStatus)).append("\n"); + sb.append(" ageVerified: ").append(toIndentedString(ageVerified)).append("\n"); + sb.append(" backgroundType: ").append(toIndentedString(backgroundType)).append("\n"); + sb.append(" badges: ").append(toIndentedString(badges)).append("\n"); + sb.append(" bannerColor: ").append(toIndentedString(bannerColor)).append("\n"); + sb.append(" bannerType: ").append(toIndentedString(bannerType)).append("\n"); + sb.append(" bio: ").append(toIndentedString(bio)).append("\n"); + sb.append(" bioLinks: ").append(toIndentedString(bioLinks)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" hasVrcPlus: ").append(toIndentedString(hasVrcPlus)).append("\n"); + sb.append(" iconFrame: ").append(toIndentedString(iconFrame)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isEconomyCreator: ").append(toIndentedString(isEconomyCreator)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" nameplateEffect: ").append(toIndentedString(nameplateEffect)).append("\n"); + sb.append(" profileEffect: ").append(toIndentedString(profileEffect)).append("\n"); + sb.append(" pronouns: ").append(toIndentedString(pronouns)).append("\n"); + sb.append(" representedGroup: ").append(toIndentedString(representedGroup)).append("\n"); + sb.append(" themeId: ").append(toIndentedString(themeId)).append("\n"); + sb.append(" trustTags: ").append(toIndentedString(trustTags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("ageVerificationStatus", "ageVerified", "backgroundType", "badges", "bannerColor", "bannerType", "bio", "bioLinks", "displayName", "hasVrcPlus", "iconFrame", "iconUrl", "id", "isEconomyCreator", "languages", "nameplateEffect", "profileEffect", "pronouns", "representedGroup", "themeId", "trustTags")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PublicProfile + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PublicProfile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PublicProfile is not found in the empty JSON string", PublicProfile.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PublicProfile.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PublicProfile` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `ageVerificationStatus` + if (jsonObj.get("ageVerificationStatus") != null && !jsonObj.get("ageVerificationStatus").isJsonNull()) { + AgeVerificationStatus.validateJsonElement(jsonObj.get("ageVerificationStatus")); + } + if ((jsonObj.get("backgroundType") != null && !jsonObj.get("backgroundType").isJsonNull()) && !jsonObj.get("backgroundType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `backgroundType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backgroundType").toString())); + } + if (jsonObj.get("badges") != null && !jsonObj.get("badges").isJsonNull()) { + JsonArray jsonArraybadges = jsonObj.getAsJsonArray("badges"); + if (jsonArraybadges != null) { + // ensure the json data is an array + if (!jsonObj.get("badges").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badges` to be an array in the JSON string but got `%s`", jsonObj.get("badges").toString())); + } + + // validate the optional field `badges` (array) + for (int i = 0; i < jsonArraybadges.size(); i++) { + Badge.validateJsonElement(jsonArraybadges.get(i)); + }; + } + } + if ((jsonObj.get("bannerColor") != null && !jsonObj.get("bannerColor").isJsonNull()) && !jsonObj.get("bannerColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerColor").toString())); + } + if ((jsonObj.get("bannerType") != null && !jsonObj.get("bannerType").isJsonNull()) && !jsonObj.get("bannerType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerType").toString())); + } + if ((jsonObj.get("bio") != null && !jsonObj.get("bio").isJsonNull()) && !jsonObj.get("bio").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("bioLinks") != null && !jsonObj.get("bioLinks").isJsonNull() && !jsonObj.get("bioLinks").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); + } + if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + } + if ((jsonObj.get("iconFrame") != null && !jsonObj.get("iconFrame").isJsonNull()) && !jsonObj.get("iconFrame").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconFrame` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconFrame").toString())); + } + if ((jsonObj.get("iconUrl") != null && !jsonObj.get("iconUrl").isJsonNull()) && !jsonObj.get("iconUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("languages") != null && !jsonObj.get("languages").isJsonNull() && !jsonObj.get("languages").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `languages` to be an array in the JSON string but got `%s`", jsonObj.get("languages").toString())); + } + if ((jsonObj.get("nameplateEffect") != null && !jsonObj.get("nameplateEffect").isJsonNull()) && !jsonObj.get("nameplateEffect").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `nameplateEffect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nameplateEffect").toString())); + } + if ((jsonObj.get("profileEffect") != null && !jsonObj.get("profileEffect").isJsonNull()) && !jsonObj.get("profileEffect").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profileEffect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profileEffect").toString())); + } + if ((jsonObj.get("pronouns") != null && !jsonObj.get("pronouns").isJsonNull()) && !jsonObj.get("pronouns").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pronouns` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronouns").toString())); + } + // validate the optional field `representedGroup` + if (jsonObj.get("representedGroup") != null && !jsonObj.get("representedGroup").isJsonNull()) { + ProfileRepresentedGroup.validateJsonElement(jsonObj.get("representedGroup")); + } + if ((jsonObj.get("themeId") != null && !jsonObj.get("themeId").isJsonNull()) && !jsonObj.get("themeId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `themeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("themeId").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("trustTags") != null && !jsonObj.get("trustTags").isJsonNull() && !jsonObj.get("trustTags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `trustTags` to be an array in the JSON string but got `%s`", jsonObj.get("trustTags").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PublicProfile.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PublicProfile' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PublicProfile.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PublicProfile value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PublicProfile read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PublicProfile given an JSON string + * + * @param jsonString JSON string + * @return An instance of PublicProfile + * @throws IOException if the JSON string is invalid with respect to PublicProfile + */ + public static PublicProfile fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PublicProfile.class); + } + + /** + * Convert an instance of PublicProfile to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/PurchaseContextData.java b/src/main/java/io/github/vrchatapi/model/PurchaseContextData.java index 46fac33b..d71daf68 100644 --- a/src/main/java/io/github/vrchatapi/model/PurchaseContextData.java +++ b/src/main/java/io/github/vrchatapi/model/PurchaseContextData.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ProductPurchaseLocationType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,88 +48,79 @@ /** * PurchaseContextData */ -@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 PurchaseContextData { public static final String SERIALIZED_NAME_LOCATION_TYPE = "locationType"; @SerializedName(SERIALIZED_NAME_LOCATION_TYPE) + @javax.annotation.Nonnull private ProductPurchaseLocationType locationType = ProductPurchaseLocationType.WEB_GROUP_STORE; public static final String SERIALIZED_NAME_STORE_ID = "storeId"; @SerializedName(SERIALIZED_NAME_STORE_ID) + @javax.annotation.Nullable private String storeId; public static final String SERIALIZED_NAME_WORLD_ID = "worldId"; @SerializedName(SERIALIZED_NAME_WORLD_ID) + @javax.annotation.Nullable private String worldId; public PurchaseContextData() { } - public PurchaseContextData locationType(ProductPurchaseLocationType locationType) { - + public PurchaseContextData locationType(@javax.annotation.Nonnull ProductPurchaseLocationType locationType) { this.locationType = locationType; return this; } - /** + /** * Get locationType * @return locationType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ProductPurchaseLocationType getLocationType() { return locationType; } - - public void setLocationType(ProductPurchaseLocationType locationType) { + public void setLocationType(@javax.annotation.Nonnull ProductPurchaseLocationType locationType) { this.locationType = locationType; } - public PurchaseContextData storeId(String storeId) { - + public PurchaseContextData storeId(@javax.annotation.Nullable String storeId) { this.storeId = storeId; return this; } - /** + /** * Get storeId * @return storeId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "esto_713b247d-2b5d-41a0-bba3-50db28dc1498", value = "") - public String getStoreId() { return storeId; } - - public void setStoreId(String storeId) { + public void setStoreId(@javax.annotation.Nullable String storeId) { this.storeId = storeId; } - public PurchaseContextData worldId(String worldId) { - + public PurchaseContextData worldId(@javax.annotation.Nullable String worldId) { this.worldId = worldId; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return worldId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getWorldId() { return worldId; } - - public void setWorldId(String worldId) { + public void setWorldId(@javax.annotation.Nullable String worldId) { this.worldId = worldId; } @@ -170,10 +161,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -182,48 +170,47 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("locationType"); - openapiFields.add("storeId"); - openapiFields.add("worldId"); + openapiFields = new HashSet(Arrays.asList("locationType", "storeId", "worldId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("locationType"); + openapiRequiredFields = new HashSet(Arrays.asList("locationType")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PurchaseContextData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PurchaseContextData.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PurchaseContextData is not found in the empty JSON string", PurchaseContextData.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PurchaseContextData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PurchaseContextData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PurchaseContextData is not found in the empty JSON string", PurchaseContextData.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PurchaseContextData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PurchaseContextData` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PurchaseContextData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : PurchaseContextData.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `locationType` + ProductPurchaseLocationType.validateJsonElement(jsonObj.get("locationType")); if ((jsonObj.get("storeId") != null && !jsonObj.get("storeId").isJsonNull()) && !jsonObj.get("storeId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `storeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storeId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `storeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storeId").toString())); } if ((jsonObj.get("worldId") != null && !jsonObj.get("worldId").isJsonNull()) && !jsonObj.get("worldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); } } @@ -247,31 +234,31 @@ public void write(JsonWriter out, PurchaseContextData value) throws IOException @Override public PurchaseContextData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PurchaseContextData given an JSON string - * - * @param jsonString JSON string - * @return An instance of PurchaseContextData - * @throws IOException if the JSON string is invalid with respect to PurchaseContextData - */ + /** + * Create an instance of PurchaseContextData given an JSON string + * + * @param jsonString JSON string + * @return An instance of PurchaseContextData + * @throws IOException if the JSON string is invalid with respect to PurchaseContextData + */ public static PurchaseContextData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PurchaseContextData.class); } - /** - * Convert an instance of PurchaseContextData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PurchaseContextData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/PurchaseProductListingRequest.java b/src/main/java/io/github/vrchatapi/model/PurchaseProductListingRequest.java index 0106382a..ce793444 100644 --- a/src/main/java/io/github/vrchatapi/model/PurchaseProductListingRequest.java +++ b/src/main/java/io/github/vrchatapi/model/PurchaseProductListingRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.PurchaseContextData; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,199 +48,178 @@ /** * PurchaseProductListingRequest */ -@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 PurchaseProductListingRequest { public static final String SERIALIZED_NAME_CONTEXT_DATA = "contextData"; @SerializedName(SERIALIZED_NAME_CONTEXT_DATA) + @javax.annotation.Nullable private PurchaseContextData contextData; public static final String SERIALIZED_NAME_LISTING_ID = "listingId"; @SerializedName(SERIALIZED_NAME_LISTING_ID) + @javax.annotation.Nonnull private String listingId; public static final String SERIALIZED_NAME_LISTING_VARIANT_ID = "listingVariantId"; @SerializedName(SERIALIZED_NAME_LISTING_VARIANT_ID) + @javax.annotation.Nullable private String listingVariantId; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @SerializedName(SERIALIZED_NAME_QUANTITY) + @javax.annotation.Nonnull private Integer quantity = 1; public static final String SERIALIZED_NAME_RECEIVER_ID = "receiverId"; @SerializedName(SERIALIZED_NAME_RECEIVER_ID) + @javax.annotation.Nullable private String receiverId; public static final String SERIALIZED_NAME_STACKABLE = "stackable"; @SerializedName(SERIALIZED_NAME_STACKABLE) + @javax.annotation.Nullable private Boolean stackable; public static final String SERIALIZED_NAME_TOTAL_PRICE = "totalPrice"; @SerializedName(SERIALIZED_NAME_TOTAL_PRICE) + @javax.annotation.Nonnull private Integer totalPrice; public PurchaseProductListingRequest() { } - public PurchaseProductListingRequest contextData(PurchaseContextData contextData) { - + public PurchaseProductListingRequest contextData(@javax.annotation.Nullable PurchaseContextData contextData) { this.contextData = contextData; return this; } - /** + /** * Get contextData * @return contextData - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PurchaseContextData getContextData() { return contextData; } - - public void setContextData(PurchaseContextData contextData) { + public void setContextData(@javax.annotation.Nullable PurchaseContextData contextData) { this.contextData = contextData; } - public PurchaseProductListingRequest listingId(String listingId) { - + public PurchaseProductListingRequest listingId(@javax.annotation.Nonnull String listingId) { this.listingId = listingId; return this; } - /** + /** * Get listingId * @return listingId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "prod_bfbc2315-247a-44d7-bfea-5237f8d56cb4", required = true, value = "") - public String getListingId() { return listingId; } - - public void setListingId(String listingId) { + public void setListingId(@javax.annotation.Nonnull String listingId) { this.listingId = listingId; } - public PurchaseProductListingRequest listingVariantId(String listingVariantId) { - + public PurchaseProductListingRequest listingVariantId(@javax.annotation.Nullable String listingVariantId) { this.listingVariantId = listingVariantId; return this; } - /** + /** * Get listingVariantId * @return listingVariantId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "listvar_e8658b56-1662-436c-935a-afcf6a7d4fed", value = "") - public String getListingVariantId() { return listingVariantId; } - - public void setListingVariantId(String listingVariantId) { + public void setListingVariantId(@javax.annotation.Nullable String listingVariantId) { this.listingVariantId = listingVariantId; } - public PurchaseProductListingRequest quantity(Integer quantity) { - + public PurchaseProductListingRequest quantity(@javax.annotation.Nonnull Integer quantity) { this.quantity = quantity; return this; } - /** + /** * Get quantity * minimum: 1 * maximum: 99 * @return quantity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getQuantity() { return quantity; } - - public void setQuantity(Integer quantity) { + public void setQuantity(@javax.annotation.Nonnull Integer quantity) { this.quantity = quantity; } - public PurchaseProductListingRequest receiverId(String receiverId) { - + public PurchaseProductListingRequest receiverId(@javax.annotation.Nullable String receiverId) { this.receiverId = receiverId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return receiverId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getReceiverId() { return receiverId; } - - public void setReceiverId(String receiverId) { + public void setReceiverId(@javax.annotation.Nullable String receiverId) { this.receiverId = receiverId; } - public PurchaseProductListingRequest stackable(Boolean stackable) { - + public PurchaseProductListingRequest stackable(@javax.annotation.Nullable Boolean stackable) { this.stackable = stackable; return this; } - /** + /** * Get stackable * @return stackable - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getStackable() { return stackable; } - - public void setStackable(Boolean stackable) { + public void setStackable(@javax.annotation.Nullable Boolean stackable) { this.stackable = stackable; } - public PurchaseProductListingRequest totalPrice(Integer totalPrice) { - + public PurchaseProductListingRequest totalPrice(@javax.annotation.Nonnull Integer totalPrice) { this.totalPrice = totalPrice; return this; } - /** + /** * Get totalPrice * minimum: 0 * @return totalPrice - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTotalPrice() { return totalPrice; } - - public void setTotalPrice(Integer totalPrice) { + public void setTotalPrice(@javax.annotation.Nonnull Integer totalPrice) { this.totalPrice = totalPrice; } @@ -289,10 +268,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -301,61 +277,52 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("contextData"); - openapiFields.add("listingId"); - openapiFields.add("listingVariantId"); - openapiFields.add("quantity"); - openapiFields.add("receiverId"); - openapiFields.add("stackable"); - openapiFields.add("totalPrice"); + openapiFields = new HashSet(Arrays.asList("contextData", "listingId", "listingVariantId", "quantity", "receiverId", "stackable", "totalPrice")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("listingId"); - openapiRequiredFields.add("quantity"); - openapiRequiredFields.add("totalPrice"); + openapiRequiredFields = new HashSet(Arrays.asList("listingId", "quantity", "totalPrice")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PurchaseProductListingRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PurchaseProductListingRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PurchaseProductListingRequest is not found in the empty JSON string", PurchaseProductListingRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PurchaseProductListingRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PurchaseProductListingRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in PurchaseProductListingRequest is not found in the empty JSON string", PurchaseProductListingRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!PurchaseProductListingRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PurchaseProductListingRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `PurchaseProductListingRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : PurchaseProductListingRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `contextData` if (jsonObj.get("contextData") != null && !jsonObj.get("contextData").isJsonNull()) { - PurchaseContextData.validateJsonObject(jsonObj.getAsJsonObject("contextData")); + PurchaseContextData.validateJsonElement(jsonObj.get("contextData")); } if (!jsonObj.get("listingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingId").toString())); } if ((jsonObj.get("listingVariantId") != null && !jsonObj.get("listingVariantId").isJsonNull()) && !jsonObj.get("listingVariantId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `listingVariantId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingVariantId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingVariantId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingVariantId").toString())); } if ((jsonObj.get("receiverId") != null && !jsonObj.get("receiverId").isJsonNull()) && !jsonObj.get("receiverId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `receiverId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `receiverId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverId").toString())); } } @@ -379,31 +346,31 @@ public void write(JsonWriter out, PurchaseProductListingRequest value) throws IO @Override public PurchaseProductListingRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of PurchaseProductListingRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of PurchaseProductListingRequest - * @throws IOException if the JSON string is invalid with respect to PurchaseProductListingRequest - */ + /** + * Create an instance of PurchaseProductListingRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PurchaseProductListingRequest + * @throws IOException if the JSON string is invalid with respect to PurchaseProductListingRequest + */ public static PurchaseProductListingRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, PurchaseProductListingRequest.class); } - /** - * Convert an instance of PurchaseProductListingRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of PurchaseProductListingRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Region.java b/src/main/java/io/github/vrchatapi/model/Region.java index a74d77e1..8890e18c 100644 --- a/src/main/java/io/github/vrchatapi/model/Region.java +++ b/src/main/java/io/github/vrchatapi/model/Region.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -79,5 +78,10 @@ public Region read(final JsonReader jsonReader) throws IOException { return Region.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Region.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/RegisterUserAccount200Response.java b/src/main/java/io/github/vrchatapi/model/RegisterUserAccount200Response.java new file mode 100644 index 00000000..d1d3df2a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RegisterUserAccount200Response.java @@ -0,0 +1,292 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.github.vrchatapi.model.AccountDeletionLog; +import io.github.vrchatapi.model.AgeVerificationStatus; +import io.github.vrchatapi.model.Badge; +import io.github.vrchatapi.model.CurrentUser; +import io.github.vrchatapi.model.CurrentUserPlatformHistoryInner; +import io.github.vrchatapi.model.CurrentUserPresence; +import io.github.vrchatapi.model.DeveloperType; +import io.github.vrchatapi.model.DiscordDetails; +import io.github.vrchatapi.model.PastDisplayName; +import io.github.vrchatapi.model.RequiresTwoFactorAuth; +import io.github.vrchatapi.model.TwoFactorAuthType; +import io.github.vrchatapi.model.UserState; +import io.github.vrchatapi.model.UserStatus; +import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import io.github.vrchatapi.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class RegisterUserAccount200Response extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(RegisterUserAccount200Response.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RegisterUserAccount200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RegisterUserAccount200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterCurrentUser = gson.getDelegateAdapter(this, TypeToken.get(CurrentUser.class)); + final TypeAdapter adapterRequiresTwoFactorAuth = gson.getDelegateAdapter(this, TypeToken.get(RequiresTwoFactorAuth.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RegisterUserAccount200Response value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `CurrentUser` + if (value.getActualInstance() instanceof CurrentUser) { + JsonElement element = adapterCurrentUser.toJsonTree((CurrentUser)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `RequiresTwoFactorAuth` + if (value.getActualInstance() instanceof RequiresTwoFactorAuth) { + JsonElement element = adapterRequiresTwoFactorAuth.toJsonTree((RequiresTwoFactorAuth)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CurrentUser, RequiresTwoFactorAuth"); + } + + @Override + public RegisterUserAccount200Response read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize CurrentUser + try { + // validate the JSON object to see if any exception is thrown + CurrentUser.validateJsonElement(jsonElement); + actualAdapter = adapterCurrentUser; + match++; + log.log(Level.FINER, "Input data matches schema 'CurrentUser'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for CurrentUser failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CurrentUser'", e); + } + // deserialize RequiresTwoFactorAuth + try { + // validate the JSON object to see if any exception is thrown + RequiresTwoFactorAuth.validateJsonElement(jsonElement); + actualAdapter = adapterRequiresTwoFactorAuth; + match++; + log.log(Level.FINER, "Input data matches schema 'RequiresTwoFactorAuth'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for RequiresTwoFactorAuth failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'RequiresTwoFactorAuth'", e); + } + + if (match == 1) { + RegisterUserAccount200Response ret = new RegisterUserAccount200Response(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format(java.util.Locale.ROOT, "Failed deserialization for RegisterUserAccount200Response: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public RegisterUserAccount200Response() { + super("oneOf", Boolean.FALSE); + } + + public RegisterUserAccount200Response(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CurrentUser", CurrentUser.class); + schemas.put("RequiresTwoFactorAuth", RequiresTwoFactorAuth.class); + } + + @Override + public Map> getSchemas() { + return RegisterUserAccount200Response.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CurrentUser, RequiresTwoFactorAuth + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof CurrentUser) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof RequiresTwoFactorAuth) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CurrentUser, RequiresTwoFactorAuth"); + } + + /** + * Get the actual instance, which can be the following: + * CurrentUser, RequiresTwoFactorAuth + * + * @return The actual instance (CurrentUser, RequiresTwoFactorAuth) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CurrentUser`. If the actual instance is not `CurrentUser`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CurrentUser` + * @throws ClassCastException if the instance is not `CurrentUser` + */ + @SuppressWarnings("unchecked") + public CurrentUser getCurrentUser() throws ClassCastException { + return (CurrentUser)super.getActualInstance(); + } + + /** + * Get the actual instance of `RequiresTwoFactorAuth`. If the actual instance is not `RequiresTwoFactorAuth`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RequiresTwoFactorAuth` + * @throws ClassCastException if the instance is not `RequiresTwoFactorAuth` + */ + @SuppressWarnings("unchecked") + public RequiresTwoFactorAuth getRequiresTwoFactorAuth() throws ClassCastException { + return (RequiresTwoFactorAuth)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RegisterUserAccount200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with CurrentUser + try { + CurrentUser.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for CurrentUser failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with RequiresTwoFactorAuth + try { + RequiresTwoFactorAuth.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for RequiresTwoFactorAuth failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format(java.util.Locale.ROOT, "The JSON string is invalid for RegisterUserAccount200Response with oneOf schemas: CurrentUser, RequiresTwoFactorAuth. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of RegisterUserAccount200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of RegisterUserAccount200Response + * @throws IOException if the JSON string is invalid with respect to RegisterUserAccount200Response + */ + public static RegisterUserAccount200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RegisterUserAccount200Response.class); + } + + /** + * Convert an instance of RegisterUserAccount200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/RegisterUserAccountRequest.java b/src/main/java/io/github/vrchatapi/model/RegisterUserAccountRequest.java index 79e8a837..271e882a 100644 --- a/src/main/java/io/github/vrchatapi/model/RegisterUserAccountRequest.java +++ b/src/main/java/io/github/vrchatapi/model/RegisterUserAccountRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,250 +47,223 @@ /** * RegisterUserAccountRequest */ -@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 RegisterUserAccountRequest { public static final String SERIALIZED_NAME_ACCEPTED_T_O_S_VERSION = "acceptedTOSVersion"; @SerializedName(SERIALIZED_NAME_ACCEPTED_T_O_S_VERSION) + @javax.annotation.Nonnull private Integer acceptedTOSVersion; public static final String SERIALIZED_NAME_CAPTCHA_CODE = "captchaCode"; @SerializedName(SERIALIZED_NAME_CAPTCHA_CODE) + @javax.annotation.Nonnull private String captchaCode; public static final String SERIALIZED_NAME_DAY = "day"; @SerializedName(SERIALIZED_NAME_DAY) + @javax.annotation.Nonnull private String day; public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nonnull private String email; public static final String SERIALIZED_NAME_MONTH = "month"; @SerializedName(SERIALIZED_NAME_MONTH) + @javax.annotation.Nonnull private String month; public static final String SERIALIZED_NAME_PASSWORD = "password"; @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nonnull private String password; public static final String SERIALIZED_NAME_SUBSCRIBE = "subscribe"; @SerializedName(SERIALIZED_NAME_SUBSCRIBE) + @javax.annotation.Nonnull private Boolean subscribe; public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nonnull private String username; public static final String SERIALIZED_NAME_YEAR = "year"; @SerializedName(SERIALIZED_NAME_YEAR) + @javax.annotation.Nonnull private String year; public RegisterUserAccountRequest() { } - public RegisterUserAccountRequest acceptedTOSVersion(Integer acceptedTOSVersion) { - + public RegisterUserAccountRequest acceptedTOSVersion(@javax.annotation.Nonnull Integer acceptedTOSVersion) { this.acceptedTOSVersion = acceptedTOSVersion; return this; } - /** + /** * The most recent version of the TOS * @return acceptedTOSVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The most recent version of the TOS") - public Integer getAcceptedTOSVersion() { return acceptedTOSVersion; } - - public void setAcceptedTOSVersion(Integer acceptedTOSVersion) { + public void setAcceptedTOSVersion(@javax.annotation.Nonnull Integer acceptedTOSVersion) { this.acceptedTOSVersion = acceptedTOSVersion; } - public RegisterUserAccountRequest captchaCode(String captchaCode) { - + public RegisterUserAccountRequest captchaCode(@javax.annotation.Nonnull String captchaCode) { this.captchaCode = captchaCode; return this; } - /** + /** * Captcha code * @return captchaCode - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Captcha code") - public String getCaptchaCode() { return captchaCode; } - - public void setCaptchaCode(String captchaCode) { + public void setCaptchaCode(@javax.annotation.Nonnull String captchaCode) { this.captchaCode = captchaCode; } - public RegisterUserAccountRequest day(String day) { - + public RegisterUserAccountRequest day(@javax.annotation.Nonnull String day) { this.day = day; return this; } - /** + /** * Birth day of month * @return day - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Birth day of month") - public String getDay() { return day; } - - public void setDay(String day) { + public void setDay(@javax.annotation.Nonnull String day) { this.day = day; } - public RegisterUserAccountRequest email(String email) { - + public RegisterUserAccountRequest email(@javax.annotation.Nonnull String email) { this.email = email; return this; } - /** + /** * Email address * @return email - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Email address") - public String getEmail() { return email; } - - public void setEmail(String email) { + public void setEmail(@javax.annotation.Nonnull String email) { this.email = email; } - public RegisterUserAccountRequest month(String month) { - + public RegisterUserAccountRequest month(@javax.annotation.Nonnull String month) { this.month = month; return this; } - /** + /** * Birth month of year * @return month - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Birth month of year") - public String getMonth() { return month; } - - public void setMonth(String month) { + public void setMonth(@javax.annotation.Nonnull String month) { this.month = month; } - public RegisterUserAccountRequest password(String password) { - + public RegisterUserAccountRequest password(@javax.annotation.Nonnull String password) { this.password = password; return this; } - /** + /** * Password * @return password - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Password") - public String getPassword() { return password; } - - public void setPassword(String password) { + public void setPassword(@javax.annotation.Nonnull String password) { this.password = password; } - public RegisterUserAccountRequest subscribe(Boolean subscribe) { - + public RegisterUserAccountRequest subscribe(@javax.annotation.Nonnull Boolean subscribe) { this.subscribe = subscribe; return this; } - /** - * Whether to recieve promotional emails + /** + * Whether to receive promotional emails * @return subscribe - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Whether to recieve promotional emails") - public Boolean getSubscribe() { return subscribe; } - - public void setSubscribe(Boolean subscribe) { + public void setSubscribe(@javax.annotation.Nonnull Boolean subscribe) { this.subscribe = subscribe; } - public RegisterUserAccountRequest username(String username) { - + public RegisterUserAccountRequest username(@javax.annotation.Nonnull String username) { this.username = username; return this; } - /** + /** * Display Name / Username (Username is a sanitized version) * @return username - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Display Name / Username (Username is a sanitized version)") - public String getUsername() { return username; } - - public void setUsername(String username) { + public void setUsername(@javax.annotation.Nonnull String username) { this.username = username; } - public RegisterUserAccountRequest year(String year) { - + public RegisterUserAccountRequest year(@javax.annotation.Nonnull String year) { this.year = year; return this; } - /** + /** * Birth year * @return year - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Birth year") - public String getYear() { return year; } - - public void setYear(String year) { + public void setYear(@javax.annotation.Nonnull String year) { this.year = year; } @@ -343,10 +316,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -355,77 +325,60 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("acceptedTOSVersion"); - openapiFields.add("captchaCode"); - openapiFields.add("day"); - openapiFields.add("email"); - openapiFields.add("month"); - openapiFields.add("password"); - openapiFields.add("subscribe"); - openapiFields.add("username"); - openapiFields.add("year"); + openapiFields = new HashSet(Arrays.asList("acceptedTOSVersion", "captchaCode", "day", "email", "month", "password", "subscribe", "username", "year")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("acceptedTOSVersion"); - openapiRequiredFields.add("captchaCode"); - openapiRequiredFields.add("day"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("month"); - openapiRequiredFields.add("password"); - openapiRequiredFields.add("subscribe"); - openapiRequiredFields.add("username"); - openapiRequiredFields.add("year"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RegisterUserAccountRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RegisterUserAccountRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RegisterUserAccountRequest is not found in the empty JSON string", RegisterUserAccountRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("acceptedTOSVersion", "captchaCode", "day", "email", "month", "password", "subscribe", "username", "year")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RegisterUserAccountRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RegisterUserAccountRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RegisterUserAccountRequest is not found in the empty JSON string", RegisterUserAccountRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RegisterUserAccountRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RegisterUserAccountRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RegisterUserAccountRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RegisterUserAccountRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("captchaCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `captchaCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("captchaCode").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `captchaCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("captchaCode").toString())); } if (!jsonObj.get("day").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `day` to be a primitive type in the JSON string but got `%s`", jsonObj.get("day").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `day` to be a primitive type in the JSON string but got `%s`", jsonObj.get("day").toString())); } if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } if (!jsonObj.get("month").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `month` to be a primitive type in the JSON string but got `%s`", jsonObj.get("month").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `month` to be a primitive type in the JSON string but got `%s`", jsonObj.get("month").toString())); } if (!jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if (!jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if (!jsonObj.get("year").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `year` to be a primitive type in the JSON string but got `%s`", jsonObj.get("year").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `year` to be a primitive type in the JSON string but got `%s`", jsonObj.get("year").toString())); } } @@ -449,31 +402,31 @@ public void write(JsonWriter out, RegisterUserAccountRequest value) throws IOExc @Override public RegisterUserAccountRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RegisterUserAccountRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RegisterUserAccountRequest - * @throws IOException if the JSON string is invalid with respect to RegisterUserAccountRequest - */ + /** + * Create an instance of RegisterUserAccountRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RegisterUserAccountRequest + * @throws IOException if the JSON string is invalid with respect to RegisterUserAccountRequest + */ public static RegisterUserAccountRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RegisterUserAccountRequest.class); } - /** - * Convert an instance of RegisterUserAccountRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RegisterUserAccountRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ReleaseStatus.java b/src/main/java/io/github/vrchatapi/model/ReleaseStatus.java index bbe32982..056b8417 100644 --- a/src/main/java/io/github/vrchatapi/model/ReleaseStatus.java +++ b/src/main/java/io/github/vrchatapi/model/ReleaseStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -72,5 +72,10 @@ public ReleaseStatus read(final JsonReader jsonReader) throws IOException { return ReleaseStatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ReleaseStatus.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/ReportCategory.java b/src/main/java/io/github/vrchatapi/model/ReportCategory.java index c0790e41..5d08fa63 100644 --- a/src/main/java/io/github/vrchatapi/model/ReportCategory.java +++ b/src/main/java/io/github/vrchatapi/model/ReportCategory.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,116 +47,103 @@ /** * A category used for reporting content */ -@ApiModel(description = "A category used for reporting content") -@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 ReportCategory { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) + @javax.annotation.Nonnull private String text; public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nullable private String title; public static final String SERIALIZED_NAME_TOOLTIP = "tooltip"; @SerializedName(SERIALIZED_NAME_TOOLTIP) + @javax.annotation.Nonnull private String tooltip; public ReportCategory() { } - public ReportCategory description(String description) { - + public ReportCategory description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * The description of the report category * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The description of the report category") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public ReportCategory text(String text) { - + public ReportCategory text(@javax.annotation.Nonnull String text) { this.text = text; return this; } - /** + /** * The label of the report category * @return text - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The label of the report category") - public String getText() { return text; } - - public void setText(String text) { + public void setText(@javax.annotation.Nonnull String text) { this.text = text; } - public ReportCategory title(String title) { - + public ReportCategory title(@javax.annotation.Nullable String title) { this.title = title; return this; } - /** + /** * The title of the report category * @return title - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The title of the report category") - public String getTitle() { return title; } - - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public ReportCategory tooltip(String tooltip) { - + public ReportCategory tooltip(@javax.annotation.Nonnull String tooltip) { this.tooltip = tooltip; return this; } - /** + /** * The tooltip that describes the category * @return tooltip - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The tooltip that describes the category") - public String getTooltip() { return tooltip; } - - public void setTooltip(String tooltip) { + public void setTooltip(@javax.annotation.Nonnull String tooltip) { this.tooltip = tooltip; } @@ -199,10 +186,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -211,56 +195,51 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("text"); - openapiFields.add("title"); - openapiFields.add("tooltip"); + openapiFields = new HashSet(Arrays.asList("description", "text", "title", "tooltip")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("tooltip"); + openapiRequiredFields = new HashSet(Arrays.asList("text", "tooltip")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReportCategory - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReportCategory.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReportCategory is not found in the empty JSON string", ReportCategory.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReportCategory + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReportCategory.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ReportCategory is not found in the empty JSON string", ReportCategory.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ReportCategory.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReportCategory` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ReportCategory` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ReportCategory.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } if (!jsonObj.get("tooltip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tooltip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tooltip").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tooltip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tooltip").toString())); } } @@ -284,31 +263,31 @@ public void write(JsonWriter out, ReportCategory value) throws IOException { @Override public ReportCategory read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ReportCategory given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReportCategory - * @throws IOException if the JSON string is invalid with respect to ReportCategory - */ + /** + * Create an instance of ReportCategory given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReportCategory + * @throws IOException if the JSON string is invalid with respect to ReportCategory + */ public static ReportCategory fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ReportCategory.class); } - /** - * Convert an instance of ReportCategory to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ReportCategory to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ReportReason.java b/src/main/java/io/github/vrchatapi/model/ReportReason.java index 128f55cf..2525c01b 100644 --- a/src/main/java/io/github/vrchatapi/model/ReportReason.java +++ b/src/main/java/io/github/vrchatapi/model/ReportReason.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,55 @@ /** * A reason used for reporting users */ -@ApiModel(description = "A reason used for reporting users") -@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 ReportReason { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) + @javax.annotation.Nonnull private String text; public static final String SERIALIZED_NAME_TOOLTIP = "tooltip"; @SerializedName(SERIALIZED_NAME_TOOLTIP) + @javax.annotation.Nonnull private String tooltip; public ReportReason() { } - public ReportReason text(String text) { - + public ReportReason text(@javax.annotation.Nonnull String text) { this.text = text; return this; } - /** + /** * The label or name of the report reason * @return text - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The label or name of the report reason") - public String getText() { return text; } - - public void setText(String text) { + public void setText(@javax.annotation.Nonnull String text) { this.text = text; } - public ReportReason tooltip(String tooltip) { - + public ReportReason tooltip(@javax.annotation.Nonnull String tooltip) { this.tooltip = tooltip; return this; } - /** + /** * A brief explanation of what this reason entails * @return tooltip - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "A brief explanation of what this reason entails") - public String getTooltip() { return tooltip; } - - public void setTooltip(String tooltip) { + public void setTooltip(@javax.annotation.Nonnull String tooltip) { this.tooltip = tooltip; } @@ -141,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,48 +143,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); - openapiFields.add("tooltip"); + openapiFields = new HashSet(Arrays.asList("text", "tooltip")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("tooltip"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReportReason - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReportReason.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReportReason is not found in the empty JSON string", ReportReason.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("text", "tooltip")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReportReason + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReportReason.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ReportReason is not found in the empty JSON string", ReportReason.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ReportReason.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReportReason` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ReportReason` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ReportReason.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("tooltip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tooltip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tooltip").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tooltip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tooltip").toString())); } } @@ -218,31 +205,31 @@ public void write(JsonWriter out, ReportReason value) throws IOException { @Override public ReportReason read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ReportReason given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReportReason - * @throws IOException if the JSON string is invalid with respect to ReportReason - */ + /** + * Create an instance of ReportReason given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReportReason + * @throws IOException if the JSON string is invalid with respect to ReportReason + */ public static ReportReason fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ReportReason.class); } - /** - * Convert an instance of ReportReason to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ReportReason to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/RepresentedGroup.java b/src/main/java/io/github/vrchatapi/model/RepresentedGroup.java index 44bd9bbf..1e63ad94 100644 --- a/src/main/java/io/github/vrchatapi/model/RepresentedGroup.java +++ b/src/main/java/io/github/vrchatapi/model/RepresentedGroup.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,9 +20,8 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupPrivacy; import io.github.vrchatapi.model.GroupUserVisibility; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,385 +50,343 @@ /** * RepresentedGroup */ -@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 RepresentedGroup { public static final String SERIALIZED_NAME_BANNER_ID = "bannerId"; @SerializedName(SERIALIZED_NAME_BANNER_ID) + @javax.annotation.Nullable private String bannerId; public static final String SERIALIZED_NAME_BANNER_URL = "bannerUrl"; @SerializedName(SERIALIZED_NAME_BANNER_URL) + @javax.annotation.Nullable private String bannerUrl; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_DISCRIMINATOR = "discriminator"; @SerializedName(SERIALIZED_NAME_DISCRIMINATOR) + @javax.annotation.Nullable private String discriminator; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nullable private String groupId; public static final String SERIALIZED_NAME_ICON_ID = "iconId"; @SerializedName(SERIALIZED_NAME_ICON_ID) + @javax.annotation.Nullable private String iconId; public static final String SERIALIZED_NAME_ICON_URL = "iconUrl"; @SerializedName(SERIALIZED_NAME_ICON_URL) + @javax.annotation.Nullable private String iconUrl; public static final String SERIALIZED_NAME_IS_REPRESENTING = "isRepresenting"; @SerializedName(SERIALIZED_NAME_IS_REPRESENTING) + @javax.annotation.Nullable private Boolean isRepresenting; public static final String SERIALIZED_NAME_MEMBER_COUNT = "memberCount"; @SerializedName(SERIALIZED_NAME_MEMBER_COUNT) + @javax.annotation.Nullable private Integer memberCount; public static final String SERIALIZED_NAME_MEMBER_VISIBILITY = "memberVisibility"; @SerializedName(SERIALIZED_NAME_MEMBER_VISIBILITY) + @javax.annotation.Nullable private GroupUserVisibility memberVisibility; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) + @javax.annotation.Nullable private String ownerId; public static final String SERIALIZED_NAME_PRIVACY = "privacy"; @SerializedName(SERIALIZED_NAME_PRIVACY) + @javax.annotation.Nullable private GroupPrivacy privacy = GroupPrivacy.DEFAULT; public static final String SERIALIZED_NAME_SHORT_CODE = "shortCode"; @SerializedName(SERIALIZED_NAME_SHORT_CODE) + @javax.annotation.Nullable private String shortCode; public RepresentedGroup() { } - public RepresentedGroup bannerId(String bannerId) { - + public RepresentedGroup bannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; return this; } - /** + /** * Get bannerId * @return bannerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBannerId() { return bannerId; } - - public void setBannerId(String bannerId) { + public void setBannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; } - public RepresentedGroup bannerUrl(String bannerUrl) { - + public RepresentedGroup bannerUrl(@javax.annotation.Nullable String bannerUrl) { this.bannerUrl = bannerUrl; return this; } - /** + /** * Get bannerUrl * @return bannerUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBannerUrl() { return bannerUrl; } - - public void setBannerUrl(String bannerUrl) { + public void setBannerUrl(@javax.annotation.Nullable String bannerUrl) { this.bannerUrl = bannerUrl; } - public RepresentedGroup description(String description) { - + public RepresentedGroup description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public RepresentedGroup discriminator(String discriminator) { - + public RepresentedGroup discriminator(@javax.annotation.Nullable String discriminator) { this.discriminator = discriminator; return this; } - /** + /** * Get discriminator * @return discriminator - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "0000", value = "") - public String getDiscriminator() { return discriminator; } - - public void setDiscriminator(String discriminator) { + public void setDiscriminator(@javax.annotation.Nullable String discriminator) { this.discriminator = discriminator; } - public RepresentedGroup groupId(String groupId) { - + public RepresentedGroup groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } - public RepresentedGroup iconId(String iconId) { - + public RepresentedGroup iconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; return this; } - /** + /** * Get iconId * @return iconId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIconId() { return iconId; } - - public void setIconId(String iconId) { + public void setIconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; } - public RepresentedGroup iconUrl(String iconUrl) { - + public RepresentedGroup iconUrl(@javax.annotation.Nullable String iconUrl) { this.iconUrl = iconUrl; return this; } - /** + /** * Get iconUrl * @return iconUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIconUrl() { return iconUrl; } - - public void setIconUrl(String iconUrl) { + public void setIconUrl(@javax.annotation.Nullable String iconUrl) { this.iconUrl = iconUrl; } - public RepresentedGroup isRepresenting(Boolean isRepresenting) { - + public RepresentedGroup isRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { this.isRepresenting = isRepresenting; return this; } - /** + /** * Get isRepresenting * @return isRepresenting - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsRepresenting() { return isRepresenting; } - - public void setIsRepresenting(Boolean isRepresenting) { + public void setIsRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { this.isRepresenting = isRepresenting; } - public RepresentedGroup memberCount(Integer memberCount) { - + public RepresentedGroup memberCount(@javax.annotation.Nullable Integer memberCount) { this.memberCount = memberCount; return this; } - /** + /** * Get memberCount * @return memberCount - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getMemberCount() { return memberCount; } - - public void setMemberCount(Integer memberCount) { + public void setMemberCount(@javax.annotation.Nullable Integer memberCount) { this.memberCount = memberCount; } - public RepresentedGroup memberVisibility(GroupUserVisibility memberVisibility) { - + public RepresentedGroup memberVisibility(@javax.annotation.Nullable GroupUserVisibility memberVisibility) { this.memberVisibility = memberVisibility; return this; } - /** + /** * Get memberVisibility * @return memberVisibility - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupUserVisibility getMemberVisibility() { return memberVisibility; } - - public void setMemberVisibility(GroupUserVisibility memberVisibility) { + public void setMemberVisibility(@javax.annotation.Nullable GroupUserVisibility memberVisibility) { this.memberVisibility = memberVisibility; } - public RepresentedGroup name(String name) { - + public RepresentedGroup name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public RepresentedGroup ownerId(String ownerId) { - + public RepresentedGroup ownerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return ownerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getOwnerId() { return ownerId; } - - public void setOwnerId(String ownerId) { + public void setOwnerId(@javax.annotation.Nullable String ownerId) { this.ownerId = ownerId; } - public RepresentedGroup privacy(GroupPrivacy privacy) { - + public RepresentedGroup privacy(@javax.annotation.Nullable GroupPrivacy privacy) { this.privacy = privacy; return this; } - /** + /** * Get privacy * @return privacy - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupPrivacy getPrivacy() { return privacy; } - - public void setPrivacy(GroupPrivacy privacy) { + public void setPrivacy(@javax.annotation.Nullable GroupPrivacy privacy) { this.privacy = privacy; } - public RepresentedGroup shortCode(String shortCode) { - + public RepresentedGroup shortCode(@javax.annotation.Nullable String shortCode) { this.shortCode = shortCode; return this; } - /** + /** * Get shortCode * @return shortCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "VRCHAT", value = "") - public String getShortCode() { return shortCode; } - - public void setShortCode(String shortCode) { + public void setShortCode(@javax.annotation.Nullable String shortCode) { this.shortCode = shortCode; } @@ -502,10 +460,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -514,75 +469,70 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bannerId"); - openapiFields.add("bannerUrl"); - openapiFields.add("description"); - openapiFields.add("discriminator"); - openapiFields.add("groupId"); - openapiFields.add("iconId"); - openapiFields.add("iconUrl"); - openapiFields.add("isRepresenting"); - openapiFields.add("memberCount"); - openapiFields.add("memberVisibility"); - openapiFields.add("name"); - openapiFields.add("ownerId"); - openapiFields.add("privacy"); - openapiFields.add("shortCode"); + openapiFields = new HashSet(Arrays.asList("bannerId", "bannerUrl", "description", "discriminator", "groupId", "iconId", "iconUrl", "isRepresenting", "memberCount", "memberVisibility", "name", "ownerId", "privacy", "shortCode")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RepresentedGroup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RepresentedGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RepresentedGroup is not found in the empty JSON string", RepresentedGroup.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RepresentedGroup + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RepresentedGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RepresentedGroup is not found in the empty JSON string", RepresentedGroup.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RepresentedGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RepresentedGroup` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RepresentedGroup` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("bannerId") != null && !jsonObj.get("bannerId").isJsonNull()) && !jsonObj.get("bannerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); } if ((jsonObj.get("bannerUrl") != null && !jsonObj.get("bannerUrl").isJsonNull()) && !jsonObj.get("bannerUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bannerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerUrl").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("discriminator") != null && !jsonObj.get("discriminator").isJsonNull()) && !jsonObj.get("discriminator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `discriminator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discriminator").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `discriminator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discriminator").toString())); } if ((jsonObj.get("groupId") != null && !jsonObj.get("groupId").isJsonNull()) && !jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if ((jsonObj.get("iconId") != null && !jsonObj.get("iconId").isJsonNull()) && !jsonObj.get("iconId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); } if ((jsonObj.get("iconUrl") != null && !jsonObj.get("iconUrl").isJsonNull()) && !jsonObj.get("iconUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); + } + // validate the optional field `memberVisibility` + if (jsonObj.get("memberVisibility") != null && !jsonObj.get("memberVisibility").isJsonNull()) { + GroupUserVisibility.validateJsonElement(jsonObj.get("memberVisibility")); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); + } + // validate the optional field `privacy` + if (jsonObj.get("privacy") != null && !jsonObj.get("privacy").isJsonNull()) { + GroupPrivacy.validateJsonElement(jsonObj.get("privacy")); } if ((jsonObj.get("shortCode") != null && !jsonObj.get("shortCode").isJsonNull()) && !jsonObj.get("shortCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); } } @@ -606,31 +556,31 @@ public void write(JsonWriter out, RepresentedGroup value) throws IOException { @Override public RepresentedGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RepresentedGroup given an JSON string - * - * @param jsonString JSON string - * @return An instance of RepresentedGroup - * @throws IOException if the JSON string is invalid with respect to RepresentedGroup - */ + /** + * Create an instance of RepresentedGroup given an JSON string + * + * @param jsonString JSON string + * @return An instance of RepresentedGroup + * @throws IOException if the JSON string is invalid with respect to RepresentedGroup + */ public static RepresentedGroup fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RepresentedGroup.class); } - /** - * Convert an instance of RepresentedGroup to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RepresentedGroup to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/RequestInviteRequest.java b/src/main/java/io/github/vrchatapi/model/RequestInviteRequest.java index e342dc23..ca2d65f0 100644 --- a/src/main/java/io/github/vrchatapi/model/RequestInviteRequest.java +++ b/src/main/java/io/github/vrchatapi/model/RequestInviteRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,36 +47,33 @@ /** * RequestInviteRequest */ -@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 RequestInviteRequest { public static final String SERIALIZED_NAME_REQUEST_SLOT = "requestSlot"; @SerializedName(SERIALIZED_NAME_REQUEST_SLOT) + @javax.annotation.Nullable private Integer requestSlot; public RequestInviteRequest() { } - public RequestInviteRequest requestSlot(Integer requestSlot) { - + public RequestInviteRequest requestSlot(@javax.annotation.Nullable Integer requestSlot) { this.requestSlot = requestSlot; return this; } - /** + /** * Get requestSlot * minimum: 0 * maximum: 11 * @return requestSlot - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getRequestSlot() { return requestSlot; } - - public void setRequestSlot(Integer requestSlot) { + public void setRequestSlot(@javax.annotation.Nullable Integer requestSlot) { this.requestSlot = requestSlot; } @@ -113,10 +110,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -125,33 +119,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("requestSlot"); + openapiFields = new HashSet(Arrays.asList("requestSlot")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RequestInviteRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RequestInviteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RequestInviteRequest is not found in the empty JSON string", RequestInviteRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RequestInviteRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RequestInviteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RequestInviteRequest is not found in the empty JSON string", RequestInviteRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RequestInviteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RequestInviteRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RequestInviteRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -174,31 +168,31 @@ public void write(JsonWriter out, RequestInviteRequest value) throws IOException @Override public RequestInviteRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RequestInviteRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RequestInviteRequest - * @throws IOException if the JSON string is invalid with respect to RequestInviteRequest - */ + /** + * Create an instance of RequestInviteRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RequestInviteRequest + * @throws IOException if the JSON string is invalid with respect to RequestInviteRequest + */ public static RequestInviteRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RequestInviteRequest.class); } - /** - * Convert an instance of RequestInviteRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RequestInviteRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/RequestInviteWithPhotoRequest.java b/src/main/java/io/github/vrchatapi/model/RequestInviteWithPhotoRequest.java index 7c5d536b..b4d680e9 100644 --- a/src/main/java/io/github/vrchatapi/model/RequestInviteWithPhotoRequest.java +++ b/src/main/java/io/github/vrchatapi/model/RequestInviteWithPhotoRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.RequestInviteRequest; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,61 +49,55 @@ /** * RequestInviteWithPhotoRequest */ -@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 RequestInviteWithPhotoRequest { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull private RequestInviteRequest data; public static final String SERIALIZED_NAME_IMAGE = "image"; @SerializedName(SERIALIZED_NAME_IMAGE) + @javax.annotation.Nonnull private File image; public RequestInviteWithPhotoRequest() { } - public RequestInviteWithPhotoRequest data(RequestInviteRequest data) { - + public RequestInviteWithPhotoRequest data(@javax.annotation.Nonnull RequestInviteRequest data) { this.data = data; return this; } - /** + /** * Get data * @return data - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public RequestInviteRequest getData() { return data; } - - public void setData(RequestInviteRequest data) { + public void setData(@javax.annotation.Nonnull RequestInviteRequest data) { this.data = data; } - public RequestInviteWithPhotoRequest image(File image) { - + public RequestInviteWithPhotoRequest image(@javax.annotation.Nonnull File image) { this.image = image; return this; } - /** + /** * The binary blob of the png file. * @return image - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The binary blob of the png file.") - public File getImage() { return image; } - - public void setImage(File image) { + public void setImage(@javax.annotation.Nonnull File image) { this.image = image; } @@ -142,10 +136,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -154,45 +145,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("image"); + openapiFields = new HashSet(Arrays.asList("data", "image")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("image"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RequestInviteWithPhotoRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RequestInviteWithPhotoRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RequestInviteWithPhotoRequest is not found in the empty JSON string", RequestInviteWithPhotoRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("data", "image")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RequestInviteWithPhotoRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RequestInviteWithPhotoRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RequestInviteWithPhotoRequest is not found in the empty JSON string", RequestInviteWithPhotoRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RequestInviteWithPhotoRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RequestInviteWithPhotoRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RequestInviteWithPhotoRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RequestInviteWithPhotoRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `data` - RequestInviteRequest.validateJsonObject(jsonObj.getAsJsonObject("data")); + RequestInviteRequest.validateJsonElement(jsonObj.get("data")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -215,31 +203,31 @@ public void write(JsonWriter out, RequestInviteWithPhotoRequest value) throws IO @Override public RequestInviteWithPhotoRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RequestInviteWithPhotoRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RequestInviteWithPhotoRequest - * @throws IOException if the JSON string is invalid with respect to RequestInviteWithPhotoRequest - */ + /** + * Create an instance of RequestInviteWithPhotoRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RequestInviteWithPhotoRequest + * @throws IOException if the JSON string is invalid with respect to RequestInviteWithPhotoRequest + */ public static RequestInviteWithPhotoRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RequestInviteWithPhotoRequest.class); } - /** - * Convert an instance of RequestInviteWithPhotoRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RequestInviteWithPhotoRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/RequiresTwoFactorAuth.java b/src/main/java/io/github/vrchatapi/model/RequiresTwoFactorAuth.java new file mode 100644 index 00000000..a19ed9fe --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RequiresTwoFactorAuth.java @@ -0,0 +1,222 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.github.vrchatapi.model.TwoFactorAuthType; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * RequiresTwoFactorAuth + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class RequiresTwoFactorAuth { + public static final String SERIALIZED_NAME_REQUIRES_TWO_FACTOR_AUTH = "requiresTwoFactorAuth"; + @SerializedName(SERIALIZED_NAME_REQUIRES_TWO_FACTOR_AUTH) + @javax.annotation.Nonnull + private List requiresTwoFactorAuth = new ArrayList<>(); + + public RequiresTwoFactorAuth() { + } + + public RequiresTwoFactorAuth requiresTwoFactorAuth(@javax.annotation.Nonnull List requiresTwoFactorAuth) { + this.requiresTwoFactorAuth = requiresTwoFactorAuth; + return this; + } + + public RequiresTwoFactorAuth addRequiresTwoFactorAuthItem(TwoFactorAuthType requiresTwoFactorAuthItem) { + if (this.requiresTwoFactorAuth == null) { + this.requiresTwoFactorAuth = new ArrayList<>(); + } + this.requiresTwoFactorAuth.add(requiresTwoFactorAuthItem); + return this; + } + + /** + * Get requiresTwoFactorAuth + * @return requiresTwoFactorAuth + */ + @javax.annotation.Nonnull + public List getRequiresTwoFactorAuth() { + return requiresTwoFactorAuth; + } + + public void setRequiresTwoFactorAuth(@javax.annotation.Nonnull List requiresTwoFactorAuth) { + this.requiresTwoFactorAuth = requiresTwoFactorAuth; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequiresTwoFactorAuth requiresTwoFactorAuth = (RequiresTwoFactorAuth) o; + return Objects.equals(this.requiresTwoFactorAuth, requiresTwoFactorAuth.requiresTwoFactorAuth); + } + + @Override + public int hashCode() { + return Objects.hash(requiresTwoFactorAuth); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RequiresTwoFactorAuth {\n"); + sb.append(" requiresTwoFactorAuth: ").append(toIndentedString(requiresTwoFactorAuth)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("requiresTwoFactorAuth")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("requiresTwoFactorAuth")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RequiresTwoFactorAuth + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RequiresTwoFactorAuth.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RequiresTwoFactorAuth is not found in the empty JSON string", RequiresTwoFactorAuth.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RequiresTwoFactorAuth.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RequiresTwoFactorAuth` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RequiresTwoFactorAuth.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("requiresTwoFactorAuth") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("requiresTwoFactorAuth").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `requiresTwoFactorAuth` to be an array in the JSON string but got `%s`", jsonObj.get("requiresTwoFactorAuth").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RequiresTwoFactorAuth.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RequiresTwoFactorAuth' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RequiresTwoFactorAuth.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RequiresTwoFactorAuth value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RequiresTwoFactorAuth read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RequiresTwoFactorAuth given an JSON string + * + * @param jsonString JSON string + * @return An instance of RequiresTwoFactorAuth + * @throws IOException if the JSON string is invalid with respect to RequiresTwoFactorAuth + */ + public static RequiresTwoFactorAuth fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RequiresTwoFactorAuth.class); + } + + /** + * Convert an instance of RequiresTwoFactorAuth to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/RespondGroupJoinRequest.java b/src/main/java/io/github/vrchatapi/model/RespondGroupJoinRequest.java index c015a3de..0994b87e 100644 --- a/src/main/java/io/github/vrchatapi/model/RespondGroupJoinRequest.java +++ b/src/main/java/io/github/vrchatapi/model/RespondGroupJoinRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupJoinRequestAction; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,61 +48,55 @@ /** * RespondGroupJoinRequest */ -@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 RespondGroupJoinRequest { public static final String SERIALIZED_NAME_ACTION = "action"; @SerializedName(SERIALIZED_NAME_ACTION) + @javax.annotation.Nonnull private GroupJoinRequestAction action; public static final String SERIALIZED_NAME_BLOCK = "block"; @SerializedName(SERIALIZED_NAME_BLOCK) + @javax.annotation.Nullable private Boolean block; public RespondGroupJoinRequest() { } - public RespondGroupJoinRequest action(GroupJoinRequestAction action) { - + public RespondGroupJoinRequest action(@javax.annotation.Nonnull GroupJoinRequestAction action) { this.action = action; return this; } - /** + /** * Get action * @return action - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public GroupJoinRequestAction getAction() { return action; } - - public void setAction(GroupJoinRequestAction action) { + public void setAction(@javax.annotation.Nonnull GroupJoinRequestAction action) { this.action = action; } - public RespondGroupJoinRequest block(Boolean block) { - + public RespondGroupJoinRequest block(@javax.annotation.Nullable Boolean block) { this.block = block; return this; } - /** + /** * Whether to block the user from requesting again * @return block - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Whether to block the user from requesting again") - public Boolean getBlock() { return block; } - - public void setBlock(Boolean block) { + public void setBlock(@javax.annotation.Nullable Boolean block) { this.block = block; } @@ -141,10 +135,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,42 +144,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("action"); - openapiFields.add("block"); + openapiFields = new HashSet(Arrays.asList("action", "block")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("action"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RespondGroupJoinRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RespondGroupJoinRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RespondGroupJoinRequest is not found in the empty JSON string", RespondGroupJoinRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("action")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RespondGroupJoinRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RespondGroupJoinRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RespondGroupJoinRequest is not found in the empty JSON string", RespondGroupJoinRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RespondGroupJoinRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RespondGroupJoinRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RespondGroupJoinRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RespondGroupJoinRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `action` + GroupJoinRequestAction.validateJsonElement(jsonObj.get("action")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -211,31 +202,31 @@ public void write(JsonWriter out, RespondGroupJoinRequest value) throws IOExcept @Override public RespondGroupJoinRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RespondGroupJoinRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RespondGroupJoinRequest - * @throws IOException if the JSON string is invalid with respect to RespondGroupJoinRequest - */ + /** + * Create an instance of RespondGroupJoinRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RespondGroupJoinRequest + * @throws IOException if the JSON string is invalid with respect to RespondGroupJoinRequest + */ public static RespondGroupJoinRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RespondGroupJoinRequest.class); } - /** - * Convert an instance of RespondGroupJoinRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RespondGroupJoinRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/RespondInviteWithPhotoRequest.java b/src/main/java/io/github/vrchatapi/model/RespondInviteWithPhotoRequest.java index 50685ce5..52cdfde0 100644 --- a/src/main/java/io/github/vrchatapi/model/RespondInviteWithPhotoRequest.java +++ b/src/main/java/io/github/vrchatapi/model/RespondInviteWithPhotoRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InviteResponse; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,61 +49,55 @@ /** * RespondInviteWithPhotoRequest */ -@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 RespondInviteWithPhotoRequest { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull private InviteResponse data; public static final String SERIALIZED_NAME_IMAGE = "image"; @SerializedName(SERIALIZED_NAME_IMAGE) + @javax.annotation.Nonnull private File image; public RespondInviteWithPhotoRequest() { } - public RespondInviteWithPhotoRequest data(InviteResponse data) { - + public RespondInviteWithPhotoRequest data(@javax.annotation.Nonnull InviteResponse data) { this.data = data; return this; } - /** + /** * Get data * @return data - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public InviteResponse getData() { return data; } - - public void setData(InviteResponse data) { + public void setData(@javax.annotation.Nonnull InviteResponse data) { this.data = data; } - public RespondInviteWithPhotoRequest image(File image) { - + public RespondInviteWithPhotoRequest image(@javax.annotation.Nonnull File image) { this.image = image; return this; } - /** + /** * The binary blob of the png file. * @return image - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The binary blob of the png file.") - public File getImage() { return image; } - - public void setImage(File image) { + public void setImage(@javax.annotation.Nonnull File image) { this.image = image; } @@ -142,10 +136,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -154,45 +145,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("image"); + openapiFields = new HashSet(Arrays.asList("data", "image")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("image"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RespondInviteWithPhotoRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RespondInviteWithPhotoRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RespondInviteWithPhotoRequest is not found in the empty JSON string", RespondInviteWithPhotoRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("data", "image")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RespondInviteWithPhotoRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RespondInviteWithPhotoRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RespondInviteWithPhotoRequest is not found in the empty JSON string", RespondInviteWithPhotoRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RespondInviteWithPhotoRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RespondInviteWithPhotoRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RespondInviteWithPhotoRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RespondInviteWithPhotoRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `data` - InviteResponse.validateJsonObject(jsonObj.getAsJsonObject("data")); + InviteResponse.validateJsonElement(jsonObj.get("data")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -215,31 +203,31 @@ public void write(JsonWriter out, RespondInviteWithPhotoRequest value) throws IO @Override public RespondInviteWithPhotoRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RespondInviteWithPhotoRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RespondInviteWithPhotoRequest - * @throws IOException if the JSON string is invalid with respect to RespondInviteWithPhotoRequest - */ + /** + * Create an instance of RespondInviteWithPhotoRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RespondInviteWithPhotoRequest + * @throws IOException if the JSON string is invalid with respect to RespondInviteWithPhotoRequest + */ public static RespondInviteWithPhotoRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RespondInviteWithPhotoRequest.class); } - /** - * Convert an instance of RespondInviteWithPhotoRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RespondInviteWithPhotoRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/RespondNotificationV2Request.java b/src/main/java/io/github/vrchatapi/model/RespondNotificationV2Request.java index 483f1b2d..484020c7 100644 --- a/src/main/java/io/github/vrchatapi/model/RespondNotificationV2Request.java +++ b/src/main/java/io/github/vrchatapi/model/RespondNotificationV2Request.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * RespondNotificationV2Request */ -@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 RespondNotificationV2Request { public static final String SERIALIZED_NAME_RESPONSE_DATA = "responseData"; @SerializedName(SERIALIZED_NAME_RESPONSE_DATA) + @javax.annotation.Nullable private String responseData = ""; public static final String SERIALIZED_NAME_RESPONSE_TYPE = "responseType"; @SerializedName(SERIALIZED_NAME_RESPONSE_TYPE) + @javax.annotation.Nonnull private String responseType; public RespondNotificationV2Request() { } - public RespondNotificationV2Request responseData(String responseData) { - + public RespondNotificationV2Request responseData(@javax.annotation.Nullable String responseData) { this.responseData = responseData; return this; } - /** + /** * Get responseData * @return responseData - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getResponseData() { return responseData; } - - public void setResponseData(String responseData) { + public void setResponseData(@javax.annotation.Nullable String responseData) { this.responseData = responseData; } - public RespondNotificationV2Request responseType(String responseType) { - + public RespondNotificationV2Request responseType(@javax.annotation.Nonnull String responseType) { this.responseType = responseType; return this; } - /** + /** * Get responseType * @return responseType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Accept: value: accept Boop: value: boop Decline: value: decline Delete: value: delete Unsubscribe: value: unsubscribe ", required = true, value = "") - public String getResponseType() { return responseType; } - - public void setResponseType(String responseType) { + public void setResponseType(@javax.annotation.Nonnull String responseType) { this.responseType = responseType; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,47 +143,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("responseData"); - openapiFields.add("responseType"); + openapiFields = new HashSet(Arrays.asList("responseData", "responseType")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("responseType"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RespondNotificationV2Request - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RespondNotificationV2Request.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RespondNotificationV2Request is not found in the empty JSON string", RespondNotificationV2Request.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("responseType")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RespondNotificationV2Request + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RespondNotificationV2Request.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RespondNotificationV2Request is not found in the empty JSON string", RespondNotificationV2Request.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RespondNotificationV2Request.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RespondNotificationV2Request` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RespondNotificationV2Request` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RespondNotificationV2Request.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("responseData") != null && !jsonObj.get("responseData").isJsonNull()) && !jsonObj.get("responseData").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `responseData` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseData").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `responseData` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseData").toString())); } if (!jsonObj.get("responseType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `responseType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `responseType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseType").toString())); } } @@ -216,31 +205,31 @@ public void write(JsonWriter out, RespondNotificationV2Request value) throws IOE @Override public RespondNotificationV2Request read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RespondNotificationV2Request given an JSON string - * - * @param jsonString JSON string - * @return An instance of RespondNotificationV2Request - * @throws IOException if the JSON string is invalid with respect to RespondNotificationV2Request - */ + /** + * Create an instance of RespondNotificationV2Request given an JSON string + * + * @param jsonString JSON string + * @return An instance of RespondNotificationV2Request + * @throws IOException if the JSON string is invalid with respect to RespondNotificationV2Request + */ public static RespondNotificationV2Request fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RespondNotificationV2Request.class); } - /** - * Convert an instance of RespondNotificationV2Request to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RespondNotificationV2Request to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Response.java b/src/main/java/io/github/vrchatapi/model/Response.java index 2166a962..5407b5b7 100644 --- a/src/main/java/io/github/vrchatapi/model/Response.java +++ b/src/main/java/io/github/vrchatapi/model/Response.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,56 @@ /** * Response */ -@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 Response { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nullable private String message; public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; @SerializedName(SERIALIZED_NAME_STATUS_CODE) + @javax.annotation.Nonnull private Integer statusCode; public Response() { } - public Response message(String message) { - + public Response message(@javax.annotation.Nullable String message) { this.message = message; return this; } - /** + /** * Get message * @return message - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getMessage() { return message; } - - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public Response statusCode(Integer statusCode) { - + public Response statusCode(@javax.annotation.Nonnull Integer statusCode) { this.statusCode = statusCode; return this; } - /** + /** * Get statusCode * minimum: 100 * @return statusCode - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getStatusCode() { return statusCode; } - - public void setStatusCode(Integer statusCode) { + public void setStatusCode(@javax.annotation.Nonnull Integer statusCode) { this.statusCode = statusCode; } @@ -141,10 +135,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,44 +144,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("message"); - openapiFields.add("status_code"); + openapiFields = new HashSet(Arrays.asList("message", "status_code")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("status_code"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Response - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Response is not found in the empty JSON string", Response.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("status_code")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Response is not found in the empty JSON string", Response.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Response` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Response.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -214,31 +203,31 @@ public void write(JsonWriter out, Response value) throws IOException { @Override public Response read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of Response - * @throws IOException if the JSON string is invalid with respect to Response - */ + /** + * Create an instance of Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of Response + * @throws IOException if the JSON string is invalid with respect to Response + */ public static Response fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Response.class); } - /** - * Convert an instance of Response to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Response to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/RewardBadge.java b/src/main/java/io/github/vrchatapi/model/RewardBadge.java index 468c7068..d856ab84 100644 --- a/src/main/java/io/github/vrchatapi/model/RewardBadge.java +++ b/src/main/java/io/github/vrchatapi/model/RewardBadge.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,331 +48,295 @@ /** * RewardBadge */ -@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 RewardBadge { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_CREATED_BY = "createdBy"; @SerializedName(SERIALIZED_NAME_CREATED_BY) + @javax.annotation.Nonnull private String createdBy; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_FILE_NAME = "fileName"; @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nonnull private String fileName; public static final String SERIALIZED_NAME_HIDDEN = "hidden"; @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nonnull private Boolean hidden; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_IS_LOCALIZATION_ENABLED = "isLocalizationEnabled"; @SerializedName(SERIALIZED_NAME_IS_LOCALIZATION_ENABLED) + @javax.annotation.Nonnull private Boolean isLocalizationEnabled; public static final String SERIALIZED_NAME_MACHINE_NAME = "machineName"; @SerializedName(SERIALIZED_NAME_MACHINE_NAME) + @javax.annotation.Nullable private String machineName; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private String type; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public RewardBadge() { } - public RewardBadge createdAt(OffsetDateTime createdAt) { - + public RewardBadge createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public RewardBadge createdBy(String createdBy) { - + public RewardBadge createdBy(@javax.annotation.Nonnull String createdBy) { this.createdBy = createdBy; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return createdBy - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getCreatedBy() { return createdBy; } - - public void setCreatedBy(String createdBy) { + public void setCreatedBy(@javax.annotation.Nonnull String createdBy) { this.createdBy = createdBy; } - public RewardBadge description(String description) { - + public RewardBadge description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public RewardBadge fileName(String fileName) { - + public RewardBadge fileName(@javax.annotation.Nonnull String fileName) { this.fileName = fileName; return this; } - /** + /** * Get fileName * @return fileName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getFileName() { return fileName; } - - public void setFileName(String fileName) { + public void setFileName(@javax.annotation.Nonnull String fileName) { this.fileName = fileName; } - public RewardBadge hidden(Boolean hidden) { - + public RewardBadge hidden(@javax.annotation.Nonnull Boolean hidden) { this.hidden = hidden; return this; } - /** + /** * Get hidden * @return hidden - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getHidden() { return hidden; } - - public void setHidden(Boolean hidden) { + public void setHidden(@javax.annotation.Nonnull Boolean hidden) { this.hidden = hidden; } - public RewardBadge id(String id) { - + public RewardBadge id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "bdg_a60e514a-8cb7-4702-8f24-2786992be1a8", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public RewardBadge imageUrl(String imageUrl) { - + public RewardBadge imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public RewardBadge isLocalizationEnabled(Boolean isLocalizationEnabled) { - + public RewardBadge isLocalizationEnabled(@javax.annotation.Nonnull Boolean isLocalizationEnabled) { this.isLocalizationEnabled = isLocalizationEnabled; return this; } - /** + /** * Get isLocalizationEnabled * @return isLocalizationEnabled - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsLocalizationEnabled() { return isLocalizationEnabled; } - - public void setIsLocalizationEnabled(Boolean isLocalizationEnabled) { + public void setIsLocalizationEnabled(@javax.annotation.Nonnull Boolean isLocalizationEnabled) { this.isLocalizationEnabled = isLocalizationEnabled; } - public RewardBadge machineName(String machineName) { - + public RewardBadge machineName(@javax.annotation.Nullable String machineName) { this.machineName = machineName; return this; } - /** + /** * Get machineName * @return machineName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getMachineName() { return machineName; } - - public void setMachineName(String machineName) { + public void setMachineName(@javax.annotation.Nullable String machineName) { this.machineName = machineName; } - public RewardBadge name(String name) { - + public RewardBadge name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public RewardBadge type(String type) { - + public RewardBadge type(@javax.annotation.Nonnull String type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getType() { return type; } - - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public RewardBadge updatedAt(OffsetDateTime updatedAt) { - + public RewardBadge updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -431,10 +395,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -443,85 +404,63 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("createdBy"); - openapiFields.add("description"); - openapiFields.add("fileName"); - openapiFields.add("hidden"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("isLocalizationEnabled"); - openapiFields.add("machineName"); - openapiFields.add("name"); - openapiFields.add("type"); - openapiFields.add("updatedAt"); + openapiFields = new HashSet(Arrays.asList("createdAt", "createdBy", "description", "fileName", "hidden", "id", "imageUrl", "isLocalizationEnabled", "machineName", "name", "type", "updatedAt")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("createdBy"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("fileName"); - openapiRequiredFields.add("hidden"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("isLocalizationEnabled"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("updatedAt"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RewardBadge - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RewardBadge.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RewardBadge is not found in the empty JSON string", RewardBadge.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("createdAt", "createdBy", "description", "fileName", "hidden", "id", "imageUrl", "isLocalizationEnabled", "name", "type", "updatedAt")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RewardBadge + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RewardBadge.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RewardBadge is not found in the empty JSON string", RewardBadge.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RewardBadge.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RewardBadge` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RewardBadge` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RewardBadge.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("createdBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `createdBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdBy").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `createdBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdBy").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("fileName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileName").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if ((jsonObj.get("machineName") != null && !jsonObj.get("machineName").isJsonNull()) && !jsonObj.get("machineName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `machineName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("machineName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `machineName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("machineName").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } @@ -545,31 +484,31 @@ public void write(JsonWriter out, RewardBadge value) throws IOException { @Override public RewardBadge read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RewardBadge given an JSON string - * - * @param jsonString JSON string - * @return An instance of RewardBadge - * @throws IOException if the JSON string is invalid with respect to RewardBadge - */ + /** + * Create an instance of RewardBadge given an JSON string + * + * @param jsonString JSON string + * @return An instance of RewardBadge + * @throws IOException if the JSON string is invalid with respect to RewardBadge + */ public static RewardBadge fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RewardBadge.class); } - /** - * Convert an instance of RewardBadge to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RewardBadge to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/RewardRedemption.java b/src/main/java/io/github/vrchatapi/model/RewardRedemption.java index fe6b993b..923eda4e 100644 --- a/src/main/java/io/github/vrchatapi/model/RewardRedemption.java +++ b/src/main/java/io/github/vrchatapi/model/RewardRedemption.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.RewardRedemptionData; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,61 +48,55 @@ /** * RewardRedemption */ -@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 RewardRedemption { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull private RewardRedemptionData data; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private String type; public RewardRedemption() { } - public RewardRedemption data(RewardRedemptionData data) { - + public RewardRedemption data(@javax.annotation.Nonnull RewardRedemptionData data) { this.data = data; return this; } - /** + /** * Get data * @return data - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public RewardRedemptionData getData() { return data; } - - public void setData(RewardRedemptionData data) { + public void setData(@javax.annotation.Nonnull RewardRedemptionData data) { this.data = data; } - public RewardRedemption type(String type) { - + public RewardRedemption type(@javax.annotation.Nonnull String type) { this.type = type; return this; } - /** + /** * One of `badge`, `item`, ... * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "One of `badge`, `item`, ...") - public String getType() { return type; } - - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } @@ -141,10 +135,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,47 +144,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("data", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RewardRedemption - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RewardRedemption.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RewardRedemption is not found in the empty JSON string", RewardRedemption.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("data", "type")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RewardRedemption + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RewardRedemption.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RewardRedemption is not found in the empty JSON string", RewardRedemption.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RewardRedemption.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RewardRedemption` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RewardRedemption` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RewardRedemption.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `data` - RewardRedemptionData.validateJsonObject(jsonObj.getAsJsonObject("data")); + RewardRedemptionData.validateJsonElement(jsonObj.get("data")); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } @@ -217,31 +205,31 @@ public void write(JsonWriter out, RewardRedemption value) throws IOException { @Override public RewardRedemption read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RewardRedemption given an JSON string - * - * @param jsonString JSON string - * @return An instance of RewardRedemption - * @throws IOException if the JSON string is invalid with respect to RewardRedemption - */ + /** + * Create an instance of RewardRedemption given an JSON string + * + * @param jsonString JSON string + * @return An instance of RewardRedemption + * @throws IOException if the JSON string is invalid with respect to RewardRedemption + */ public static RewardRedemption fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RewardRedemption.class); } - /** - * Convert an instance of RewardRedemption to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RewardRedemption to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/RewardRedemptionData.java b/src/main/java/io/github/vrchatapi/model/RewardRedemptionData.java index 7099f0dc..c4a767ab 100644 --- a/src/main/java/io/github/vrchatapi/model/RewardRedemptionData.java +++ b/src/main/java/io/github/vrchatapi/model/RewardRedemptionData.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,9 +20,8 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InventoryTemplate; import io.github.vrchatapi.model.RewardBadge; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,61 +49,55 @@ /** * RewardRedemptionData */ -@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 RewardRedemptionData { public static final String SERIALIZED_NAME_BADGE = "badge"; @SerializedName(SERIALIZED_NAME_BADGE) + @javax.annotation.Nullable private RewardBadge badge; public static final String SERIALIZED_NAME_ITEM = "item"; @SerializedName(SERIALIZED_NAME_ITEM) + @javax.annotation.Nullable private InventoryTemplate item; public RewardRedemptionData() { } - public RewardRedemptionData badge(RewardBadge badge) { - + public RewardRedemptionData badge(@javax.annotation.Nullable RewardBadge badge) { this.badge = badge; return this; } - /** + /** * Get badge * @return badge - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public RewardBadge getBadge() { return badge; } - - public void setBadge(RewardBadge badge) { + public void setBadge(@javax.annotation.Nullable RewardBadge badge) { this.badge = badge; } - public RewardRedemptionData item(InventoryTemplate item) { - + public RewardRedemptionData item(@javax.annotation.Nullable InventoryTemplate item) { this.item = item; return this; } - /** + /** * Get item * @return item - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InventoryTemplate getItem() { return item; } - - public void setItem(InventoryTemplate item) { + public void setItem(@javax.annotation.Nullable InventoryTemplate item) { this.item = item; } @@ -142,10 +136,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -154,41 +145,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("badge"); - openapiFields.add("item"); + openapiFields = new HashSet(Arrays.asList("badge", "item")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RewardRedemptionData - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RewardRedemptionData.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RewardRedemptionData is not found in the empty JSON string", RewardRedemptionData.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RewardRedemptionData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RewardRedemptionData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RewardRedemptionData is not found in the empty JSON string", RewardRedemptionData.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RewardRedemptionData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RewardRedemptionData` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RewardRedemptionData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `badge` if (jsonObj.get("badge") != null && !jsonObj.get("badge").isJsonNull()) { - RewardBadge.validateJsonObject(jsonObj.getAsJsonObject("badge")); + RewardBadge.validateJsonElement(jsonObj.get("badge")); } // validate the optional field `item` if (jsonObj.get("item") != null && !jsonObj.get("item").isJsonNull()) { - InventoryTemplate.validateJsonObject(jsonObj.getAsJsonObject("item")); + InventoryTemplate.validateJsonElement(jsonObj.get("item")); } } @@ -212,31 +202,31 @@ public void write(JsonWriter out, RewardRedemptionData value) throws IOException @Override public RewardRedemptionData read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RewardRedemptionData given an JSON string - * - * @param jsonString JSON string - * @return An instance of RewardRedemptionData - * @throws IOException if the JSON string is invalid with respect to RewardRedemptionData - */ + /** + * Create an instance of RewardRedemptionData given an JSON string + * + * @param jsonString JSON string + * @return An instance of RewardRedemptionData + * @throws IOException if the JSON string is invalid with respect to RewardRedemptionData + */ public static RewardRedemptionData fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RewardRedemptionData.class); } - /** - * Convert an instance of RewardRedemptionData to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RewardRedemptionData to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/RewardRedemptionRequest.java b/src/main/java/io/github/vrchatapi/model/RewardRedemptionRequest.java index dde17a3b..44d10702 100644 --- a/src/main/java/io/github/vrchatapi/model/RewardRedemptionRequest.java +++ b/src/main/java/io/github/vrchatapi/model/RewardRedemptionRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * RewardRedemptionRequest */ -@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 RewardRedemptionRequest { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nonnull private String code; public RewardRedemptionRequest() { } - public RewardRedemptionRequest code(String code) { - + public RewardRedemptionRequest code(@javax.annotation.Nonnull String code) { this.code = code; return this; } - /** + /** * Get code * @return code - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getCode() { return code; } - - public void setCode(String code) { + public void setCode(@javax.annotation.Nonnull String code) { this.code = code; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,43 +117,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); + openapiFields = new HashSet(Arrays.asList("code")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); + openapiRequiredFields = new HashSet(Arrays.asList("code")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RewardRedemptionRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RewardRedemptionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RewardRedemptionRequest is not found in the empty JSON string", RewardRedemptionRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RewardRedemptionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RewardRedemptionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RewardRedemptionRequest is not found in the empty JSON string", RewardRedemptionRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RewardRedemptionRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RewardRedemptionRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RewardRedemptionRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RewardRedemptionRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } } @@ -183,31 +176,31 @@ public void write(JsonWriter out, RewardRedemptionRequest value) throws IOExcept @Override public RewardRedemptionRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RewardRedemptionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RewardRedemptionRequest - * @throws IOException if the JSON string is invalid with respect to RewardRedemptionRequest - */ + /** + * Create an instance of RewardRedemptionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RewardRedemptionRequest + * @throws IOException if the JSON string is invalid with respect to RewardRedemptionRequest + */ public static RewardRedemptionRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RewardRedemptionRequest.class); } - /** - * Convert an instance of RewardRedemptionRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RewardRedemptionRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/RewardRedemptionResult.java b/src/main/java/io/github/vrchatapi/model/RewardRedemptionResult.java index 69fba6fd..085abe64 100644 --- a/src/main/java/io/github/vrchatapi/model/RewardRedemptionResult.java +++ b/src/main/java/io/github/vrchatapi/model/RewardRedemptionResult.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.RewardRedemption; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,66 +50,63 @@ /** * RewardRedemptionResult */ -@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 RewardRedemptionResult { public static final String SERIALIZED_NAME_REDEEMED_REWARDS = "redeemedRewards"; @SerializedName(SERIALIZED_NAME_REDEEMED_REWARDS) + @javax.annotation.Nonnull private List redeemedRewards = new ArrayList<>(); public static final String SERIALIZED_NAME_REDEMPTION_CODE = "redemptionCode"; @SerializedName(SERIALIZED_NAME_REDEMPTION_CODE) + @javax.annotation.Nonnull private String redemptionCode; public RewardRedemptionResult() { } - public RewardRedemptionResult redeemedRewards(List redeemedRewards) { - + public RewardRedemptionResult redeemedRewards(@javax.annotation.Nonnull List redeemedRewards) { this.redeemedRewards = redeemedRewards; return this; } public RewardRedemptionResult addRedeemedRewardsItem(RewardRedemption redeemedRewardsItem) { + if (this.redeemedRewards == null) { + this.redeemedRewards = new ArrayList<>(); + } this.redeemedRewards.add(redeemedRewardsItem); return this; } - /** + /** * Get redeemedRewards * @return redeemedRewards - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getRedeemedRewards() { return redeemedRewards; } - - public void setRedeemedRewards(List redeemedRewards) { + public void setRedeemedRewards(@javax.annotation.Nonnull List redeemedRewards) { this.redeemedRewards = redeemedRewards; } - public RewardRedemptionResult redemptionCode(String redemptionCode) { - + public RewardRedemptionResult redemptionCode(@javax.annotation.Nonnull String redemptionCode) { this.redemptionCode = redemptionCode; return this; } - /** + /** * Get redemptionCode * @return redemptionCode - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getRedemptionCode() { return redemptionCode; } - - public void setRedemptionCode(String redemptionCode) { + public void setRedemptionCode(@javax.annotation.Nonnull String redemptionCode) { this.redemptionCode = redemptionCode; } @@ -148,10 +145,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -160,55 +154,52 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("redeemedRewards"); - openapiFields.add("redemptionCode"); + openapiFields = new HashSet(Arrays.asList("redeemedRewards", "redemptionCode")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redeemedRewards"); - openapiRequiredFields.add("redemptionCode"); + openapiRequiredFields = new HashSet(Arrays.asList("redeemedRewards", "redemptionCode")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RewardRedemptionResult - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RewardRedemptionResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RewardRedemptionResult is not found in the empty JSON string", RewardRedemptionResult.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RewardRedemptionResult + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RewardRedemptionResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in RewardRedemptionResult is not found in the empty JSON string", RewardRedemptionResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RewardRedemptionResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RewardRedemptionResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `RewardRedemptionResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RewardRedemptionResult.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } - // ensure the json data is an array - if (!jsonObj.get("redeemedRewards").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `redeemedRewards` to be an array in the JSON string but got `%s`", jsonObj.get("redeemedRewards").toString())); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("redeemedRewards") != null) { + if (!jsonObj.get("redeemedRewards").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `redeemedRewards` to be an array in the JSON string but got `%s`", jsonObj.get("redeemedRewards").toString())); + } + JsonArray jsonArrayredeemedRewards = jsonObj.getAsJsonArray("redeemedRewards"); + // validate the required field `redeemedRewards` (array) + for (int i = 0; i < jsonArrayredeemedRewards.size(); i++) { + RewardRedemption.validateJsonElement(jsonArrayredeemedRewards.get(i)); + } } - - JsonArray jsonArrayredeemedRewards = jsonObj.getAsJsonArray("redeemedRewards"); - // validate the required field `redeemedRewards` (array) - for (int i = 0; i < jsonArrayredeemedRewards.size(); i++) { - RewardRedemption.validateJsonObject(jsonArrayredeemedRewards.get(i).getAsJsonObject()); - }; if (!jsonObj.get("redemptionCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redemptionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redemptionCode").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `redemptionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redemptionCode").toString())); } } @@ -232,31 +223,31 @@ public void write(JsonWriter out, RewardRedemptionResult value) throws IOExcepti @Override public RewardRedemptionResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of RewardRedemptionResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of RewardRedemptionResult - * @throws IOException if the JSON string is invalid with respect to RewardRedemptionResult - */ + /** + * Create an instance of RewardRedemptionResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of RewardRedemptionResult + * @throws IOException if the JSON string is invalid with respect to RewardRedemptionResult + */ public static RewardRedemptionResult fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RewardRedemptionResult.class); } - /** - * Convert an instance of RewardRedemptionResult to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of RewardRedemptionResult to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/SearchGroupMembers200Response.java b/src/main/java/io/github/vrchatapi/model/SearchGroupMembers200Response.java index 1dcc163a..96752791 100644 --- a/src/main/java/io/github/vrchatapi/model/SearchGroupMembers200Response.java +++ b/src/main/java/io/github/vrchatapi/model/SearchGroupMembers200Response.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupMember; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,21 +50,22 @@ /** * SearchGroupMembers200Response */ -@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 SearchGroupMembers200Response { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = null; + @javax.annotation.Nullable + private List results = new ArrayList<>(); public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) + @javax.annotation.Nullable private Integer total; public SearchGroupMembers200Response() { } - public SearchGroupMembers200Response results(List results) { - + public SearchGroupMembers200Response results(@javax.annotation.Nullable List results) { this.results = results; return this; } @@ -77,42 +78,35 @@ public SearchGroupMembers200Response addResultsItem(GroupMember resultsItem) { return this; } - /** + /** * Get results * @return results - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getResults() { return results; } - - public void setResults(List results) { + public void setResults(@javax.annotation.Nullable List results) { this.results = results; } - public SearchGroupMembers200Response total(Integer total) { - + public SearchGroupMembers200Response total(@javax.annotation.Nullable Integer total) { this.total = total; return this; } - /** + /** * Number of members returned * @return total - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Number of members returned") - public Integer getTotal() { return total; } - - public void setTotal(Integer total) { + public void setTotal(@javax.annotation.Nullable Integer total) { this.total = total; } @@ -151,10 +145,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -163,45 +154,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("results"); - openapiFields.add("total"); + openapiFields = new HashSet(Arrays.asList("results", "total")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SearchGroupMembers200Response - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SearchGroupMembers200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SearchGroupMembers200Response is not found in the empty JSON string", SearchGroupMembers200Response.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchGroupMembers200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchGroupMembers200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SearchGroupMembers200Response is not found in the empty JSON string", SearchGroupMembers200Response.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!SearchGroupMembers200Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchGroupMembers200Response` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `SearchGroupMembers200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("results") != null && !jsonObj.get("results").isJsonNull()) { JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); if (jsonArrayresults != null) { // ensure the json data is an array if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); } // validate the optional field `results` (array) for (int i = 0; i < jsonArrayresults.size(); i++) { - GroupMember.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); + GroupMember.validateJsonElement(jsonArrayresults.get(i)); }; } } @@ -227,31 +217,31 @@ public void write(JsonWriter out, SearchGroupMembers200Response value) throws IO @Override public SearchGroupMembers200Response read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SearchGroupMembers200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of SearchGroupMembers200Response - * @throws IOException if the JSON string is invalid with respect to SearchGroupMembers200Response - */ + /** + * Create an instance of SearchGroupMembers200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchGroupMembers200Response + * @throws IOException if the JSON string is invalid with respect to SearchGroupMembers200Response + */ public static SearchGroupMembers200Response fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SearchGroupMembers200Response.class); } - /** - * Convert an instance of SearchGroupMembers200Response to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SearchGroupMembers200Response to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/SellerEligibility.java b/src/main/java/io/github/vrchatapi/model/SellerEligibility.java index 3a4c9e98..d46a3656 100644 --- a/src/main/java/io/github/vrchatapi/model/SellerEligibility.java +++ b/src/main/java/io/github/vrchatapi/model/SellerEligibility.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * SellerEligibility */ -@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 SellerEligibility { public static final String SERIALIZED_NAME_ELIGIBLE = "eligible"; @SerializedName(SERIALIZED_NAME_ELIGIBLE) + @javax.annotation.Nonnull private Boolean eligible; public SellerEligibility() { } - public SellerEligibility eligible(Boolean eligible) { - + public SellerEligibility eligible(@javax.annotation.Nonnull Boolean eligible) { this.eligible = eligible; return this; } - /** + /** * Get eligible * @return eligible - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getEligible() { return eligible; } - - public void setEligible(Boolean eligible) { + public void setEligible(@javax.annotation.Nonnull Boolean eligible) { this.eligible = eligible; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eligible"); + openapiFields = new HashSet(Arrays.asList("eligible")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("eligible"); + openapiRequiredFields = new HashSet(Arrays.asList("eligible")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SellerEligibility - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SellerEligibility.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SellerEligibility is not found in the empty JSON string", SellerEligibility.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SellerEligibility + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SellerEligibility.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SellerEligibility is not found in the empty JSON string", SellerEligibility.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!SellerEligibility.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SellerEligibility` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `SellerEligibility` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : SellerEligibility.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -180,31 +173,31 @@ public void write(JsonWriter out, SellerEligibility value) throws IOException { @Override public SellerEligibility read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SellerEligibility given an JSON string - * - * @param jsonString JSON string - * @return An instance of SellerEligibility - * @throws IOException if the JSON string is invalid with respect to SellerEligibility - */ + /** + * Create an instance of SellerEligibility given an JSON string + * + * @param jsonString JSON string + * @return An instance of SellerEligibility + * @throws IOException if the JSON string is invalid with respect to SellerEligibility + */ public static SellerEligibility fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SellerEligibility.class); } - /** - * Convert an instance of SellerEligibility to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SellerEligibility to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/SentNotification.java b/src/main/java/io/github/vrchatapi/model/SentNotification.java index f676dd68..94088c3c 100644 --- a/src/main/java/io/github/vrchatapi/model/SentNotification.java +++ b/src/main/java/io/github/vrchatapi/model/SentNotification.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,19 +13,16 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.NotificationType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.github.vrchatapi.model.SentNotificationDetails; import java.io.IOException; import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -37,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,231 +50,204 @@ /** * */ -@ApiModel(description = "") -@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 SentNotification { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DETAILS = "details"; @SerializedName(SERIALIZED_NAME_DETAILS) - private Map details = new HashMap<>(); + @javax.annotation.Nonnull + private SentNotificationDetails details; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull private String message; public static final String SERIALIZED_NAME_RECEIVER_USER_ID = "receiverUserId"; @SerializedName(SERIALIZED_NAME_RECEIVER_USER_ID) + @javax.annotation.Nonnull private String receiverUserId; public static final String SERIALIZED_NAME_SENDER_USER_ID = "senderUserId"; @SerializedName(SERIALIZED_NAME_SENDER_USER_ID) + @javax.annotation.Nonnull private String senderUserId; public static final String SERIALIZED_NAME_SENDER_USERNAME = "senderUsername"; + @Deprecated @SerializedName(SERIALIZED_NAME_SENDER_USERNAME) + @javax.annotation.Nullable private String senderUsername; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private NotificationType type = NotificationType.FRIENDREQUEST; + @javax.annotation.Nonnull + private NotificationType type = NotificationType.FRIEND_REQUEST; public SentNotification() { } - public SentNotification createdAt(OffsetDateTime createdAt) { - + public SentNotification createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public SentNotification details(Map details) { - + public SentNotification details(@javax.annotation.Nonnull SentNotificationDetails details) { this.details = details; return this; } - public SentNotification putDetailsItem(String key, String detailsItem) { - this.details.put(key, detailsItem); - return this; - } - - /** + /** * Get details * @return details - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public Map getDetails() { + public SentNotificationDetails getDetails() { return details; } - - public void setDetails(Map details) { + public void setDetails(@javax.annotation.Nonnull SentNotificationDetails details) { this.details = details; } - public SentNotification id(String id) { - + public SentNotification id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public SentNotification message(String message) { - + public SentNotification message(@javax.annotation.Nonnull String message) { this.message = message; return this; } - /** + /** * * @return message - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "This is a generated invite to VRChat Hub", required = true, value = "") - public String getMessage() { return message; } - - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nonnull String message) { this.message = message; } - public SentNotification receiverUserId(String receiverUserId) { - + public SentNotification receiverUserId(@javax.annotation.Nonnull String receiverUserId) { this.receiverUserId = receiverUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return receiverUserId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getReceiverUserId() { return receiverUserId; } - - public void setReceiverUserId(String receiverUserId) { + public void setReceiverUserId(@javax.annotation.Nonnull String receiverUserId) { this.receiverUserId = receiverUserId; } - public SentNotification senderUserId(String senderUserId) { - + public SentNotification senderUserId(@javax.annotation.Nonnull String senderUserId) { this.senderUserId = senderUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return senderUserId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getSenderUserId() { return senderUserId; } - - public void setSenderUserId(String senderUserId) { + public void setSenderUserId(@javax.annotation.Nonnull String senderUserId) { this.senderUserId = senderUserId; } - public SentNotification senderUsername(String senderUsername) { - + @Deprecated + public SentNotification senderUsername(@javax.annotation.Nullable String senderUsername) { this.senderUsername = senderUsername; return this; } - /** + /** * -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). * @return senderUsername * @deprecated - **/ + */ @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "-| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).") - public String getSenderUsername() { return senderUsername; } - - public void setSenderUsername(String senderUsername) { + @Deprecated + public void setSenderUsername(@javax.annotation.Nullable String senderUsername) { this.senderUsername = senderUsername; } - public SentNotification type(NotificationType type) { - + public SentNotification type(@javax.annotation.Nonnull NotificationType type) { this.type = type; return this; } - /** + /** * Get type * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public NotificationType getType() { return type; } - - public void setType(NotificationType type) { + public void setType(@javax.annotation.Nonnull NotificationType type) { this.type = type; } @@ -326,10 +298,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -338,69 +307,59 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("details"); - openapiFields.add("id"); - openapiFields.add("message"); - openapiFields.add("receiverUserId"); - openapiFields.add("senderUserId"); - openapiFields.add("senderUsername"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("created_at", "details", "id", "message", "receiverUserId", "senderUserId", "senderUsername", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("details"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("message"); - openapiRequiredFields.add("receiverUserId"); - openapiRequiredFields.add("senderUserId"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SentNotification - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SentNotification.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SentNotification is not found in the empty JSON string", SentNotification.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("created_at", "details", "id", "message", "receiverUserId", "senderUserId", "type")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SentNotification + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SentNotification.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SentNotification is not found in the empty JSON string", SentNotification.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!SentNotification.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SentNotification` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `SentNotification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : SentNotification.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `details` + SentNotificationDetails.validateJsonElement(jsonObj.get("details")); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } if (!jsonObj.get("receiverUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `receiverUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `receiverUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverUserId").toString())); } if (!jsonObj.get("senderUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `senderUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `senderUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUserId").toString())); } if ((jsonObj.get("senderUsername") != null && !jsonObj.get("senderUsername").isJsonNull()) && !jsonObj.get("senderUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `senderUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUsername").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `senderUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("senderUsername").toString())); } + // validate the required field `type` + NotificationType.validateJsonElement(jsonObj.get("type")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -423,31 +382,31 @@ public void write(JsonWriter out, SentNotification value) throws IOException { @Override public SentNotification read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SentNotification given an JSON string - * - * @param jsonString JSON string - * @return An instance of SentNotification - * @throws IOException if the JSON string is invalid with respect to SentNotification - */ + /** + * Create an instance of SentNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of SentNotification + * @throws IOException if the JSON string is invalid with respect to SentNotification + */ public static SentNotification fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SentNotification.class); } - /** - * Convert an instance of SentNotification to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SentNotification to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/SentNotificationDetails.java b/src/main/java/io/github/vrchatapi/model/SentNotificationDetails.java new file mode 100644 index 00000000..e2424ed8 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/SentNotificationDetails.java @@ -0,0 +1,509 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.github.vrchatapi.model.NotificationDetailBoop; +import io.github.vrchatapi.model.NotificationDetailInvite; +import io.github.vrchatapi.model.NotificationDetailInviteResponse; +import io.github.vrchatapi.model.NotificationDetailRequestInvite; +import io.github.vrchatapi.model.NotificationDetailRequestInviteResponse; +import io.github.vrchatapi.model.NotificationDetailVoteToKick; +import java.io.IOException; +import java.util.Arrays; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import io.github.vrchatapi.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") +public class SentNotificationDetails extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(SentNotificationDetails.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SentNotificationDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SentNotificationDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterObject = gson.getDelegateAdapter(this, TypeToken.get(Object.class)); + final TypeAdapter adapterNotificationDetailBoop = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailBoop.class)); + final TypeAdapter adapterNotificationDetailInvite = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailInvite.class)); + final TypeAdapter adapterNotificationDetailInviteResponse = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailInviteResponse.class)); + final TypeAdapter adapterNotificationDetailRequestInvite = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailRequestInvite.class)); + final TypeAdapter adapterNotificationDetailRequestInviteResponse = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailRequestInviteResponse.class)); + final TypeAdapter adapterNotificationDetailVoteToKick = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailVoteToKick.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SentNotificationDetails value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Object` + if (value.getActualInstance() instanceof Object) { + JsonPrimitive primitive = adapterObject.toJsonTree((Object)value.getActualInstance()).getAsJsonPrimitive(); + elementAdapter.write(out, primitive); + return; + } + // check if the actual instance is of the type `NotificationDetailBoop` + if (value.getActualInstance() instanceof NotificationDetailBoop) { + JsonElement element = adapterNotificationDetailBoop.toJsonTree((NotificationDetailBoop)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NotificationDetailInvite` + if (value.getActualInstance() instanceof NotificationDetailInvite) { + JsonElement element = adapterNotificationDetailInvite.toJsonTree((NotificationDetailInvite)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NotificationDetailInviteResponse` + if (value.getActualInstance() instanceof NotificationDetailInviteResponse) { + JsonElement element = adapterNotificationDetailInviteResponse.toJsonTree((NotificationDetailInviteResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NotificationDetailRequestInvite` + if (value.getActualInstance() instanceof NotificationDetailRequestInvite) { + JsonElement element = adapterNotificationDetailRequestInvite.toJsonTree((NotificationDetailRequestInvite)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NotificationDetailRequestInviteResponse` + if (value.getActualInstance() instanceof NotificationDetailRequestInviteResponse) { + JsonElement element = adapterNotificationDetailRequestInviteResponse.toJsonTree((NotificationDetailRequestInviteResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NotificationDetailVoteToKick` + if (value.getActualInstance() instanceof NotificationDetailVoteToKick) { + JsonElement element = adapterNotificationDetailVoteToKick.toJsonTree((NotificationDetailVoteToKick)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: NotificationDetailBoop, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick, Object"); + } + + @Override + public SentNotificationDetails read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Object + try { + // validate the JSON object to see if any exception is thrown + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + actualAdapter = adapterObject; + match++; + log.log(Level.FINER, "Input data matches schema 'Object'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for Object failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Object'", e); + } + // deserialize NotificationDetailBoop + try { + // validate the JSON object to see if any exception is thrown + NotificationDetailBoop.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationDetailBoop; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationDetailBoop'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailBoop failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationDetailBoop'", e); + } + // deserialize NotificationDetailInvite + try { + // validate the JSON object to see if any exception is thrown + NotificationDetailInvite.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationDetailInvite; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationDetailInvite'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailInvite failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationDetailInvite'", e); + } + // deserialize NotificationDetailInviteResponse + try { + // validate the JSON object to see if any exception is thrown + NotificationDetailInviteResponse.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationDetailInviteResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationDetailInviteResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailInviteResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationDetailInviteResponse'", e); + } + // deserialize NotificationDetailRequestInvite + try { + // validate the JSON object to see if any exception is thrown + NotificationDetailRequestInvite.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationDetailRequestInvite; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationDetailRequestInvite'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailRequestInvite failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationDetailRequestInvite'", e); + } + // deserialize NotificationDetailRequestInviteResponse + try { + // validate the JSON object to see if any exception is thrown + NotificationDetailRequestInviteResponse.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationDetailRequestInviteResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationDetailRequestInviteResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailRequestInviteResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationDetailRequestInviteResponse'", e); + } + // deserialize NotificationDetailVoteToKick + try { + // validate the JSON object to see if any exception is thrown + NotificationDetailVoteToKick.validateJsonElement(jsonElement); + actualAdapter = adapterNotificationDetailVoteToKick; + match++; + log.log(Level.FINER, "Input data matches schema 'NotificationDetailVoteToKick'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailVoteToKick failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'NotificationDetailVoteToKick'", e); + } + + if (match == 1) { + SentNotificationDetails ret = new SentNotificationDetails(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format(java.util.Locale.ROOT, "Failed deserialization for SentNotificationDetails: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public SentNotificationDetails() { + super("oneOf", Boolean.FALSE); + } + + public SentNotificationDetails(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Object", Object.class); + schemas.put("NotificationDetailBoop", NotificationDetailBoop.class); + schemas.put("NotificationDetailInvite", NotificationDetailInvite.class); + schemas.put("NotificationDetailInviteResponse", NotificationDetailInviteResponse.class); + schemas.put("NotificationDetailRequestInvite", NotificationDetailRequestInvite.class); + schemas.put("NotificationDetailRequestInviteResponse", NotificationDetailRequestInviteResponse.class); + schemas.put("NotificationDetailVoteToKick", NotificationDetailVoteToKick.class); + } + + @Override + public Map> getSchemas() { + return SentNotificationDetails.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * NotificationDetailBoop, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick, Object + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Object) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationDetailBoop) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationDetailInvite) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationDetailInviteResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationDetailRequestInvite) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationDetailRequestInviteResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NotificationDetailVoteToKick) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be NotificationDetailBoop, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick, Object"); + } + + /** + * Get the actual instance, which can be the following: + * NotificationDetailBoop, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick, Object + * + * @return The actual instance (NotificationDetailBoop, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick, Object) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Object`. If the actual instance is not `Object`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Object` + * @throws ClassCastException if the instance is not `Object` + */ + @SuppressWarnings("unchecked") + public Object getObject() throws ClassCastException { + return (Object)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationDetailBoop`. If the actual instance is not `NotificationDetailBoop`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationDetailBoop` + * @throws ClassCastException if the instance is not `NotificationDetailBoop` + */ + @SuppressWarnings("unchecked") + public NotificationDetailBoop getNotificationDetailBoop() throws ClassCastException { + return (NotificationDetailBoop)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationDetailInvite`. If the actual instance is not `NotificationDetailInvite`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationDetailInvite` + * @throws ClassCastException if the instance is not `NotificationDetailInvite` + */ + @SuppressWarnings("unchecked") + public NotificationDetailInvite getNotificationDetailInvite() throws ClassCastException { + return (NotificationDetailInvite)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationDetailInviteResponse`. If the actual instance is not `NotificationDetailInviteResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationDetailInviteResponse` + * @throws ClassCastException if the instance is not `NotificationDetailInviteResponse` + */ + @SuppressWarnings("unchecked") + public NotificationDetailInviteResponse getNotificationDetailInviteResponse() throws ClassCastException { + return (NotificationDetailInviteResponse)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationDetailRequestInvite`. If the actual instance is not `NotificationDetailRequestInvite`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationDetailRequestInvite` + * @throws ClassCastException if the instance is not `NotificationDetailRequestInvite` + */ + @SuppressWarnings("unchecked") + public NotificationDetailRequestInvite getNotificationDetailRequestInvite() throws ClassCastException { + return (NotificationDetailRequestInvite)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationDetailRequestInviteResponse`. If the actual instance is not `NotificationDetailRequestInviteResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationDetailRequestInviteResponse` + * @throws ClassCastException if the instance is not `NotificationDetailRequestInviteResponse` + */ + @SuppressWarnings("unchecked") + public NotificationDetailRequestInviteResponse getNotificationDetailRequestInviteResponse() throws ClassCastException { + return (NotificationDetailRequestInviteResponse)super.getActualInstance(); + } + + /** + * Get the actual instance of `NotificationDetailVoteToKick`. If the actual instance is not `NotificationDetailVoteToKick`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `NotificationDetailVoteToKick` + * @throws ClassCastException if the instance is not `NotificationDetailVoteToKick` + */ + @SuppressWarnings("unchecked") + public NotificationDetailVoteToKick getNotificationDetailVoteToKick() throws ClassCastException { + return (NotificationDetailVoteToKick)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SentNotificationDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Object + try { + if (!jsonElement.getAsJsonPrimitive().isNumber()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); + } + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for Object failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationDetailBoop + try { + NotificationDetailBoop.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailBoop failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationDetailInvite + try { + NotificationDetailInvite.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailInvite failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationDetailInviteResponse + try { + NotificationDetailInviteResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailInviteResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationDetailRequestInvite + try { + NotificationDetailRequestInvite.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailRequestInvite failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationDetailRequestInviteResponse + try { + NotificationDetailRequestInviteResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailRequestInviteResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with NotificationDetailVoteToKick + try { + NotificationDetailVoteToKick.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(java.util.Locale.ROOT, "Deserialization for NotificationDetailVoteToKick failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format(java.util.Locale.ROOT, "The JSON string is invalid for SentNotificationDetails with oneOf schemas: NotificationDetailBoop, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick, Object. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of SentNotificationDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of SentNotificationDetails + * @throws IOException if the JSON string is invalid with respect to SentNotificationDetails + */ + public static SentNotificationDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SentNotificationDetails.class); + } + + /** + * Convert an instance of SentNotificationDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/ServiceQueueStats.java b/src/main/java/io/github/vrchatapi/model/ServiceQueueStats.java index 1ed3ebc3..557e2595 100644 --- a/src/main/java/io/github/vrchatapi/model/ServiceQueueStats.java +++ b/src/main/java/io/github/vrchatapi/model/ServiceQueueStats.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,35 +47,31 @@ /** * Statistics about the user's currently queued service request */ -@ApiModel(description = "Statistics about the user's currently queued service request") -@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 ServiceQueueStats { public static final String SERIALIZED_NAME_ESTIMATED_SERVICE_DURATION_SECONDS = "estimatedServiceDurationSeconds"; @SerializedName(SERIALIZED_NAME_ESTIMATED_SERVICE_DURATION_SECONDS) + @javax.annotation.Nonnull private Integer estimatedServiceDurationSeconds; public ServiceQueueStats() { } - public ServiceQueueStats estimatedServiceDurationSeconds(Integer estimatedServiceDurationSeconds) { - + public ServiceQueueStats estimatedServiceDurationSeconds(@javax.annotation.Nonnull Integer estimatedServiceDurationSeconds) { this.estimatedServiceDurationSeconds = estimatedServiceDurationSeconds; return this; } - /** + /** * Get estimatedServiceDurationSeconds * @return estimatedServiceDurationSeconds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getEstimatedServiceDurationSeconds() { return estimatedServiceDurationSeconds; } - - public void setEstimatedServiceDurationSeconds(Integer estimatedServiceDurationSeconds) { + public void setEstimatedServiceDurationSeconds(@javax.annotation.Nonnull Integer estimatedServiceDurationSeconds) { this.estimatedServiceDurationSeconds = estimatedServiceDurationSeconds; } @@ -112,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("estimatedServiceDurationSeconds"); + openapiFields = new HashSet(Arrays.asList("estimatedServiceDurationSeconds")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("estimatedServiceDurationSeconds"); + openapiRequiredFields = new HashSet(Arrays.asList("estimatedServiceDurationSeconds")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ServiceQueueStats - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ServiceQueueStats.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ServiceQueueStats is not found in the empty JSON string", ServiceQueueStats.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ServiceQueueStats + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ServiceQueueStats.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ServiceQueueStats is not found in the empty JSON string", ServiceQueueStats.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ServiceQueueStats.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ServiceQueueStats` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ServiceQueueStats` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ServiceQueueStats.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -181,31 +173,31 @@ public void write(JsonWriter out, ServiceQueueStats value) throws IOException { @Override public ServiceQueueStats read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ServiceQueueStats given an JSON string - * - * @param jsonString JSON string - * @return An instance of ServiceQueueStats - * @throws IOException if the JSON string is invalid with respect to ServiceQueueStats - */ + /** + * Create an instance of ServiceQueueStats given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServiceQueueStats + * @throws IOException if the JSON string is invalid with respect to ServiceQueueStats + */ public static ServiceQueueStats fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ServiceQueueStats.class); } - /** - * Convert an instance of ServiceQueueStats to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ServiceQueueStats to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ServiceStatus.java b/src/main/java/io/github/vrchatapi/model/ServiceStatus.java index d033b077..e6615f9f 100644 --- a/src/main/java/io/github/vrchatapi/model/ServiceStatus.java +++ b/src/main/java/io/github/vrchatapi/model/ServiceStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,256 +50,231 @@ /** * Status information for a service request */ -@ApiModel(description = "Status information for a service request") -@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 ServiceStatus { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_PROGRESS = "progress"; @SerializedName(SERIALIZED_NAME_PROGRESS) + @javax.annotation.Nonnull private List progress = new ArrayList<>(); public static final String SERIALIZED_NAME_REQUESTER_USER_ID = "requesterUserId"; @SerializedName(SERIALIZED_NAME_REQUESTER_USER_ID) + @javax.annotation.Nonnull private String requesterUserId; public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nonnull private String state; public static final String SERIALIZED_NAME_SUBJECT_ID = "subjectId"; @SerializedName(SERIALIZED_NAME_SUBJECT_ID) + @javax.annotation.Nonnull private String subjectId; public static final String SERIALIZED_NAME_SUBJECT_TYPE = "subjectType"; @SerializedName(SERIALIZED_NAME_SUBJECT_TYPE) + @javax.annotation.Nonnull private String subjectType; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private String type; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public ServiceStatus() { } - public ServiceStatus createdAt(OffsetDateTime createdAt) { - + public ServiceStatus createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public ServiceStatus id(String id) { - + public ServiceStatus id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * The id of this service, NOT the id of the thing this service was requested for. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The id of this service, NOT the id of the thing this service was requested for.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public ServiceStatus progress(List progress) { - + public ServiceStatus progress(@javax.annotation.Nonnull List progress) { this.progress = progress; return this; } public ServiceStatus addProgressItem(Object progressItem) { + if (this.progress == null) { + this.progress = new ArrayList<>(); + } this.progress.add(progressItem); return this; } - /** + /** * Get progress * @return progress - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getProgress() { return progress; } - - public void setProgress(List progress) { + public void setProgress(@javax.annotation.Nonnull List progress) { this.progress = progress; } - public ServiceStatus requesterUserId(String requesterUserId) { - + public ServiceStatus requesterUserId(@javax.annotation.Nonnull String requesterUserId) { this.requesterUserId = requesterUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return requesterUserId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getRequesterUserId() { return requesterUserId; } - - public void setRequesterUserId(String requesterUserId) { + public void setRequesterUserId(@javax.annotation.Nonnull String requesterUserId) { this.requesterUserId = requesterUserId; } - public ServiceStatus state(String state) { - + public ServiceStatus state(@javax.annotation.Nonnull String state) { this.state = state; return this; } - /** + /** * Get state * @return state - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getState() { return state; } - - public void setState(String state) { + public void setState(@javax.annotation.Nonnull String state) { this.state = state; } - public ServiceStatus subjectId(String subjectId) { - + public ServiceStatus subjectId(@javax.annotation.Nonnull String subjectId) { this.subjectId = subjectId; return this; } - /** + /** * The id of the thing this service was requested for. * @return subjectId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The id of the thing this service was requested for.") - public String getSubjectId() { return subjectId; } - - public void setSubjectId(String subjectId) { + public void setSubjectId(@javax.annotation.Nonnull String subjectId) { this.subjectId = subjectId; } - public ServiceStatus subjectType(String subjectType) { - + public ServiceStatus subjectType(@javax.annotation.Nonnull String subjectType) { this.subjectType = subjectType; return this; } - /** + /** * The kind of the thing this service was requested for. * @return subjectType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The kind of the thing this service was requested for.") - public String getSubjectType() { return subjectType; } - - public void setSubjectType(String subjectType) { + public void setSubjectType(@javax.annotation.Nonnull String subjectType) { this.subjectType = subjectType; } - public ServiceStatus type(String type) { - + public ServiceStatus type(@javax.annotation.Nonnull String type) { this.type = type; return this; } - /** + /** * The kind of service that was requested. * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The kind of service that was requested.") - public String getType() { return type; } - - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public ServiceStatus updatedAt(OffsetDateTime updatedAt) { - + public ServiceStatus updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -352,10 +327,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -364,80 +336,63 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("id"); - openapiFields.add("progress"); - openapiFields.add("requesterUserId"); - openapiFields.add("state"); - openapiFields.add("subjectId"); - openapiFields.add("subjectType"); - openapiFields.add("type"); - openapiFields.add("updated_at"); + openapiFields = new HashSet(Arrays.asList("created_at", "id", "progress", "requesterUserId", "state", "subjectId", "subjectType", "type", "updated_at")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("progress"); - openapiRequiredFields.add("requesterUserId"); - openapiRequiredFields.add("state"); - openapiRequiredFields.add("subjectId"); - openapiRequiredFields.add("subjectType"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("updated_at"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ServiceStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ServiceStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ServiceStatus is not found in the empty JSON string", ServiceStatus.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("created_at", "id", "progress", "requesterUserId", "state", "subjectId", "subjectType", "type", "updated_at")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ServiceStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ServiceStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ServiceStatus is not found in the empty JSON string", ServiceStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ServiceStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ServiceStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ServiceStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ServiceStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // ensure the required json array is present if (jsonObj.get("progress") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("progress").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `progress` to be an array in the JSON string but got `%s`", jsonObj.get("progress").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `progress` to be an array in the JSON string but got `%s`", jsonObj.get("progress").toString())); } if (!jsonObj.get("requesterUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `requesterUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requesterUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `requesterUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requesterUserId").toString())); } if (!jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } if (!jsonObj.get("subjectId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subjectId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subjectId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subjectId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subjectId").toString())); } if (!jsonObj.get("subjectType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subjectType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subjectType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subjectType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subjectType").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } @@ -461,31 +416,31 @@ public void write(JsonWriter out, ServiceStatus value) throws IOException { @Override public ServiceStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ServiceStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of ServiceStatus - * @throws IOException if the JSON string is invalid with respect to ServiceStatus - */ + /** + * Create an instance of ServiceStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServiceStatus + * @throws IOException if the JSON string is invalid with respect to ServiceStatus + */ public static ServiceStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ServiceStatus.class); } - /** - * Convert an instance of ServiceStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ServiceStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/ShareInventoryItemDirectRequest.java b/src/main/java/io/github/vrchatapi/model/ShareInventoryItemDirectRequest.java index 971d3d1e..277d83e2 100644 --- a/src/main/java/io/github/vrchatapi/model/ShareInventoryItemDirectRequest.java +++ b/src/main/java/io/github/vrchatapi/model/ShareInventoryItemDirectRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,66 +49,63 @@ /** * ShareInventoryItemDirectRequest */ -@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 ShareInventoryItemDirectRequest { public static final String SERIALIZED_NAME_ITEM_ID = "itemId"; @SerializedName(SERIALIZED_NAME_ITEM_ID) + @javax.annotation.Nonnull private String itemId; public static final String SERIALIZED_NAME_USERS = "users"; @SerializedName(SERIALIZED_NAME_USERS) + @javax.annotation.Nonnull private List users = new ArrayList<>(); public ShareInventoryItemDirectRequest() { } - public ShareInventoryItemDirectRequest itemId(String itemId) { - + public ShareInventoryItemDirectRequest itemId(@javax.annotation.Nonnull String itemId) { this.itemId = itemId; return this; } - /** + /** * Get itemId * @return itemId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "inv_10bce5b0-2d2b-44e0-900d-db6534615162", required = true, value = "") - public String getItemId() { return itemId; } - - public void setItemId(String itemId) { + public void setItemId(@javax.annotation.Nonnull String itemId) { this.itemId = itemId; } - public ShareInventoryItemDirectRequest users(List users) { - + public ShareInventoryItemDirectRequest users(@javax.annotation.Nonnull List users) { this.users = users; return this; } public ShareInventoryItemDirectRequest addUsersItem(String usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } this.users.add(usersItem); return this; } - /** + /** * Get users * @return users - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getUsers() { return users; } - - public void setUsers(List users) { + public void setUsers(@javax.annotation.Nonnull List users) { this.users = users; } @@ -147,10 +144,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -159,51 +153,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("itemId"); - openapiFields.add("users"); + openapiFields = new HashSet(Arrays.asList("itemId", "users")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("itemId"); - openapiRequiredFields.add("users"); + openapiRequiredFields = new HashSet(Arrays.asList("itemId", "users")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ShareInventoryItemDirectRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ShareInventoryItemDirectRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ShareInventoryItemDirectRequest is not found in the empty JSON string", ShareInventoryItemDirectRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ShareInventoryItemDirectRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ShareInventoryItemDirectRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ShareInventoryItemDirectRequest is not found in the empty JSON string", ShareInventoryItemDirectRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ShareInventoryItemDirectRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ShareInventoryItemDirectRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ShareInventoryItemDirectRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ShareInventoryItemDirectRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("itemId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `itemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("itemId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `itemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("itemId").toString())); } // ensure the required json array is present if (jsonObj.get("users") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("users").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); } } @@ -227,31 +218,31 @@ public void write(JsonWriter out, ShareInventoryItemDirectRequest value) throws @Override public ShareInventoryItemDirectRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of ShareInventoryItemDirectRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ShareInventoryItemDirectRequest - * @throws IOException if the JSON string is invalid with respect to ShareInventoryItemDirectRequest - */ + /** + * Create an instance of ShareInventoryItemDirectRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ShareInventoryItemDirectRequest + * @throws IOException if the JSON string is invalid with respect to ShareInventoryItemDirectRequest + */ public static ShareInventoryItemDirectRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ShareInventoryItemDirectRequest.class); } - /** - * Convert an instance of ShareInventoryItemDirectRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of ShareInventoryItemDirectRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/SortOption.java b/src/main/java/io/github/vrchatapi/model/SortOption.java index 36baf400..512ba241 100644 --- a/src/main/java/io/github/vrchatapi/model/SortOption.java +++ b/src/main/java/io/github/vrchatapi/model/SortOption.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -38,7 +38,7 @@ public enum SortOption { HEAT("heat"), - LABSPUBLICATIONDATE("labsPublicationDate"), + LABS_PUBLICATION_DATE("labsPublicationDate"), MAGIC("magic"), @@ -48,15 +48,15 @@ public enum SortOption { POPULARITY("popularity"), - PUBLICATIONDATE("publicationDate"), + PUBLICATION_DATE("publicationDate"), RANDOM("random"), RELEVANCE("relevance"), - REPORTCOUNT("reportCount"), + REPORT_COUNT("reportCount"), - REPORTSCORE("reportScore"), + REPORT_SCORE("reportScore"), SHUFFLE("shuffle"), @@ -100,5 +100,10 @@ public SortOption read(final JsonReader jsonReader) throws IOException { return SortOption.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SortOption.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/SortOptionProductPurchase.java b/src/main/java/io/github/vrchatapi/model/SortOptionProductPurchase.java index 469954f9..7be1f618 100644 --- a/src/main/java/io/github/vrchatapi/model/SortOptionProductPurchase.java +++ b/src/main/java/io/github/vrchatapi/model/SortOptionProductPurchase.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -28,7 +28,7 @@ @JsonAdapter(SortOptionProductPurchase.Adapter.class) public enum SortOptionProductPurchase { - PURCHASEDATE("purchaseDate"); + PURCHASE_DATE("purchaseDate"); private String value; @@ -66,5 +66,10 @@ public SortOptionProductPurchase read(final JsonReader jsonReader) throws IOExce return SortOptionProductPurchase.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SortOptionProductPurchase.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/Store.java b/src/main/java/io/github/vrchatapi/model/Store.java index 4071d51a..8b396352 100644 --- a/src/main/java/io/github/vrchatapi/model/Store.java +++ b/src/main/java/io/github/vrchatapi/model/Store.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,11 +22,10 @@ import io.github.vrchatapi.model.StoreContext; import io.github.vrchatapi.model.StoreShelf; import io.github.vrchatapi.model.StoreType; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -40,13 +38,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -54,200 +54,197 @@ /** * Store */ -@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 Store { public static final String SERIALIZED_NAME_CREATED = "created"; @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nullable private OffsetDateTime created; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_GROUP_ID = "groupId"; @SerializedName(SERIALIZED_NAME_GROUP_ID) + @javax.annotation.Nullable private String groupId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_LISTING_IDS = "listingIds"; @SerializedName(SERIALIZED_NAME_LISTING_IDS) - private List listingIds = null; + @javax.annotation.Nullable + private List listingIds = new ArrayList<>(); public static final String SERIALIZED_NAME_LISTINGS = "listings"; @SerializedName(SERIALIZED_NAME_LISTINGS) - private List listings = null; + @javax.annotation.Nullable + private List listings = new ArrayList<>(); public static final String SERIALIZED_NAME_SELLER_DISPLAY_NAME = "sellerDisplayName"; @SerializedName(SERIALIZED_NAME_SELLER_DISPLAY_NAME) + @javax.annotation.Nonnull private String sellerDisplayName; public static final String SERIALIZED_NAME_SELLER_ID = "sellerId"; @SerializedName(SERIALIZED_NAME_SELLER_ID) + @javax.annotation.Nonnull private String sellerId; public static final String SERIALIZED_NAME_SHELF_IDS = "shelfIds"; @SerializedName(SERIALIZED_NAME_SHELF_IDS) - private List shelfIds = null; + @javax.annotation.Nullable + private List shelfIds = new ArrayList<>(); public static final String SERIALIZED_NAME_SHELVES = "shelves"; @SerializedName(SERIALIZED_NAME_SHELVES) - private List shelves = null; + @javax.annotation.Nullable + private List shelves = new ArrayList<>(); public static final String SERIALIZED_NAME_STORE_CONTEXT = "storeContext"; @SerializedName(SERIALIZED_NAME_STORE_CONTEXT) + @javax.annotation.Nullable private StoreContext storeContext; public static final String SERIALIZED_NAME_STORE_ID = "storeId"; @SerializedName(SERIALIZED_NAME_STORE_ID) + @javax.annotation.Nonnull private String storeId; public static final String SERIALIZED_NAME_STORE_STATUS = "storeStatus"; @SerializedName(SERIALIZED_NAME_STORE_STATUS) + @javax.annotation.Nullable private String storeStatus; public static final String SERIALIZED_NAME_STORE_TYPE = "storeType"; @SerializedName(SERIALIZED_NAME_STORE_TYPE) + @javax.annotation.Nonnull private StoreType storeType = StoreType.GROUP; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_UPDATED = "updated"; @SerializedName(SERIALIZED_NAME_UPDATED) + @javax.annotation.Nullable private OffsetDateTime updated; public static final String SERIALIZED_NAME_WORLD_ID = "worldId"; @SerializedName(SERIALIZED_NAME_WORLD_ID) + @javax.annotation.Nullable private String worldId; public Store() { } - public Store created(OffsetDateTime created) { - + public Store created(@javax.annotation.Nullable OffsetDateTime created) { this.created = created; return this; } - /** + /** * Get created * @return created - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getCreated() { return created; } - - public void setCreated(OffsetDateTime created) { + public void setCreated(@javax.annotation.Nullable OffsetDateTime created) { this.created = created; } - public Store description(String description) { - + public Store description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public Store displayName(String displayName) { - + public Store displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public Store groupId(String groupId) { - + public Store groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } - /** + /** * Get groupId * @return groupId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "grp_71a7ff59-112c-4e78-a990-c7cc650776e5", value = "") - public String getGroupId() { return groupId; } - - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } - public Store id(String id) { - + public Store id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "esto_713b247d-2b5d-41a0-bba3-50db28dc1498", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Store listingIds(List listingIds) { - + public Store listingIds(@javax.annotation.Nullable List listingIds) { this.listingIds = listingIds; return this; } @@ -260,25 +257,21 @@ public Store addListingIdsItem(String listingIdsItem) { return this; } - /** + /** * Only for store type world and group * @return listingIds - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only for store type world and group") - public List getListingIds() { return listingIds; } - - public void setListingIds(List listingIds) { + public void setListingIds(@javax.annotation.Nullable List listingIds) { this.listingIds = listingIds; } - public Store listings(List listings) { - + public Store listings(@javax.annotation.Nullable List listings) { this.listings = listings; return this; } @@ -291,71 +284,59 @@ public Store addListingsItem(ProductListing listingsItem) { return this; } - /** + /** * Only for store type world and group * @return listings - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only for store type world and group") - public List getListings() { return listings; } - - public void setListings(List listings) { + public void setListings(@javax.annotation.Nullable List listings) { this.listings = listings; } - public Store sellerDisplayName(String sellerDisplayName) { - + public Store sellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { this.sellerDisplayName = sellerDisplayName; return this; } - /** + /** * Get sellerDisplayName * @return sellerDisplayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSellerDisplayName() { return sellerDisplayName; } - - public void setSellerDisplayName(String sellerDisplayName) { + public void setSellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { this.sellerDisplayName = sellerDisplayName; } - public Store sellerId(String sellerId) { - + public Store sellerId(@javax.annotation.Nonnull String sellerId) { this.sellerId = sellerId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return sellerId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getSellerId() { return sellerId; } - - public void setSellerId(String sellerId) { + public void setSellerId(@javax.annotation.Nonnull String sellerId) { this.sellerId = sellerId; } - public Store shelfIds(List shelfIds) { - + public Store shelfIds(@javax.annotation.Nullable List shelfIds) { this.shelfIds = shelfIds; return this; } @@ -368,25 +349,21 @@ public Store addShelfIdsItem(String shelfIdsItem) { return this; } - /** + /** * Only for store type house * @return shelfIds - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only for store type house") - public List getShelfIds() { return shelfIds; } - - public void setShelfIds(List shelfIds) { + public void setShelfIds(@javax.annotation.Nullable List shelfIds) { this.shelfIds = shelfIds; } - public Store shelves(List shelves) { - + public Store shelves(@javax.annotation.Nullable List shelves) { this.shelves = shelves; return this; } @@ -399,185 +376,157 @@ public Store addShelvesItem(StoreShelf shelvesItem) { return this; } - /** + /** * Only for store type house * @return shelves - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Only for store type house") - public List getShelves() { return shelves; } - - public void setShelves(List shelves) { + public void setShelves(@javax.annotation.Nullable List shelves) { this.shelves = shelves; } - public Store storeContext(StoreContext storeContext) { - + public Store storeContext(@javax.annotation.Nullable StoreContext storeContext) { this.storeContext = storeContext; return this; } - /** + /** * Get storeContext * @return storeContext - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public StoreContext getStoreContext() { return storeContext; } - - public void setStoreContext(StoreContext storeContext) { + public void setStoreContext(@javax.annotation.Nullable StoreContext storeContext) { this.storeContext = storeContext; } - public Store storeId(String storeId) { - + public Store storeId(@javax.annotation.Nonnull String storeId) { this.storeId = storeId; return this; } - /** + /** * Get storeId * @return storeId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "esto_713b247d-2b5d-41a0-bba3-50db28dc1498", required = true, value = "") - public String getStoreId() { return storeId; } - - public void setStoreId(String storeId) { + public void setStoreId(@javax.annotation.Nonnull String storeId) { this.storeId = storeId; } - public Store storeStatus(String storeStatus) { - + public Store storeStatus(@javax.annotation.Nullable String storeStatus) { this.storeStatus = storeStatus; return this; } - /** + /** * Get storeStatus * @return storeStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getStoreStatus() { return storeStatus; } - - public void setStoreStatus(String storeStatus) { + public void setStoreStatus(@javax.annotation.Nullable String storeStatus) { this.storeStatus = storeStatus; } - public Store storeType(StoreType storeType) { - + public Store storeType(@javax.annotation.Nonnull StoreType storeType) { this.storeType = storeType; return this; } - /** + /** * Get storeType * @return storeType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public StoreType getStoreType() { return storeType; } - - public void setStoreType(StoreType storeType) { + public void setStoreType(@javax.annotation.Nonnull StoreType storeType) { this.storeType = storeType; } - public Store tags(List tags) { - + public Store tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public Store addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public Store updated(OffsetDateTime updated) { - + public Store updated(@javax.annotation.Nullable OffsetDateTime updated) { this.updated = updated; return this; } - /** + /** * Get updated * @return updated - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getUpdated() { return updated; } - - public void setUpdated(OffsetDateTime updated) { + public void setUpdated(@javax.annotation.Nullable OffsetDateTime updated) { this.updated = updated; } - public Store worldId(String worldId) { - + public Store worldId(@javax.annotation.Nullable String worldId) { this.worldId = worldId; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return worldId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getWorldId() { return worldId; } - - public void setWorldId(String worldId) { + public void setWorldId(@javax.annotation.Nullable String worldId) { this.worldId = worldId; } @@ -648,10 +597,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -660,137 +606,114 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created"); - openapiFields.add("description"); - openapiFields.add("displayName"); - openapiFields.add("groupId"); - openapiFields.add("id"); - openapiFields.add("listingIds"); - openapiFields.add("listings"); - openapiFields.add("sellerDisplayName"); - openapiFields.add("sellerId"); - openapiFields.add("shelfIds"); - openapiFields.add("shelves"); - openapiFields.add("storeContext"); - openapiFields.add("storeId"); - openapiFields.add("storeStatus"); - openapiFields.add("storeType"); - openapiFields.add("tags"); - openapiFields.add("updated"); - openapiFields.add("worldId"); + openapiFields = new HashSet(Arrays.asList("created", "description", "displayName", "groupId", "id", "listingIds", "listings", "sellerDisplayName", "sellerId", "shelfIds", "shelves", "storeContext", "storeId", "storeStatus", "storeType", "tags", "updated", "worldId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("sellerDisplayName"); - openapiRequiredFields.add("sellerId"); - openapiRequiredFields.add("storeId"); - openapiRequiredFields.add("storeType"); - openapiRequiredFields.add("tags"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Store - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Store.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Store is not found in the empty JSON string", Store.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("description", "displayName", "id", "sellerDisplayName", "sellerId", "storeId", "storeType", "tags")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Store + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Store.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Store is not found in the empty JSON string", Store.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Store.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Store` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Store` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Store.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("groupId") != null && !jsonObj.get("groupId").isJsonNull()) && !jsonObj.get("groupId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `groupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupId").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("listingIds") != null && !jsonObj.get("listingIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `listingIds` to be an array in the JSON string but got `%s`", jsonObj.get("listingIds").toString())); + if (jsonObj.get("listingIds") != null && !jsonObj.get("listingIds").isJsonNull() && !jsonObj.get("listingIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingIds` to be an array in the JSON string but got `%s`", jsonObj.get("listingIds").toString())); } if (jsonObj.get("listings") != null && !jsonObj.get("listings").isJsonNull()) { JsonArray jsonArraylistings = jsonObj.getAsJsonArray("listings"); if (jsonArraylistings != null) { // ensure the json data is an array if (!jsonObj.get("listings").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `listings` to be an array in the JSON string but got `%s`", jsonObj.get("listings").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listings` to be an array in the JSON string but got `%s`", jsonObj.get("listings").toString())); } // validate the optional field `listings` (array) for (int i = 0; i < jsonArraylistings.size(); i++) { - ProductListing.validateJsonObject(jsonArraylistings.get(i).getAsJsonObject()); + ProductListing.validateJsonElement(jsonArraylistings.get(i)); }; } } if (!jsonObj.get("sellerDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sellerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sellerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerDisplayName").toString())); } if (!jsonObj.get("sellerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("shelfIds") != null && !jsonObj.get("shelfIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `shelfIds` to be an array in the JSON string but got `%s`", jsonObj.get("shelfIds").toString())); + if (jsonObj.get("shelfIds") != null && !jsonObj.get("shelfIds").isJsonNull() && !jsonObj.get("shelfIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shelfIds` to be an array in the JSON string but got `%s`", jsonObj.get("shelfIds").toString())); } if (jsonObj.get("shelves") != null && !jsonObj.get("shelves").isJsonNull()) { JsonArray jsonArrayshelves = jsonObj.getAsJsonArray("shelves"); if (jsonArrayshelves != null) { // ensure the json data is an array if (!jsonObj.get("shelves").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `shelves` to be an array in the JSON string but got `%s`", jsonObj.get("shelves").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shelves` to be an array in the JSON string but got `%s`", jsonObj.get("shelves").toString())); } // validate the optional field `shelves` (array) for (int i = 0; i < jsonArrayshelves.size(); i++) { - StoreShelf.validateJsonObject(jsonArrayshelves.get(i).getAsJsonObject()); + StoreShelf.validateJsonElement(jsonArrayshelves.get(i)); }; } } // validate the optional field `storeContext` if (jsonObj.get("storeContext") != null && !jsonObj.get("storeContext").isJsonNull()) { - StoreContext.validateJsonObject(jsonObj.getAsJsonObject("storeContext")); + StoreContext.validateJsonElement(jsonObj.get("storeContext")); } if (!jsonObj.get("storeId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `storeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storeId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `storeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storeId").toString())); } if ((jsonObj.get("storeStatus") != null && !jsonObj.get("storeStatus").isJsonNull()) && !jsonObj.get("storeStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `storeStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storeStatus").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `storeStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storeStatus").toString())); } + // validate the required field `storeType` + StoreType.validateJsonElement(jsonObj.get("storeType")); // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("worldId") != null && !jsonObj.get("worldId").isJsonNull()) && !jsonObj.get("worldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); } } @@ -814,31 +737,31 @@ public void write(JsonWriter out, Store value) throws IOException { @Override public Store read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Store given an JSON string - * - * @param jsonString JSON string - * @return An instance of Store - * @throws IOException if the JSON string is invalid with respect to Store - */ + /** + * Create an instance of Store given an JSON string + * + * @param jsonString JSON string + * @return An instance of Store + * @throws IOException if the JSON string is invalid with respect to Store + */ public static Store fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Store.class); } - /** - * Convert an instance of Store to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Store to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/StoreContext.java b/src/main/java/io/github/vrchatapi/model/StoreContext.java index 76fefba4..1467a472 100644 --- a/src/main/java/io/github/vrchatapi/model/StoreContext.java +++ b/src/main/java/io/github/vrchatapi/model/StoreContext.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,88 +47,79 @@ /** * StoreContext */ -@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 StoreContext { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public StoreContext() { } - public StoreContext id(String id) { - + public StoreContext id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public StoreContext imageUrl(String imageUrl) { - + public StoreContext imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public StoreContext name(String name) { - + public StoreContext name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } @@ -169,10 +160,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -181,53 +169,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("name"); + openapiFields = new HashSet(Arrays.asList("id", "imageUrl", "name")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("name"); + openapiRequiredFields = new HashSet(Arrays.asList("id", "imageUrl", "name")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to StoreContext - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StoreContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StoreContext is not found in the empty JSON string", StoreContext.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StoreContext + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StoreContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in StoreContext is not found in the empty JSON string", StoreContext.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!StoreContext.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StoreContext` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `StoreContext` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : StoreContext.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } @@ -251,31 +234,31 @@ public void write(JsonWriter out, StoreContext value) throws IOException { @Override public StoreContext read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of StoreContext given an JSON string - * - * @param jsonString JSON string - * @return An instance of StoreContext - * @throws IOException if the JSON string is invalid with respect to StoreContext - */ + /** + * Create an instance of StoreContext given an JSON string + * + * @param jsonString JSON string + * @return An instance of StoreContext + * @throws IOException if the JSON string is invalid with respect to StoreContext + */ public static StoreContext fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, StoreContext.class); } - /** - * Convert an instance of StoreContext to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of StoreContext to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/StoreShelf.java b/src/main/java/io/github/vrchatapi/model/StoreShelf.java index fd28bb92..51060be1 100644 --- a/src/main/java/io/github/vrchatapi/model/StoreShelf.java +++ b/src/main/java/io/github/vrchatapi/model/StoreShelf.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,18 +13,16 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ProductListing; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,146 +51,141 @@ /** * StoreShelf */ -@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 StoreShelf { public static final String SERIALIZED_NAME_HIGHLIGHT_LISTING = "highlightListing"; @SerializedName(SERIALIZED_NAME_HIGHLIGHT_LISTING) + @javax.annotation.Nullable private ProductListing highlightListing; public static final String SERIALIZED_NAME_HIGHLIGHT_LISTING_ID = "highlightListingId"; @SerializedName(SERIALIZED_NAME_HIGHLIGHT_LISTING_ID) + @javax.annotation.Nullable private String highlightListingId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_LISTING_IDS = "listingIds"; @SerializedName(SERIALIZED_NAME_LISTING_IDS) + @javax.annotation.Nonnull private List listingIds = new ArrayList<>(); public static final String SERIALIZED_NAME_LISTINGS = "listings"; @SerializedName(SERIALIZED_NAME_LISTINGS) - private List listings = null; + @javax.annotation.Nullable + private List listings = new ArrayList<>(); public static final String SERIALIZED_NAME_SHELF_DESCRIPTION = "shelfDescription"; @SerializedName(SERIALIZED_NAME_SHELF_DESCRIPTION) + @javax.annotation.Nonnull private String shelfDescription; public static final String SERIALIZED_NAME_SHELF_LAYOUT = "shelfLayout"; @SerializedName(SERIALIZED_NAME_SHELF_LAYOUT) + @javax.annotation.Nonnull private String shelfLayout; public static final String SERIALIZED_NAME_SHELF_TITLE = "shelfTitle"; @SerializedName(SERIALIZED_NAME_SHELF_TITLE) + @javax.annotation.Nonnull private String shelfTitle; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public StoreShelf() { } - public StoreShelf highlightListing(ProductListing highlightListing) { - + public StoreShelf highlightListing(@javax.annotation.Nullable ProductListing highlightListing) { this.highlightListing = highlightListing; return this; } - /** + /** * Get highlightListing * @return highlightListing - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ProductListing getHighlightListing() { return highlightListing; } - - public void setHighlightListing(ProductListing highlightListing) { + public void setHighlightListing(@javax.annotation.Nullable ProductListing highlightListing) { this.highlightListing = highlightListing; } - public StoreShelf highlightListingId(String highlightListingId) { - + public StoreShelf highlightListingId(@javax.annotation.Nullable String highlightListingId) { this.highlightListingId = highlightListingId; return this; } - /** + /** * Get highlightListingId * @return highlightListingId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "prod_bfbc2315-247a-44d7-bfea-5237f8d56cb4", value = "") - public String getHighlightListingId() { return highlightListingId; } - - public void setHighlightListingId(String highlightListingId) { + public void setHighlightListingId(@javax.annotation.Nullable String highlightListingId) { this.highlightListingId = highlightListingId; } - public StoreShelf id(String id) { - + public StoreShelf id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "ess_964dd7aa-f881-4ba1-adf7-261e906b9189", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public StoreShelf listingIds(List listingIds) { - + public StoreShelf listingIds(@javax.annotation.Nonnull List listingIds) { this.listingIds = listingIds; return this; } public StoreShelf addListingIdsItem(String listingIdsItem) { + if (this.listingIds == null) { + this.listingIds = new ArrayList<>(); + } this.listingIds.add(listingIdsItem); return this; } - /** + /** * Get listingIds * @return listingIds - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getListingIds() { return listingIds; } - - public void setListingIds(List listingIds) { + public void setListingIds(@javax.annotation.Nonnull List listingIds) { this.listingIds = listingIds; } - public StoreShelf listings(List listings) { - + public StoreShelf listings(@javax.annotation.Nullable List listings) { this.listings = listings; return this; } @@ -203,111 +198,92 @@ public StoreShelf addListingsItem(ProductListing listingsItem) { return this; } - /** + /** * Get listings * @return listings - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getListings() { return listings; } - - public void setListings(List listings) { + public void setListings(@javax.annotation.Nullable List listings) { this.listings = listings; } - public StoreShelf shelfDescription(String shelfDescription) { - + public StoreShelf shelfDescription(@javax.annotation.Nonnull String shelfDescription) { this.shelfDescription = shelfDescription; return this; } - /** + /** * Get shelfDescription * @return shelfDescription - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getShelfDescription() { return shelfDescription; } - - public void setShelfDescription(String shelfDescription) { + public void setShelfDescription(@javax.annotation.Nonnull String shelfDescription) { this.shelfDescription = shelfDescription; } - public StoreShelf shelfLayout(String shelfLayout) { - + public StoreShelf shelfLayout(@javax.annotation.Nonnull String shelfLayout) { this.shelfLayout = shelfLayout; return this; } - /** + /** * Get shelfLayout * @return shelfLayout - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getShelfLayout() { return shelfLayout; } - - public void setShelfLayout(String shelfLayout) { + public void setShelfLayout(@javax.annotation.Nonnull String shelfLayout) { this.shelfLayout = shelfLayout; } - public StoreShelf shelfTitle(String shelfTitle) { - + public StoreShelf shelfTitle(@javax.annotation.Nonnull String shelfTitle) { this.shelfTitle = shelfTitle; return this; } - /** + /** * Get shelfTitle * @return shelfTitle - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getShelfTitle() { return shelfTitle; } - - public void setShelfTitle(String shelfTitle) { + public void setShelfTitle(@javax.annotation.Nonnull String shelfTitle) { this.shelfTitle = shelfTitle; } - public StoreShelf updatedAt(OffsetDateTime updatedAt) { - + public StoreShelf updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -360,10 +336,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -372,92 +345,78 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("highlightListing"); - openapiFields.add("highlightListingId"); - openapiFields.add("id"); - openapiFields.add("listingIds"); - openapiFields.add("listings"); - openapiFields.add("shelfDescription"); - openapiFields.add("shelfLayout"); - openapiFields.add("shelfTitle"); - openapiFields.add("updatedAt"); + openapiFields = new HashSet(Arrays.asList("highlightListing", "highlightListingId", "id", "listingIds", "listings", "shelfDescription", "shelfLayout", "shelfTitle", "updatedAt")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("listingIds"); - openapiRequiredFields.add("shelfDescription"); - openapiRequiredFields.add("shelfLayout"); - openapiRequiredFields.add("shelfTitle"); - openapiRequiredFields.add("updatedAt"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to StoreShelf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StoreShelf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StoreShelf is not found in the empty JSON string", StoreShelf.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("id", "listingIds", "shelfDescription", "shelfLayout", "shelfTitle", "updatedAt")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StoreShelf + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StoreShelf.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in StoreShelf is not found in the empty JSON string", StoreShelf.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!StoreShelf.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StoreShelf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `StoreShelf` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : StoreShelf.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `highlightListing` if (jsonObj.get("highlightListing") != null && !jsonObj.get("highlightListing").isJsonNull()) { - ProductListing.validateJsonObject(jsonObj.getAsJsonObject("highlightListing")); + ProductListing.validateJsonElement(jsonObj.get("highlightListing")); } if ((jsonObj.get("highlightListingId") != null && !jsonObj.get("highlightListingId").isJsonNull()) && !jsonObj.get("highlightListingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `highlightListingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("highlightListingId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `highlightListingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("highlightListingId").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // ensure the required json array is present if (jsonObj.get("listingIds") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("listingIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `listingIds` to be an array in the JSON string but got `%s`", jsonObj.get("listingIds").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listingIds` to be an array in the JSON string but got `%s`", jsonObj.get("listingIds").toString())); } if (jsonObj.get("listings") != null && !jsonObj.get("listings").isJsonNull()) { JsonArray jsonArraylistings = jsonObj.getAsJsonArray("listings"); if (jsonArraylistings != null) { // ensure the json data is an array if (!jsonObj.get("listings").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `listings` to be an array in the JSON string but got `%s`", jsonObj.get("listings").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `listings` to be an array in the JSON string but got `%s`", jsonObj.get("listings").toString())); } // validate the optional field `listings` (array) for (int i = 0; i < jsonArraylistings.size(); i++) { - ProductListing.validateJsonObject(jsonArraylistings.get(i).getAsJsonObject()); + ProductListing.validateJsonElement(jsonArraylistings.get(i)); }; } } if (!jsonObj.get("shelfDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `shelfDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shelfDescription").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shelfDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shelfDescription").toString())); } if (!jsonObj.get("shelfLayout").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `shelfLayout` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shelfLayout").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shelfLayout` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shelfLayout").toString())); } if (!jsonObj.get("shelfTitle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `shelfTitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shelfTitle").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shelfTitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shelfTitle").toString())); } } @@ -481,31 +440,31 @@ public void write(JsonWriter out, StoreShelf value) throws IOException { @Override public StoreShelf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of StoreShelf given an JSON string - * - * @param jsonString JSON string - * @return An instance of StoreShelf - * @throws IOException if the JSON string is invalid with respect to StoreShelf - */ + /** + * Create an instance of StoreShelf given an JSON string + * + * @param jsonString JSON string + * @return An instance of StoreShelf + * @throws IOException if the JSON string is invalid with respect to StoreShelf + */ public static StoreShelf fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, StoreShelf.class); } - /** - * Convert an instance of StoreShelf to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of StoreShelf to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/StoreType.java b/src/main/java/io/github/vrchatapi/model/StoreType.java index 4ee87476..80d5448a 100644 --- a/src/main/java/io/github/vrchatapi/model/StoreType.java +++ b/src/main/java/io/github/vrchatapi/model/StoreType.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -70,5 +70,10 @@ public StoreType read(final JsonReader jsonReader) throws IOException { return StoreType.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StoreType.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/StoreView.java b/src/main/java/io/github/vrchatapi/model/StoreView.java index 358b97f4..22a782d9 100644 --- a/src/main/java/io/github/vrchatapi/model/StoreView.java +++ b/src/main/java/io/github/vrchatapi/model/StoreView.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -36,7 +36,7 @@ public enum StoreView { PUBLIC("public"), - PUBLICPREVIEW("publicPreview"); + PUBLIC_PREVIEW("publicPreview"); private String value; @@ -74,5 +74,10 @@ public StoreView read(final JsonReader jsonReader) throws IOException { return StoreView.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StoreView.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequest.java b/src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequest.java index db31f8d1..f12b11fd 100644 --- a/src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequest.java +++ b/src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.SubmitModerationReportRequestDetails; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,170 +48,151 @@ /** * Pseudocode steps to build a request with a valid combination: request = {} config = json.parse(GET /config) valid_types = config.reportOptions.keys request.type = select_one(valid_types, (id) => { text: id, tooltip: \"\" }) valid_categories = config.reportOptions[request.type].keys request.category = select_one(valid_categories, (id) => config.reportCategories[id]) valid_reasons = config.reportOptions[request.type][request.category] request.reason = select_one(valid_reasons, (id) => config.reportReasons[id]) request.contentId = relevant_id_of_type(request.type) request.details = relevant_details_based_on_type(request.type) request.description = input_string() */ -@ApiModel(description = "Pseudocode steps to build a request with a valid combination: request = {} config = json.parse(GET /config) valid_types = config.reportOptions.keys request.type = select_one(valid_types, (id) => { text: id, tooltip: \"\" }) valid_categories = config.reportOptions[request.type].keys request.category = select_one(valid_categories, (id) => config.reportCategories[id]) valid_reasons = config.reportOptions[request.type][request.category] request.reason = select_one(valid_reasons, (id) => config.reportReasons[id]) request.contentId = relevant_id_of_type(request.type) request.details = relevant_details_based_on_type(request.type) request.description = input_string()") -@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 SubmitModerationReportRequest { public static final String SERIALIZED_NAME_CATEGORY = "category"; @SerializedName(SERIALIZED_NAME_CATEGORY) + @javax.annotation.Nonnull private String category; public static final String SERIALIZED_NAME_CONTENT_ID = "contentId"; @SerializedName(SERIALIZED_NAME_CONTENT_ID) + @javax.annotation.Nonnull private String contentId; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_DETAILS = "details"; @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nullable private SubmitModerationReportRequestDetails details; public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nonnull private String reason; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull private String type; public SubmitModerationReportRequest() { } - public SubmitModerationReportRequest category(String category) { - + public SubmitModerationReportRequest category(@javax.annotation.Nonnull String category) { this.category = category; return this; } - /** + /** * Valid values are the keys of the object `$.reportOptions[type]` from `GET /config`. Descriptions of these are found at `$.reportCategories[type]`. * @return category - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "behavior", required = true, value = "Valid values are the keys of the object `$.reportOptions[type]` from `GET /config`. Descriptions of these are found at `$.reportCategories[type]`.") - public String getCategory() { return category; } - - public void setCategory(String category) { + public void setCategory(@javax.annotation.Nonnull String category) { this.category = category; } - public SubmitModerationReportRequest contentId(String contentId) { - + public SubmitModerationReportRequest contentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; return this; } - /** + /** * The id of the user, group, world, avatar, inventory item, print, etc. being reported. * @return contentId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "The id of the user, group, world, avatar, inventory item, print, etc. being reported.") - public String getContentId() { return contentId; } - - public void setContentId(String contentId) { + public void setContentId(@javax.annotation.Nonnull String contentId) { this.contentId = contentId; } - public SubmitModerationReportRequest description(String description) { - + public SubmitModerationReportRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * The subjective reason for the report * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "iz bulli", value = "The subjective reason for the report") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public SubmitModerationReportRequest details(SubmitModerationReportRequestDetails details) { - + public SubmitModerationReportRequest details(@javax.annotation.Nullable SubmitModerationReportRequestDetails details) { this.details = details; return this; } - /** + /** * Get details * @return details - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public SubmitModerationReportRequestDetails getDetails() { return details; } - - public void setDetails(SubmitModerationReportRequestDetails details) { + public void setDetails(@javax.annotation.Nullable SubmitModerationReportRequestDetails details) { this.details = details; } - public SubmitModerationReportRequest reason(String reason) { - + public SubmitModerationReportRequest reason(@javax.annotation.Nonnull String reason) { this.reason = reason; return this; } - /** + /** * Valid values are the strings in the array `$.reportOptions[type][category]` from `GET /config`. Descriptions of these are found at `$.reportReasons[type]`. * @return reason - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "child", required = true, value = "Valid values are the strings in the array `$.reportOptions[type][category]` from `GET /config`. Descriptions of these are found at `$.reportReasons[type]`.") - public String getReason() { return reason; } - - public void setReason(String reason) { + public void setReason(@javax.annotation.Nonnull String reason) { this.reason = reason; } - public SubmitModerationReportRequest type(String type) { - + public SubmitModerationReportRequest type(@javax.annotation.Nonnull String type) { this.type = type; return this; } - /** + /** * Valid values are the keys of the object `$.reportOptions` from `GET /config`. * @return type - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "user", required = true, value = "Valid values are the keys of the object `$.reportOptions` from `GET /config`.") - public String getType() { return type; } - - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } @@ -258,10 +239,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -270,67 +248,58 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("category"); - openapiFields.add("contentId"); - openapiFields.add("description"); - openapiFields.add("details"); - openapiFields.add("reason"); - openapiFields.add("type"); + openapiFields = new HashSet(Arrays.asList("category", "contentId", "description", "details", "reason", "type")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("category"); - openapiRequiredFields.add("contentId"); - openapiRequiredFields.add("reason"); - openapiRequiredFields.add("type"); + openapiRequiredFields = new HashSet(Arrays.asList("category", "contentId", "reason", "type")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SubmitModerationReportRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SubmitModerationReportRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SubmitModerationReportRequest is not found in the empty JSON string", SubmitModerationReportRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SubmitModerationReportRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SubmitModerationReportRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SubmitModerationReportRequest is not found in the empty JSON string", SubmitModerationReportRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!SubmitModerationReportRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SubmitModerationReportRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `SubmitModerationReportRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : SubmitModerationReportRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("category").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); } if (!jsonObj.get("contentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the optional field `details` if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { - SubmitModerationReportRequestDetails.validateJsonObject(jsonObj.getAsJsonObject("details")); + SubmitModerationReportRequestDetails.validateJsonElement(jsonObj.get("details")); } if (!jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } @@ -354,31 +323,31 @@ public void write(JsonWriter out, SubmitModerationReportRequest value) throws IO @Override public SubmitModerationReportRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SubmitModerationReportRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SubmitModerationReportRequest - * @throws IOException if the JSON string is invalid with respect to SubmitModerationReportRequest - */ + /** + * Create an instance of SubmitModerationReportRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SubmitModerationReportRequest + * @throws IOException if the JSON string is invalid with respect to SubmitModerationReportRequest + */ public static SubmitModerationReportRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SubmitModerationReportRequest.class); } - /** - * Convert an instance of SubmitModerationReportRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SubmitModerationReportRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequestDetails.java b/src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequestDetails.java index 76b3f117..f22d91c3 100644 --- a/src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequestDetails.java +++ b/src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequestDetails.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ContentFilter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,157 +50,142 @@ /** * Relevant details specific to the type of the report. `fileId` is for the image file attached to an inventory item, such as an emoji. `holderId` is for the user who owns an inventory item, such as a emoji. */ -@ApiModel(description = "Relevant details specific to the type of the report. `fileId` is for the image file attached to an inventory item, such as an emoji. `holderId` is for the user who owns an inventory item, such as a emoji.") -@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 SubmitModerationReportRequestDetails { public static final String SERIALIZED_NAME_FILE_ID = "fileId"; @SerializedName(SERIALIZED_NAME_FILE_ID) + @javax.annotation.Nullable private String fileId; public static final String SERIALIZED_NAME_HOLDER_ID = "holderId"; @SerializedName(SERIALIZED_NAME_HOLDER_ID) + @javax.annotation.Nullable private String holderId; public static final String SERIALIZED_NAME_IMAGE_TYPE = "imageType"; @SerializedName(SERIALIZED_NAME_IMAGE_TYPE) + @javax.annotation.Nullable private String imageType; public static final String SERIALIZED_NAME_INSTANCE_AGE_GATED = "instanceAgeGated"; @SerializedName(SERIALIZED_NAME_INSTANCE_AGE_GATED) + @javax.annotation.Nullable private Boolean instanceAgeGated; public static final String SERIALIZED_NAME_INSTANCE_TYPE = "instanceType"; @SerializedName(SERIALIZED_NAME_INSTANCE_TYPE) + @javax.annotation.Nullable private String instanceType; public static final String SERIALIZED_NAME_SUGGESTED_WARNINGS = "suggestedWarnings"; @SerializedName(SERIALIZED_NAME_SUGGESTED_WARNINGS) - private List suggestedWarnings = null; + @javax.annotation.Nullable + private List suggestedWarnings = new ArrayList<>(); public static final String SERIALIZED_NAME_USER_IN_SAME_INSTANCE = "userInSameInstance"; @SerializedName(SERIALIZED_NAME_USER_IN_SAME_INSTANCE) + @javax.annotation.Nullable private Boolean userInSameInstance; public SubmitModerationReportRequestDetails() { } - public SubmitModerationReportRequestDetails fileId(String fileId) { - + public SubmitModerationReportRequestDetails fileId(@javax.annotation.Nullable String fileId) { this.fileId = fileId; return this; } - /** + /** * Get fileId * @return fileId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getFileId() { return fileId; } - - public void setFileId(String fileId) { + public void setFileId(@javax.annotation.Nullable String fileId) { this.fileId = fileId; } - public SubmitModerationReportRequestDetails holderId(String holderId) { - + public SubmitModerationReportRequestDetails holderId(@javax.annotation.Nullable String holderId) { this.holderId = holderId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return holderId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getHolderId() { return holderId; } - - public void setHolderId(String holderId) { + public void setHolderId(@javax.annotation.Nullable String holderId) { this.holderId = holderId; } - public SubmitModerationReportRequestDetails imageType(String imageType) { - + public SubmitModerationReportRequestDetails imageType(@javax.annotation.Nullable String imageType) { this.imageType = imageType; return this; } - /** + /** * Relevant detail for reports about image content, such as emoji. * @return imageType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Relevant detail for reports about image content, such as emoji.") - public String getImageType() { return imageType; } - - public void setImageType(String imageType) { + public void setImageType(@javax.annotation.Nullable String imageType) { this.imageType = imageType; } - public SubmitModerationReportRequestDetails instanceAgeGated(Boolean instanceAgeGated) { - + public SubmitModerationReportRequestDetails instanceAgeGated(@javax.annotation.Nullable Boolean instanceAgeGated) { this.instanceAgeGated = instanceAgeGated; return this; } - /** + /** * Relevant detail for reports taking place from within an instance. * @return instanceAgeGated - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Relevant detail for reports taking place from within an instance.") - public Boolean getInstanceAgeGated() { return instanceAgeGated; } - - public void setInstanceAgeGated(Boolean instanceAgeGated) { + public void setInstanceAgeGated(@javax.annotation.Nullable Boolean instanceAgeGated) { this.instanceAgeGated = instanceAgeGated; } - public SubmitModerationReportRequestDetails instanceType(String instanceType) { - + public SubmitModerationReportRequestDetails instanceType(@javax.annotation.Nullable String instanceType) { this.instanceType = instanceType; return this; } - /** + /** * Relevant detail for reports taking place from within an instance. * @return instanceType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Relevant detail for reports taking place from within an instance.") - public String getInstanceType() { return instanceType; } - - public void setInstanceType(String instanceType) { + public void setInstanceType(@javax.annotation.Nullable String instanceType) { this.instanceType = instanceType; } - public SubmitModerationReportRequestDetails suggestedWarnings(List suggestedWarnings) { - + public SubmitModerationReportRequestDetails suggestedWarnings(@javax.annotation.Nullable List suggestedWarnings) { this.suggestedWarnings = suggestedWarnings; return this; } @@ -213,42 +198,35 @@ public SubmitModerationReportRequestDetails addSuggestedWarningsItem(ContentFilt return this; } - /** + /** * Relevant detail for reports about content that might not be tagged properly. * @return suggestedWarnings - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Relevant detail for reports about content that might not be tagged properly.") - public List getSuggestedWarnings() { return suggestedWarnings; } - - public void setSuggestedWarnings(List suggestedWarnings) { + public void setSuggestedWarnings(@javax.annotation.Nullable List suggestedWarnings) { this.suggestedWarnings = suggestedWarnings; } - public SubmitModerationReportRequestDetails userInSameInstance(Boolean userInSameInstance) { - + public SubmitModerationReportRequestDetails userInSameInstance(@javax.annotation.Nullable Boolean userInSameInstance) { this.userInSameInstance = userInSameInstance; return this; } - /** + /** * Relevant detail for reports involving another user in the same instance world. * @return userInSameInstance - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Relevant detail for reports involving another user in the same instance world.") - public Boolean getUserInSameInstance() { return userInSameInstance; } - - public void setUserInSameInstance(Boolean userInSameInstance) { + public void setUserInSameInstance(@javax.annotation.Nullable Boolean userInSameInstance) { this.userInSameInstance = userInSameInstance; } @@ -297,10 +275,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -309,54 +284,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fileId"); - openapiFields.add("holderId"); - openapiFields.add("imageType"); - openapiFields.add("instanceAgeGated"); - openapiFields.add("instanceType"); - openapiFields.add("suggestedWarnings"); - openapiFields.add("userInSameInstance"); + openapiFields = new HashSet(Arrays.asList("fileId", "holderId", "imageType", "instanceAgeGated", "instanceType", "suggestedWarnings", "userInSameInstance")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SubmitModerationReportRequestDetails - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SubmitModerationReportRequestDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SubmitModerationReportRequestDetails is not found in the empty JSON string", SubmitModerationReportRequestDetails.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SubmitModerationReportRequestDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SubmitModerationReportRequestDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SubmitModerationReportRequestDetails is not found in the empty JSON string", SubmitModerationReportRequestDetails.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!SubmitModerationReportRequestDetails.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SubmitModerationReportRequestDetails` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `SubmitModerationReportRequestDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fileId") != null && !jsonObj.get("fileId").isJsonNull()) && !jsonObj.get("fileId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `fileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileId").toString())); } if ((jsonObj.get("holderId") != null && !jsonObj.get("holderId").isJsonNull()) && !jsonObj.get("holderId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `holderId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("holderId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `holderId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("holderId").toString())); } if ((jsonObj.get("imageType") != null && !jsonObj.get("imageType").isJsonNull()) && !jsonObj.get("imageType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageType").toString())); } if ((jsonObj.get("instanceType") != null && !jsonObj.get("instanceType").isJsonNull()) && !jsonObj.get("instanceType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `instanceType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `instanceType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceType").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("suggestedWarnings") != null && !jsonObj.get("suggestedWarnings").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `suggestedWarnings` to be an array in the JSON string but got `%s`", jsonObj.get("suggestedWarnings").toString())); + if (jsonObj.get("suggestedWarnings") != null && !jsonObj.get("suggestedWarnings").isJsonNull() && !jsonObj.get("suggestedWarnings").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `suggestedWarnings` to be an array in the JSON string but got `%s`", jsonObj.get("suggestedWarnings").toString())); } } @@ -380,31 +349,31 @@ public void write(JsonWriter out, SubmitModerationReportRequestDetails value) th @Override public SubmitModerationReportRequestDetails read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SubmitModerationReportRequestDetails given an JSON string - * - * @param jsonString JSON string - * @return An instance of SubmitModerationReportRequestDetails - * @throws IOException if the JSON string is invalid with respect to SubmitModerationReportRequestDetails - */ + /** + * Create an instance of SubmitModerationReportRequestDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of SubmitModerationReportRequestDetails + * @throws IOException if the JSON string is invalid with respect to SubmitModerationReportRequestDetails + */ public static SubmitModerationReportRequestDetails fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SubmitModerationReportRequestDetails.class); } - /** - * Convert an instance of SubmitModerationReportRequestDetails to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SubmitModerationReportRequestDetails to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Subscription.java b/src/main/java/io/github/vrchatapi/model/Subscription.java index 0bca2e89..f009745a 100644 --- a/src/main/java/io/github/vrchatapi/model/Subscription.java +++ b/src/main/java/io/github/vrchatapi/model/Subscription.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.SubscriptionPeriod; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,305 +49,271 @@ /** * */ -@ApiModel(description = "") -@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 Subscription { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) + @javax.annotation.Nonnull private BigDecimal amount; public static final String SERIALIZED_NAME_APPLE_PRODUCT_ID = "appleProductId"; @SerializedName(SERIALIZED_NAME_APPLE_PRODUCT_ID) + @javax.annotation.Nullable private String appleProductId; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_GOOGLE_PLAN_ID = "googlePlanId"; @SerializedName(SERIALIZED_NAME_GOOGLE_PLAN_ID) + @javax.annotation.Nullable private String googlePlanId; public static final String SERIALIZED_NAME_GOOGLE_PRODUCT_ID = "googleProductId"; @SerializedName(SERIALIZED_NAME_GOOGLE_PRODUCT_ID) + @javax.annotation.Nullable private String googleProductId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_OCULUS_SKU = "oculusSku"; @SerializedName(SERIALIZED_NAME_OCULUS_SKU) + @javax.annotation.Nullable private String oculusSku; public static final String SERIALIZED_NAME_PERIOD = "period"; @SerializedName(SERIALIZED_NAME_PERIOD) + @javax.annotation.Nonnull private SubscriptionPeriod period = SubscriptionPeriod.MONTH; public static final String SERIALIZED_NAME_PICO_SKU = "picoSku"; @SerializedName(SERIALIZED_NAME_PICO_SKU) + @javax.annotation.Nullable private String picoSku; public static final String SERIALIZED_NAME_STEAM_ITEM_ID = "steamItemId"; @SerializedName(SERIALIZED_NAME_STEAM_ITEM_ID) + @javax.annotation.Nonnull private String steamItemId; public static final String SERIALIZED_NAME_TIER = "tier"; @SerializedName(SERIALIZED_NAME_TIER) + @javax.annotation.Nonnull private Integer tier; public Subscription() { } - public Subscription amount(BigDecimal amount) { - + public Subscription amount(@javax.annotation.Nonnull BigDecimal amount) { this.amount = amount; return this; } - /** + /** * Get amount * @return amount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public BigDecimal getAmount() { return amount; } - - public void setAmount(BigDecimal amount) { + public void setAmount(@javax.annotation.Nonnull BigDecimal amount) { this.amount = amount; } - public Subscription appleProductId(String appleProductId) { - + public Subscription appleProductId(@javax.annotation.Nullable String appleProductId) { this.appleProductId = appleProductId; return this; } - /** + /** * Get appleProductId * @return appleProductId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAppleProductId() { return appleProductId; } - - public void setAppleProductId(String appleProductId) { + public void setAppleProductId(@javax.annotation.Nullable String appleProductId) { this.appleProductId = appleProductId; } - public Subscription description(String description) { - + public Subscription description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public Subscription googlePlanId(String googlePlanId) { - + public Subscription googlePlanId(@javax.annotation.Nullable String googlePlanId) { this.googlePlanId = googlePlanId; return this; } - /** + /** * Get googlePlanId * @return googlePlanId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getGooglePlanId() { return googlePlanId; } - - public void setGooglePlanId(String googlePlanId) { + public void setGooglePlanId(@javax.annotation.Nullable String googlePlanId) { this.googlePlanId = googlePlanId; } - public Subscription googleProductId(String googleProductId) { - + public Subscription googleProductId(@javax.annotation.Nullable String googleProductId) { this.googleProductId = googleProductId; return this; } - /** + /** * Get googleProductId * @return googleProductId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getGoogleProductId() { return googleProductId; } - - public void setGoogleProductId(String googleProductId) { + public void setGoogleProductId(@javax.annotation.Nullable String googleProductId) { this.googleProductId = googleProductId; } - public Subscription id(String id) { - + public Subscription id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Subscription oculusSku(String oculusSku) { - + public Subscription oculusSku(@javax.annotation.Nullable String oculusSku) { this.oculusSku = oculusSku; return this; } - /** + /** * Get oculusSku * @return oculusSku - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getOculusSku() { return oculusSku; } - - public void setOculusSku(String oculusSku) { + public void setOculusSku(@javax.annotation.Nullable String oculusSku) { this.oculusSku = oculusSku; } - public Subscription period(SubscriptionPeriod period) { - + public Subscription period(@javax.annotation.Nonnull SubscriptionPeriod period) { this.period = period; return this; } - /** + /** * Get period * @return period - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public SubscriptionPeriod getPeriod() { return period; } - - public void setPeriod(SubscriptionPeriod period) { + public void setPeriod(@javax.annotation.Nonnull SubscriptionPeriod period) { this.period = period; } - public Subscription picoSku(String picoSku) { - + public Subscription picoSku(@javax.annotation.Nullable String picoSku) { this.picoSku = picoSku; return this; } - /** + /** * Get picoSku * @return picoSku - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPicoSku() { return picoSku; } - - public void setPicoSku(String picoSku) { + public void setPicoSku(@javax.annotation.Nullable String picoSku) { this.picoSku = picoSku; } - public Subscription steamItemId(String steamItemId) { - + public Subscription steamItemId(@javax.annotation.Nonnull String steamItemId) { this.steamItemId = steamItemId; return this; } - /** + /** * Get steamItemId * @return steamItemId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSteamItemId() { return steamItemId; } - - public void setSteamItemId(String steamItemId) { + public void setSteamItemId(@javax.annotation.Nonnull String steamItemId) { this.steamItemId = steamItemId; } - public Subscription tier(Integer tier) { - + public Subscription tier(@javax.annotation.Nonnull Integer tier) { this.tier = tier; return this; } - /** + /** * Get tier * @return tier - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getTier() { return tier; } - - public void setTier(Integer tier) { + public void setTier(@javax.annotation.Nonnull Integer tier) { this.tier = tier; } @@ -404,10 +370,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -416,79 +379,65 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("appleProductId"); - openapiFields.add("description"); - openapiFields.add("googlePlanId"); - openapiFields.add("googleProductId"); - openapiFields.add("id"); - openapiFields.add("oculusSku"); - openapiFields.add("period"); - openapiFields.add("picoSku"); - openapiFields.add("steamItemId"); - openapiFields.add("tier"); + openapiFields = new HashSet(Arrays.asList("amount", "appleProductId", "description", "googlePlanId", "googleProductId", "id", "oculusSku", "period", "picoSku", "steamItemId", "tier")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("period"); - openapiRequiredFields.add("steamItemId"); - openapiRequiredFields.add("tier"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Subscription - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Subscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Subscription is not found in the empty JSON string", Subscription.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("amount", "description", "id", "period", "steamItemId", "tier")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Subscription + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Subscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Subscription is not found in the empty JSON string", Subscription.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Subscription.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Subscription` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Subscription` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Subscription.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("appleProductId") != null && !jsonObj.get("appleProductId").isJsonNull()) && !jsonObj.get("appleProductId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appleProductId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appleProductId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `appleProductId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appleProductId").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("googlePlanId") != null && !jsonObj.get("googlePlanId").isJsonNull()) && !jsonObj.get("googlePlanId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `googlePlanId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("googlePlanId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `googlePlanId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("googlePlanId").toString())); } if ((jsonObj.get("googleProductId") != null && !jsonObj.get("googleProductId").isJsonNull()) && !jsonObj.get("googleProductId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `googleProductId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("googleProductId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `googleProductId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("googleProductId").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("oculusSku") != null && !jsonObj.get("oculusSku").isJsonNull()) && !jsonObj.get("oculusSku").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `oculusSku` to be a primitive type in the JSON string but got `%s`", jsonObj.get("oculusSku").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `oculusSku` to be a primitive type in the JSON string but got `%s`", jsonObj.get("oculusSku").toString())); } + // validate the required field `period` + SubscriptionPeriod.validateJsonElement(jsonObj.get("period")); if ((jsonObj.get("picoSku") != null && !jsonObj.get("picoSku").isJsonNull()) && !jsonObj.get("picoSku").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `picoSku` to be a primitive type in the JSON string but got `%s`", jsonObj.get("picoSku").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `picoSku` to be a primitive type in the JSON string but got `%s`", jsonObj.get("picoSku").toString())); } if (!jsonObj.get("steamItemId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `steamItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamItemId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `steamItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamItemId").toString())); } } @@ -512,31 +461,31 @@ public void write(JsonWriter out, Subscription value) throws IOException { @Override public Subscription read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Subscription given an JSON string - * - * @param jsonString JSON string - * @return An instance of Subscription - * @throws IOException if the JSON string is invalid with respect to Subscription - */ + /** + * Create an instance of Subscription given an JSON string + * + * @param jsonString JSON string + * @return An instance of Subscription + * @throws IOException if the JSON string is invalid with respect to Subscription + */ public static Subscription fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Subscription.class); } - /** - * Convert an instance of Subscription to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Subscription to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/SubscriptionPeriod.java b/src/main/java/io/github/vrchatapi/model/SubscriptionPeriod.java index 17862178..ea4d8e67 100644 --- a/src/main/java/io/github/vrchatapi/model/SubscriptionPeriod.java +++ b/src/main/java/io/github/vrchatapi/model/SubscriptionPeriod.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -74,5 +74,10 @@ public SubscriptionPeriod read(final JsonReader jsonReader) throws IOException { return SubscriptionPeriod.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SubscriptionPeriod.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/Success.java b/src/main/java/io/github/vrchatapi/model/Success.java index 0a75f8c5..c0f8d6af 100644 --- a/src/main/java/io/github/vrchatapi/model/Success.java +++ b/src/main/java/io/github/vrchatapi/model/Success.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.Response; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,34 +48,31 @@ /** * Success */ -@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 Success { public static final String SERIALIZED_NAME_SUCCESS = "success"; @SerializedName(SERIALIZED_NAME_SUCCESS) + @javax.annotation.Nullable private Response success; public Success() { } - public Success success(Response success) { - + public Success success(@javax.annotation.Nullable Response success) { this.success = success; return this; } - /** + /** * Get success * @return success - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Response getSuccess() { return success; } - - public void setSuccess(Response success) { + public void setSuccess(@javax.annotation.Nullable Response success) { this.success = success; } @@ -112,10 +109,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,36 +118,36 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("success"); + openapiFields = new HashSet(Arrays.asList("success")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Success - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Success.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Success is not found in the empty JSON string", Success.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Success + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Success.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Success is not found in the empty JSON string", Success.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Success.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Success` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Success` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `success` if (jsonObj.get("success") != null && !jsonObj.get("success").isJsonNull()) { - Response.validateJsonObject(jsonObj.getAsJsonObject("success")); + Response.validateJsonElement(jsonObj.get("success")); } } @@ -177,31 +171,31 @@ public void write(JsonWriter out, Success value) throws IOException { @Override public Success read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Success given an JSON string - * - * @param jsonString JSON string - * @return An instance of Success - * @throws IOException if the JSON string is invalid with respect to Success - */ + /** + * Create an instance of Success given an JSON string + * + * @param jsonString JSON string + * @return An instance of Success + * @throws IOException if the JSON string is invalid with respect to Success + */ public static Success fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Success.class); } - /** - * Convert an instance of Success to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Success to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/SuccessFlag.java b/src/main/java/io/github/vrchatapi/model/SuccessFlag.java index d6d738ec..79c02164 100644 --- a/src/main/java/io/github/vrchatapi/model/SuccessFlag.java +++ b/src/main/java/io/github/vrchatapi/model/SuccessFlag.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * SuccessFlag */ -@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 SuccessFlag { public static final String SERIALIZED_NAME_SUCCESS = "success"; @SerializedName(SERIALIZED_NAME_SUCCESS) + @javax.annotation.Nonnull private Boolean success; public SuccessFlag() { } - public SuccessFlag success(Boolean success) { - + public SuccessFlag success(@javax.annotation.Nonnull Boolean success) { this.success = success; return this; } - /** + /** * Get success * @return success - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getSuccess() { return success; } - - public void setSuccess(Boolean success) { + public void setSuccess(@javax.annotation.Nonnull Boolean success) { this.success = success; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("success"); + openapiFields = new HashSet(Arrays.asList("success")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("success"); + openapiRequiredFields = new HashSet(Arrays.asList("success")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to SuccessFlag - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SuccessFlag.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SuccessFlag is not found in the empty JSON string", SuccessFlag.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SuccessFlag + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SuccessFlag.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in SuccessFlag is not found in the empty JSON string", SuccessFlag.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!SuccessFlag.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SuccessFlag` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `SuccessFlag` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : SuccessFlag.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -180,31 +173,31 @@ public void write(JsonWriter out, SuccessFlag value) throws IOException { @Override public SuccessFlag read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of SuccessFlag given an JSON string - * - * @param jsonString JSON string - * @return An instance of SuccessFlag - * @throws IOException if the JSON string is invalid with respect to SuccessFlag - */ + /** + * Create an instance of SuccessFlag given an JSON string + * + * @param jsonString JSON string + * @return An instance of SuccessFlag + * @throws IOException if the JSON string is invalid with respect to SuccessFlag + */ public static SuccessFlag fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, SuccessFlag.class); } - /** - * Convert an instance of SuccessFlag to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of SuccessFlag to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TiliaKyc.java b/src/main/java/io/github/vrchatapi/model/TiliaKyc.java index 7a960a69..0bc6095d 100644 --- a/src/main/java/io/github/vrchatapi/model/TiliaKyc.java +++ b/src/main/java/io/github/vrchatapi/model/TiliaKyc.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,233 +49,215 @@ /** * TiliaKyc */ -@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 TiliaKyc { public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) + @javax.annotation.Nonnull private String accountId; public static final String SERIALIZED_NAME_KYC_ID = "kyc_id"; @SerializedName(SERIALIZED_NAME_KYC_ID) + @javax.annotation.Nonnull private String kycId; public static final String SERIALIZED_NAME_KYC_REQUIREMENTS = "kyc_requirements"; @SerializedName(SERIALIZED_NAME_KYC_REQUIREMENTS) + @javax.annotation.Nonnull private String kycRequirements; public static final String SERIALIZED_NAME_MATCH_CHECKS = "match_checks"; @SerializedName(SERIALIZED_NAME_MATCH_CHECKS) + @javax.annotation.Nonnull private List matchChecks = new ArrayList<>(); public static final String SERIALIZED_NAME_PII_LEVEL = "pii_level"; @SerializedName(SERIALIZED_NAME_PII_LEVEL) + @javax.annotation.Nonnull private String piiLevel; public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) + @javax.annotation.Nonnull private List rules = new ArrayList<>(); public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nonnull private String state; public static final String SERIALIZED_NAME_TILIA_RETRY_RULE_CODE = "tilia_retry_rule_code"; @SerializedName(SERIALIZED_NAME_TILIA_RETRY_RULE_CODE) + @javax.annotation.Nonnull private String tiliaRetryRuleCode; public TiliaKyc() { } - public TiliaKyc accountId(String accountId) { - + public TiliaKyc accountId(@javax.annotation.Nonnull String accountId) { this.accountId = accountId; return this; } - /** + /** * Tilia account identifier. * @return accountId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "acct_2YYRz9C5xbJWrhI5RLWPnwDLMyq", required = true, value = "Tilia account identifier.") - public String getAccountId() { return accountId; } - - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nonnull String accountId) { this.accountId = accountId; } - public TiliaKyc kycId(String kycId) { - + public TiliaKyc kycId(@javax.annotation.Nonnull String kycId) { this.kycId = kycId; return this; } - /** + /** * KYC verification identifier. * @return kycId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "kyc_2tDKpjafhPTG729ceA2oIcsQlWA", required = true, value = "KYC verification identifier.") - public String getKycId() { return kycId; } - - public void setKycId(String kycId) { + public void setKycId(@javax.annotation.Nonnull String kycId) { this.kycId = kycId; } - public TiliaKyc kycRequirements(String kycRequirements) { - + public TiliaKyc kycRequirements(@javax.annotation.Nonnull String kycRequirements) { this.kycRequirements = kycRequirements; return this; } - /** + /** * Requirement state reported by Tilia. * @return kycRequirements - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "NONE", required = true, value = "Requirement state reported by Tilia.") - public String getKycRequirements() { return kycRequirements; } - - public void setKycRequirements(String kycRequirements) { + public void setKycRequirements(@javax.annotation.Nonnull String kycRequirements) { this.kycRequirements = kycRequirements; } - public TiliaKyc matchChecks(List matchChecks) { - + public TiliaKyc matchChecks(@javax.annotation.Nonnull List matchChecks) { this.matchChecks = matchChecks; return this; } public TiliaKyc addMatchChecksItem(String matchChecksItem) { + if (this.matchChecks == null) { + this.matchChecks = new ArrayList<>(); + } this.matchChecks.add(matchChecksItem); return this; } - /** + /** * Match checks returned by Tilia. * @return matchChecks - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Match checks returned by Tilia.") - public List getMatchChecks() { return matchChecks; } - - public void setMatchChecks(List matchChecks) { + public void setMatchChecks(@javax.annotation.Nonnull List matchChecks) { this.matchChecks = matchChecks; } - public TiliaKyc piiLevel(String piiLevel) { - + public TiliaKyc piiLevel(@javax.annotation.Nonnull String piiLevel) { this.piiLevel = piiLevel; return this; } - /** + /** * PII verification level. * @return piiLevel - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "FULL", required = true, value = "PII verification level.") - public String getPiiLevel() { return piiLevel; } - - public void setPiiLevel(String piiLevel) { + public void setPiiLevel(@javax.annotation.Nonnull String piiLevel) { this.piiLevel = piiLevel; } - public TiliaKyc rules(List rules) { - + public TiliaKyc rules(@javax.annotation.Nonnull List rules) { this.rules = rules; return this; } public TiliaKyc addRulesItem(String rulesItem) { + if (this.rules == null) { + this.rules = new ArrayList<>(); + } this.rules.add(rulesItem); return this; } - /** + /** * Additional rules returned by Tilia. * @return rules - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Additional rules returned by Tilia.") - public List getRules() { return rules; } - - public void setRules(List rules) { + public void setRules(@javax.annotation.Nonnull List rules) { this.rules = rules; } - public TiliaKyc state(String state) { - + public TiliaKyc state(@javax.annotation.Nonnull String state) { this.state = state; return this; } - /** + /** * Overall KYC state. * @return state - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "ACCEPT", required = true, value = "Overall KYC state.") - public String getState() { return state; } - - public void setState(String state) { + public void setState(@javax.annotation.Nonnull String state) { this.state = state; } - public TiliaKyc tiliaRetryRuleCode(String tiliaRetryRuleCode) { - + public TiliaKyc tiliaRetryRuleCode(@javax.annotation.Nonnull String tiliaRetryRuleCode) { this.tiliaRetryRuleCode = tiliaRetryRuleCode; return this; } - /** + /** * Retry rule code returned by Tilia, if any. * @return tiliaRetryRuleCode - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Retry rule code returned by Tilia, if any.") - public String getTiliaRetryRuleCode() { return tiliaRetryRuleCode; } - - public void setTiliaRetryRuleCode(String tiliaRetryRuleCode) { + public void setTiliaRetryRuleCode(@javax.annotation.Nonnull String tiliaRetryRuleCode) { this.tiliaRetryRuleCode = tiliaRetryRuleCode; } @@ -326,10 +308,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -338,84 +317,69 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("account_id"); - openapiFields.add("kyc_id"); - openapiFields.add("kyc_requirements"); - openapiFields.add("match_checks"); - openapiFields.add("pii_level"); - openapiFields.add("rules"); - openapiFields.add("state"); - openapiFields.add("tilia_retry_rule_code"); + openapiFields = new HashSet(Arrays.asList("account_id", "kyc_id", "kyc_requirements", "match_checks", "pii_level", "rules", "state", "tilia_retry_rule_code")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("account_id"); - openapiRequiredFields.add("kyc_id"); - openapiRequiredFields.add("kyc_requirements"); - openapiRequiredFields.add("match_checks"); - openapiRequiredFields.add("pii_level"); - openapiRequiredFields.add("rules"); - openapiRequiredFields.add("state"); - openapiRequiredFields.add("tilia_retry_rule_code"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TiliaKyc - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TiliaKyc.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TiliaKyc is not found in the empty JSON string", TiliaKyc.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("account_id", "kyc_id", "kyc_requirements", "match_checks", "pii_level", "rules", "state", "tilia_retry_rule_code")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TiliaKyc + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TiliaKyc.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TiliaKyc is not found in the empty JSON string", TiliaKyc.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TiliaKyc.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TiliaKyc` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TiliaKyc` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TiliaKyc.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("account_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `account_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `account_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_id").toString())); } if (!jsonObj.get("kyc_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `kyc_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kyc_id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `kyc_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kyc_id").toString())); } if (!jsonObj.get("kyc_requirements").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `kyc_requirements` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kyc_requirements").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `kyc_requirements` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kyc_requirements").toString())); } // ensure the required json array is present if (jsonObj.get("match_checks") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("match_checks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `match_checks` to be an array in the JSON string but got `%s`", jsonObj.get("match_checks").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `match_checks` to be an array in the JSON string but got `%s`", jsonObj.get("match_checks").toString())); } if (!jsonObj.get("pii_level").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `pii_level` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pii_level").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pii_level` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pii_level").toString())); } // ensure the required json array is present if (jsonObj.get("rules") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("rules").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `rules` to be an array in the JSON string but got `%s`", jsonObj.get("rules").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `rules` to be an array in the JSON string but got `%s`", jsonObj.get("rules").toString())); } if (!jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } if (!jsonObj.get("tilia_retry_rule_code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tilia_retry_rule_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tilia_retry_rule_code").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tilia_retry_rule_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tilia_retry_rule_code").toString())); } } @@ -439,31 +403,31 @@ public void write(JsonWriter out, TiliaKyc value) throws IOException { @Override public TiliaKyc read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TiliaKyc given an JSON string - * - * @param jsonString JSON string - * @return An instance of TiliaKyc - * @throws IOException if the JSON string is invalid with respect to TiliaKyc - */ + /** + * Create an instance of TiliaKyc given an JSON string + * + * @param jsonString JSON string + * @return An instance of TiliaKyc + * @throws IOException if the JSON string is invalid with respect to TiliaKyc + */ public static TiliaKyc fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TiliaKyc.class); } - /** - * Convert an instance of TiliaKyc to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TiliaKyc to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TiliaStatus.java b/src/main/java/io/github/vrchatapi/model/TiliaStatus.java index 3ed37587..2d3456a8 100644 --- a/src/main/java/io/github/vrchatapi/model/TiliaStatus.java +++ b/src/main/java/io/github/vrchatapi/model/TiliaStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,116 +48,103 @@ /** * */ -@ApiModel(description = "") -@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 TiliaStatus { public static final String SERIALIZED_NAME_ECONOMY_ONLINE = "economyOnline"; @SerializedName(SERIALIZED_NAME_ECONOMY_ONLINE) + @javax.annotation.Nonnull private Boolean economyOnline; public static final String SERIALIZED_NAME_ECONOMY_STATE = "economyState"; @SerializedName(SERIALIZED_NAME_ECONOMY_STATE) + @javax.annotation.Nullable private Integer economyState; public static final String SERIALIZED_NAME_PLANNED_OFFLINE_WINDOW_END = "plannedOfflineWindowEnd"; @SerializedName(SERIALIZED_NAME_PLANNED_OFFLINE_WINDOW_END) + @javax.annotation.Nullable private OffsetDateTime plannedOfflineWindowEnd; public static final String SERIALIZED_NAME_PLANNED_OFFLINE_WINDOW_START = "plannedOfflineWindowStart"; @SerializedName(SERIALIZED_NAME_PLANNED_OFFLINE_WINDOW_START) + @javax.annotation.Nullable private OffsetDateTime plannedOfflineWindowStart; public TiliaStatus() { } - public TiliaStatus economyOnline(Boolean economyOnline) { - + public TiliaStatus economyOnline(@javax.annotation.Nonnull Boolean economyOnline) { this.economyOnline = economyOnline; return this; } - /** + /** * Get economyOnline * @return economyOnline - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getEconomyOnline() { return economyOnline; } - - public void setEconomyOnline(Boolean economyOnline) { + public void setEconomyOnline(@javax.annotation.Nonnull Boolean economyOnline) { this.economyOnline = economyOnline; } - public TiliaStatus economyState(Integer economyState) { - + public TiliaStatus economyState(@javax.annotation.Nullable Integer economyState) { this.economyState = economyState; return this; } - /** + /** * Get economyState * @return economyState - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getEconomyState() { return economyState; } - - public void setEconomyState(Integer economyState) { + public void setEconomyState(@javax.annotation.Nullable Integer economyState) { this.economyState = economyState; } - public TiliaStatus plannedOfflineWindowEnd(OffsetDateTime plannedOfflineWindowEnd) { - + public TiliaStatus plannedOfflineWindowEnd(@javax.annotation.Nullable OffsetDateTime plannedOfflineWindowEnd) { this.plannedOfflineWindowEnd = plannedOfflineWindowEnd; return this; } - /** + /** * Get plannedOfflineWindowEnd * @return plannedOfflineWindowEnd - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getPlannedOfflineWindowEnd() { return plannedOfflineWindowEnd; } - - public void setPlannedOfflineWindowEnd(OffsetDateTime plannedOfflineWindowEnd) { + public void setPlannedOfflineWindowEnd(@javax.annotation.Nullable OffsetDateTime plannedOfflineWindowEnd) { this.plannedOfflineWindowEnd = plannedOfflineWindowEnd; } - public TiliaStatus plannedOfflineWindowStart(OffsetDateTime plannedOfflineWindowStart) { - + public TiliaStatus plannedOfflineWindowStart(@javax.annotation.Nullable OffsetDateTime plannedOfflineWindowStart) { this.plannedOfflineWindowStart = plannedOfflineWindowStart; return this; } - /** + /** * Get plannedOfflineWindowStart * @return plannedOfflineWindowStart - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public OffsetDateTime getPlannedOfflineWindowStart() { return plannedOfflineWindowStart; } - - public void setPlannedOfflineWindowStart(OffsetDateTime plannedOfflineWindowStart) { + public void setPlannedOfflineWindowStart(@javax.annotation.Nullable OffsetDateTime plannedOfflineWindowStart) { this.plannedOfflineWindowStart = plannedOfflineWindowStart; } @@ -200,10 +187,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -212,44 +196,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("economyOnline"); - openapiFields.add("economyState"); - openapiFields.add("plannedOfflineWindowEnd"); - openapiFields.add("plannedOfflineWindowStart"); + openapiFields = new HashSet(Arrays.asList("economyOnline", "economyState", "plannedOfflineWindowEnd", "plannedOfflineWindowStart")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("economyOnline"); + openapiRequiredFields = new HashSet(Arrays.asList("economyOnline")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TiliaStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TiliaStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TiliaStatus is not found in the empty JSON string", TiliaStatus.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TiliaStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TiliaStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TiliaStatus is not found in the empty JSON string", TiliaStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TiliaStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TiliaStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TiliaStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TiliaStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -272,31 +252,31 @@ public void write(JsonWriter out, TiliaStatus value) throws IOException { @Override public TiliaStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TiliaStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of TiliaStatus - * @throws IOException if the JSON string is invalid with respect to TiliaStatus - */ + /** + * Create an instance of TiliaStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of TiliaStatus + * @throws IOException if the JSON string is invalid with respect to TiliaStatus + */ public static TiliaStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TiliaStatus.class); } - /** - * Convert an instance of TiliaStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TiliaStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TiliaTOS.java b/src/main/java/io/github/vrchatapi/model/TiliaTOS.java index afbb6f02..e8ac6e37 100644 --- a/src/main/java/io/github/vrchatapi/model/TiliaTOS.java +++ b/src/main/java/io/github/vrchatapi/model/TiliaTOS.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,35 +47,31 @@ /** * */ -@ApiModel(description = "") -@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 TiliaTOS { public static final String SERIALIZED_NAME_SIGNED_TOS = "signed_tos"; @SerializedName(SERIALIZED_NAME_SIGNED_TOS) + @javax.annotation.Nonnull private Boolean signedTos; public TiliaTOS() { } - public TiliaTOS signedTos(Boolean signedTos) { - + public TiliaTOS signedTos(@javax.annotation.Nonnull Boolean signedTos) { this.signedTos = signedTos; return this; } - /** + /** * Get signedTos * @return signedTos - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getSignedTos() { return signedTos; } - - public void setSignedTos(Boolean signedTos) { + public void setSignedTos(@javax.annotation.Nonnull Boolean signedTos) { this.signedTos = signedTos; } @@ -112,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("signed_tos"); + openapiFields = new HashSet(Arrays.asList("signed_tos")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("signed_tos"); + openapiRequiredFields = new HashSet(Arrays.asList("signed_tos")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TiliaTOS - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TiliaTOS.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TiliaTOS is not found in the empty JSON string", TiliaTOS.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TiliaTOS + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TiliaTOS.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TiliaTOS is not found in the empty JSON string", TiliaTOS.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TiliaTOS.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TiliaTOS` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TiliaTOS` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TiliaTOS.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -181,31 +173,31 @@ public void write(JsonWriter out, TiliaTOS value) throws IOException { @Override public TiliaTOS read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TiliaTOS given an JSON string - * - * @param jsonString JSON string - * @return An instance of TiliaTOS - * @throws IOException if the JSON string is invalid with respect to TiliaTOS - */ + /** + * Create an instance of TiliaTOS given an JSON string + * + * @param jsonString JSON string + * @return An instance of TiliaTOS + * @throws IOException if the JSON string is invalid with respect to TiliaTOS + */ public static TiliaTOS fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TiliaTOS.class); } - /** - * Convert an instance of TiliaTOS to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TiliaTOS to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TokenBundle.java b/src/main/java/io/github/vrchatapi/model/TokenBundle.java index 1ec68973..3910bee1 100644 --- a/src/main/java/io/github/vrchatapi/model/TokenBundle.java +++ b/src/main/java/io/github/vrchatapi/model/TokenBundle.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,250 +47,223 @@ /** * TokenBundle */ -@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 TokenBundle { public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) + @javax.annotation.Nonnull private Integer amount; public static final String SERIALIZED_NAME_APPLE_PRODUCT_ID = "appleProductId"; @SerializedName(SERIALIZED_NAME_APPLE_PRODUCT_ID) + @javax.annotation.Nonnull private String appleProductId; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_GOOGLE_PRODUCT_ID = "googleProductId"; @SerializedName(SERIALIZED_NAME_GOOGLE_PRODUCT_ID) + @javax.annotation.Nullable private String googleProductId; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_OCULUS_SKU = "oculusSku"; @SerializedName(SERIALIZED_NAME_OCULUS_SKU) + @javax.annotation.Nonnull private String oculusSku; public static final String SERIALIZED_NAME_STEAM_ITEM_ID = "steamItemId"; @SerializedName(SERIALIZED_NAME_STEAM_ITEM_ID) + @javax.annotation.Nonnull private String steamItemId; public static final String SERIALIZED_NAME_TOKENS = "tokens"; @SerializedName(SERIALIZED_NAME_TOKENS) + @javax.annotation.Nonnull private Integer tokens; public TokenBundle() { } - public TokenBundle amount(Integer amount) { - + public TokenBundle amount(@javax.annotation.Nonnull Integer amount) { this.amount = amount; return this; } - /** + /** * price of the bundle * @return amount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "price of the bundle") - public Integer getAmount() { return amount; } - - public void setAmount(Integer amount) { + public void setAmount(@javax.annotation.Nonnull Integer amount) { this.amount = amount; } - public TokenBundle appleProductId(String appleProductId) { - + public TokenBundle appleProductId(@javax.annotation.Nonnull String appleProductId) { this.appleProductId = appleProductId; return this; } - /** + /** * Get appleProductId * @return appleProductId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAppleProductId() { return appleProductId; } - - public void setAppleProductId(String appleProductId) { + public void setAppleProductId(@javax.annotation.Nonnull String appleProductId) { this.appleProductId = appleProductId; } - public TokenBundle description(String description) { - + public TokenBundle description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public TokenBundle googleProductId(String googleProductId) { - + public TokenBundle googleProductId(@javax.annotation.Nullable String googleProductId) { this.googleProductId = googleProductId; return this; } - /** + /** * Get googleProductId * @return googleProductId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getGoogleProductId() { return googleProductId; } - - public void setGoogleProductId(String googleProductId) { + public void setGoogleProductId(@javax.annotation.Nullable String googleProductId) { this.googleProductId = googleProductId; } - public TokenBundle id(String id) { - + public TokenBundle id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public TokenBundle imageUrl(String imageUrl) { - + public TokenBundle imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * direct url to image * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "direct url to image") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public TokenBundle oculusSku(String oculusSku) { - + public TokenBundle oculusSku(@javax.annotation.Nonnull String oculusSku) { this.oculusSku = oculusSku; return this; } - /** + /** * Get oculusSku * @return oculusSku - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getOculusSku() { return oculusSku; } - - public void setOculusSku(String oculusSku) { + public void setOculusSku(@javax.annotation.Nonnull String oculusSku) { this.oculusSku = oculusSku; } - public TokenBundle steamItemId(String steamItemId) { - + public TokenBundle steamItemId(@javax.annotation.Nonnull String steamItemId) { this.steamItemId = steamItemId; return this; } - /** + /** * Get steamItemId * @return steamItemId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getSteamItemId() { return steamItemId; } - - public void setSteamItemId(String steamItemId) { + public void setSteamItemId(@javax.annotation.Nonnull String steamItemId) { this.steamItemId = steamItemId; } - public TokenBundle tokens(Integer tokens) { - + public TokenBundle tokens(@javax.annotation.Nonnull Integer tokens) { this.tokens = tokens; return this; } - /** + /** * number of tokens received * @return tokens - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "number of tokens received") - public Integer getTokens() { return tokens; } - - public void setTokens(Integer tokens) { + public void setTokens(@javax.annotation.Nonnull Integer tokens) { this.tokens = tokens; } @@ -343,10 +316,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -355,76 +325,60 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("appleProductId"); - openapiFields.add("description"); - openapiFields.add("googleProductId"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("oculusSku"); - openapiFields.add("steamItemId"); - openapiFields.add("tokens"); + openapiFields = new HashSet(Arrays.asList("amount", "appleProductId", "description", "googleProductId", "id", "imageUrl", "oculusSku", "steamItemId", "tokens")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("appleProductId"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("oculusSku"); - openapiRequiredFields.add("steamItemId"); - openapiRequiredFields.add("tokens"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TokenBundle - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TokenBundle.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TokenBundle is not found in the empty JSON string", TokenBundle.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("amount", "appleProductId", "description", "id", "imageUrl", "oculusSku", "steamItemId", "tokens")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TokenBundle + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TokenBundle.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TokenBundle is not found in the empty JSON string", TokenBundle.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TokenBundle.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TokenBundle` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TokenBundle` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TokenBundle.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("appleProductId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appleProductId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appleProductId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `appleProductId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appleProductId").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("googleProductId") != null && !jsonObj.get("googleProductId").isJsonNull()) && !jsonObj.get("googleProductId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `googleProductId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("googleProductId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `googleProductId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("googleProductId").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if (!jsonObj.get("oculusSku").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `oculusSku` to be a primitive type in the JSON string but got `%s`", jsonObj.get("oculusSku").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `oculusSku` to be a primitive type in the JSON string but got `%s`", jsonObj.get("oculusSku").toString())); } if (!jsonObj.get("steamItemId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `steamItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamItemId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `steamItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamItemId").toString())); } } @@ -448,31 +402,31 @@ public void write(JsonWriter out, TokenBundle value) throws IOException { @Override public TokenBundle read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TokenBundle given an JSON string - * - * @param jsonString JSON string - * @return An instance of TokenBundle - * @throws IOException if the JSON string is invalid with respect to TokenBundle - */ + /** + * Create an instance of TokenBundle given an JSON string + * + * @param jsonString JSON string + * @return An instance of TokenBundle + * @throws IOException if the JSON string is invalid with respect to TokenBundle + */ public static TokenBundle fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TokenBundle.class); } - /** - * Convert an instance of TokenBundle to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TokenBundle to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Transaction.java b/src/main/java/io/github/vrchatapi/model/Transaction.java index 03a9cae8..9232b097 100644 --- a/src/main/java/io/github/vrchatapi/model/Transaction.java +++ b/src/main/java/io/github/vrchatapi/model/Transaction.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,10 +22,9 @@ import io.github.vrchatapi.model.TransactionAgreement; import io.github.vrchatapi.model.TransactionStatus; import io.github.vrchatapi.model.TransactionSteamInfo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -38,13 +36,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -52,359 +52,319 @@ /** * */ -@ApiModel(description = "") -@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 Transaction { public static final String SERIALIZED_NAME_AGREEMENT = "agreement"; @SerializedName(SERIALIZED_NAME_AGREEMENT) + @javax.annotation.Nullable private TransactionAgreement agreement; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nullable private String error; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IS_GIFT = "isGift"; @SerializedName(SERIALIZED_NAME_IS_GIFT) + @javax.annotation.Nullable private Boolean isGift = false; public static final String SERIALIZED_NAME_IS_TOKENS = "isTokens"; @SerializedName(SERIALIZED_NAME_IS_TOKENS) + @javax.annotation.Nullable private Boolean isTokens = false; public static final String SERIALIZED_NAME_SANDBOX = "sandbox"; @SerializedName(SERIALIZED_NAME_SANDBOX) + @javax.annotation.Nonnull private Boolean sandbox = false; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private TransactionStatus status = TransactionStatus.ACTIVE; public static final String SERIALIZED_NAME_STEAM = "steam"; @SerializedName(SERIALIZED_NAME_STEAM) + @javax.annotation.Nullable private TransactionSteamInfo steam; public static final String SERIALIZED_NAME_SUBSCRIPTION = "subscription"; @SerializedName(SERIALIZED_NAME_SUBSCRIPTION) + @javax.annotation.Nonnull private Subscription subscription; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_USER_DISPLAY_NAME = "userDisplayName"; @SerializedName(SERIALIZED_NAME_USER_DISPLAY_NAME) + @javax.annotation.Nullable private String userDisplayName; public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nullable private String userId; public Transaction() { } - public Transaction agreement(TransactionAgreement agreement) { - + public Transaction agreement(@javax.annotation.Nullable TransactionAgreement agreement) { this.agreement = agreement; return this; } - /** + /** * Get agreement * @return agreement - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TransactionAgreement getAgreement() { return agreement; } - - public void setAgreement(TransactionAgreement agreement) { + public void setAgreement(@javax.annotation.Nullable TransactionAgreement agreement) { this.agreement = agreement; } - public Transaction createdAt(OffsetDateTime createdAt) { - + public Transaction createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public Transaction error(String error) { - + public Transaction error(@javax.annotation.Nullable String error) { this.error = error; return this; } - /** + /** * Get error * @return error - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(required = true, value = "") - public String getError() { return error; } - - public void setError(String error) { + public void setError(@javax.annotation.Nullable String error) { this.error = error; } - public Transaction id(String id) { - + public Transaction id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "txn_e5c72948-e735-4880-8245-24b2a41198b0", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public Transaction isGift(Boolean isGift) { - + public Transaction isGift(@javax.annotation.Nullable Boolean isGift) { this.isGift = isGift; return this; } - /** + /** * Get isGift * @return isGift - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsGift() { return isGift; } - - public void setIsGift(Boolean isGift) { + public void setIsGift(@javax.annotation.Nullable Boolean isGift) { this.isGift = isGift; } - public Transaction isTokens(Boolean isTokens) { - + public Transaction isTokens(@javax.annotation.Nullable Boolean isTokens) { this.isTokens = isTokens; return this; } - /** + /** * Get isTokens * @return isTokens - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsTokens() { return isTokens; } - - public void setIsTokens(Boolean isTokens) { + public void setIsTokens(@javax.annotation.Nullable Boolean isTokens) { this.isTokens = isTokens; } - public Transaction sandbox(Boolean sandbox) { - + public Transaction sandbox(@javax.annotation.Nonnull Boolean sandbox) { this.sandbox = sandbox; return this; } - /** + /** * Get sandbox * @return sandbox - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getSandbox() { return sandbox; } - - public void setSandbox(Boolean sandbox) { + public void setSandbox(@javax.annotation.Nonnull Boolean sandbox) { this.sandbox = sandbox; } - public Transaction status(TransactionStatus status) { - + public Transaction status(@javax.annotation.Nonnull TransactionStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public TransactionStatus getStatus() { return status; } - - public void setStatus(TransactionStatus status) { + public void setStatus(@javax.annotation.Nonnull TransactionStatus status) { this.status = status; } - public Transaction steam(TransactionSteamInfo steam) { - + public Transaction steam(@javax.annotation.Nullable TransactionSteamInfo steam) { this.steam = steam; return this; } - /** + /** * Get steam * @return steam - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public TransactionSteamInfo getSteam() { return steam; } - - public void setSteam(TransactionSteamInfo steam) { + public void setSteam(@javax.annotation.Nullable TransactionSteamInfo steam) { this.steam = steam; } - public Transaction subscription(Subscription subscription) { - + public Transaction subscription(@javax.annotation.Nonnull Subscription subscription) { this.subscription = subscription; return this; } - /** + /** * Get subscription * @return subscription - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Subscription getSubscription() { return subscription; } - - public void setSubscription(Subscription subscription) { + public void setSubscription(@javax.annotation.Nonnull Subscription subscription) { this.subscription = subscription; } - public Transaction updatedAt(OffsetDateTime updatedAt) { - + public Transaction updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public Transaction userDisplayName(String userDisplayName) { - + public Transaction userDisplayName(@javax.annotation.Nullable String userDisplayName) { this.userDisplayName = userDisplayName; return this; } - /** + /** * Get userDisplayName * @return userDisplayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUserDisplayName() { return userDisplayName; } - - public void setUserDisplayName(String userDisplayName) { + public void setUserDisplayName(@javax.annotation.Nullable String userDisplayName) { this.userDisplayName = userDisplayName; } - public Transaction userId(String userId) { - + public Transaction userId(@javax.annotation.Nullable String userId) { this.userId = userId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return userId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getUserId() { return userId; } - - public void setUserId(String userId) { + public void setUserId(@javax.annotation.Nullable String userId) { this.userId = userId; } @@ -465,10 +425,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -477,80 +434,63 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("agreement"); - openapiFields.add("created_at"); - openapiFields.add("error"); - openapiFields.add("id"); - openapiFields.add("isGift"); - openapiFields.add("isTokens"); - openapiFields.add("sandbox"); - openapiFields.add("status"); - openapiFields.add("steam"); - openapiFields.add("subscription"); - openapiFields.add("updated_at"); - openapiFields.add("userDisplayName"); - openapiFields.add("userId"); + openapiFields = new HashSet(Arrays.asList("agreement", "created_at", "error", "id", "isGift", "isTokens", "sandbox", "status", "steam", "subscription", "updated_at", "userDisplayName", "userId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("error"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("sandbox"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("subscription"); - openapiRequiredFields.add("updated_at"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Transaction - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Transaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Transaction is not found in the empty JSON string", Transaction.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("created_at", "error", "id", "sandbox", "status", "subscription", "updated_at")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Transaction + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Transaction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Transaction is not found in the empty JSON string", Transaction.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Transaction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Transaction` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Transaction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Transaction.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `agreement` if (jsonObj.get("agreement") != null && !jsonObj.get("agreement").isJsonNull()) { - TransactionAgreement.validateJsonObject(jsonObj.getAsJsonObject("agreement")); + TransactionAgreement.validateJsonElement(jsonObj.get("agreement")); } - if (!jsonObj.get("error").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); + if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } + // validate the required field `status` + TransactionStatus.validateJsonElement(jsonObj.get("status")); // validate the optional field `steam` if (jsonObj.get("steam") != null && !jsonObj.get("steam").isJsonNull()) { - TransactionSteamInfo.validateJsonObject(jsonObj.getAsJsonObject("steam")); + TransactionSteamInfo.validateJsonElement(jsonObj.get("steam")); } // validate the required field `subscription` - Subscription.validateJsonObject(jsonObj.getAsJsonObject("subscription")); + Subscription.validateJsonElement(jsonObj.get("subscription")); if ((jsonObj.get("userDisplayName") != null && !jsonObj.get("userDisplayName").isJsonNull()) && !jsonObj.get("userDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userDisplayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userDisplayName").toString())); } if ((jsonObj.get("userId") != null && !jsonObj.get("userId").isJsonNull()) && !jsonObj.get("userId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); } } @@ -574,31 +514,31 @@ public void write(JsonWriter out, Transaction value) throws IOException { @Override public Transaction read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Transaction given an JSON string - * - * @param jsonString JSON string - * @return An instance of Transaction - * @throws IOException if the JSON string is invalid with respect to Transaction - */ + /** + * Create an instance of Transaction given an JSON string + * + * @param jsonString JSON string + * @return An instance of Transaction + * @throws IOException if the JSON string is invalid with respect to Transaction + */ public static Transaction fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Transaction.class); } - /** - * Convert an instance of Transaction to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Transaction to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TransactionAgreement.java b/src/main/java/io/github/vrchatapi/model/TransactionAgreement.java index a2934736..454ee706 100644 --- a/src/main/java/io/github/vrchatapi/model/TransactionAgreement.java +++ b/src/main/java/io/github/vrchatapi/model/TransactionAgreement.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,494 +48,439 @@ /** * Represents a single Transaction, which is likely between VRChat and Steam. */ -@ApiModel(description = "Represents a single Transaction, which is likely between VRChat and Steam.") -@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 TransactionAgreement { public static final String SERIALIZED_NAME_AGREEMENT = "agreement"; @SerializedName(SERIALIZED_NAME_AGREEMENT) + @javax.annotation.Nonnull private String agreement; public static final String SERIALIZED_NAME_AGREEMENT_ID = "agreementId"; @SerializedName(SERIALIZED_NAME_AGREEMENT_ID) + @javax.annotation.Nonnull private String agreementId; public static final String SERIALIZED_NAME_BILLING_TYPE = "billingType"; @SerializedName(SERIALIZED_NAME_BILLING_TYPE) + @javax.annotation.Nonnull private String billingType; public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) + @javax.annotation.Nonnull private String currency; public static final String SERIALIZED_NAME_END_DATE = "endDate"; @SerializedName(SERIALIZED_NAME_END_DATE) + @javax.annotation.Nonnull private String endDate; public static final String SERIALIZED_NAME_FAILED_ATTEMPTS = "failedAttempts"; @SerializedName(SERIALIZED_NAME_FAILED_ATTEMPTS) + @javax.annotation.Nonnull private Integer failedAttempts; public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; @SerializedName(SERIALIZED_NAME_FREQUENCY) + @javax.annotation.Nonnull private Integer frequency; public static final String SERIALIZED_NAME_ITEM_ID = "itemId"; @SerializedName(SERIALIZED_NAME_ITEM_ID) + @javax.annotation.Nonnull private Integer itemId; public static final String SERIALIZED_NAME_LAST_AMOUNT = "lastAmount"; @SerializedName(SERIALIZED_NAME_LAST_AMOUNT) + @javax.annotation.Nonnull private BigDecimal lastAmount; public static final String SERIALIZED_NAME_LAST_AMOUNT_VAT = "lastAmountVat"; @SerializedName(SERIALIZED_NAME_LAST_AMOUNT_VAT) + @javax.annotation.Nonnull private BigDecimal lastAmountVat; public static final String SERIALIZED_NAME_LAST_PAYMENT = "lastPayment"; @SerializedName(SERIALIZED_NAME_LAST_PAYMENT) + @javax.annotation.Nonnull private String lastPayment; public static final String SERIALIZED_NAME_NEXT_PAYMENT = "nextPayment"; @SerializedName(SERIALIZED_NAME_NEXT_PAYMENT) + @javax.annotation.Nonnull private String nextPayment; public static final String SERIALIZED_NAME_OUTSTANDING = "outstanding"; @SerializedName(SERIALIZED_NAME_OUTSTANDING) + @javax.annotation.Nonnull private Integer outstanding; public static final String SERIALIZED_NAME_PERIOD = "period"; @SerializedName(SERIALIZED_NAME_PERIOD) + @javax.annotation.Nonnull private String period; public static final String SERIALIZED_NAME_RECURRING_AMT = "recurringAmt"; @SerializedName(SERIALIZED_NAME_RECURRING_AMT) + @javax.annotation.Nonnull private BigDecimal recurringAmt; public static final String SERIALIZED_NAME_START_DATE = "startDate"; @SerializedName(SERIALIZED_NAME_START_DATE) + @javax.annotation.Nonnull private String startDate; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private String status; public static final String SERIALIZED_NAME_TIME_CREATED = "timeCreated"; @SerializedName(SERIALIZED_NAME_TIME_CREATED) + @javax.annotation.Nonnull private String timeCreated; public TransactionAgreement() { } - public TransactionAgreement agreement(String agreement) { - + public TransactionAgreement agreement(@javax.annotation.Nonnull String agreement) { this.agreement = agreement; return this; } - /** + /** * Get agreement * @return agreement - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAgreement() { return agreement; } - - public void setAgreement(String agreement) { + public void setAgreement(@javax.annotation.Nonnull String agreement) { this.agreement = agreement; } - public TransactionAgreement agreementId(String agreementId) { - + public TransactionAgreement agreementId(@javax.annotation.Nonnull String agreementId) { this.agreementId = agreementId; return this; } - /** + /** * Get agreementId * @return agreementId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAgreementId() { return agreementId; } - - public void setAgreementId(String agreementId) { + public void setAgreementId(@javax.annotation.Nonnull String agreementId) { this.agreementId = agreementId; } - public TransactionAgreement billingType(String billingType) { - + public TransactionAgreement billingType(@javax.annotation.Nonnull String billingType) { this.billingType = billingType; return this; } - /** + /** * Get billingType * @return billingType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getBillingType() { return billingType; } - - public void setBillingType(String billingType) { + public void setBillingType(@javax.annotation.Nonnull String billingType) { this.billingType = billingType; } - public TransactionAgreement currency(String currency) { - + public TransactionAgreement currency(@javax.annotation.Nonnull String currency) { this.currency = currency; return this; } - /** + /** * Get currency * @return currency - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getCurrency() { return currency; } - - public void setCurrency(String currency) { + public void setCurrency(@javax.annotation.Nonnull String currency) { this.currency = currency; } - public TransactionAgreement endDate(String endDate) { - + public TransactionAgreement endDate(@javax.annotation.Nonnull String endDate) { this.endDate = endDate; return this; } - /** + /** * Get endDate * @return endDate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getEndDate() { return endDate; } - - public void setEndDate(String endDate) { + public void setEndDate(@javax.annotation.Nonnull String endDate) { this.endDate = endDate; } - public TransactionAgreement failedAttempts(Integer failedAttempts) { - + public TransactionAgreement failedAttempts(@javax.annotation.Nonnull Integer failedAttempts) { this.failedAttempts = failedAttempts; return this; } - /** + /** * Get failedAttempts * @return failedAttempts - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getFailedAttempts() { return failedAttempts; } - - public void setFailedAttempts(Integer failedAttempts) { + public void setFailedAttempts(@javax.annotation.Nonnull Integer failedAttempts) { this.failedAttempts = failedAttempts; } - public TransactionAgreement frequency(Integer frequency) { - + public TransactionAgreement frequency(@javax.annotation.Nonnull Integer frequency) { this.frequency = frequency; return this; } - /** + /** * Get frequency * @return frequency - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getFrequency() { return frequency; } - - public void setFrequency(Integer frequency) { + public void setFrequency(@javax.annotation.Nonnull Integer frequency) { this.frequency = frequency; } - public TransactionAgreement itemId(Integer itemId) { - + public TransactionAgreement itemId(@javax.annotation.Nonnull Integer itemId) { this.itemId = itemId; return this; } - /** + /** * Get itemId * @return itemId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getItemId() { return itemId; } - - public void setItemId(Integer itemId) { + public void setItemId(@javax.annotation.Nonnull Integer itemId) { this.itemId = itemId; } - public TransactionAgreement lastAmount(BigDecimal lastAmount) { - + public TransactionAgreement lastAmount(@javax.annotation.Nonnull BigDecimal lastAmount) { this.lastAmount = lastAmount; return this; } - /** + /** * Get lastAmount * @return lastAmount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public BigDecimal getLastAmount() { return lastAmount; } - - public void setLastAmount(BigDecimal lastAmount) { + public void setLastAmount(@javax.annotation.Nonnull BigDecimal lastAmount) { this.lastAmount = lastAmount; } - public TransactionAgreement lastAmountVat(BigDecimal lastAmountVat) { - + public TransactionAgreement lastAmountVat(@javax.annotation.Nonnull BigDecimal lastAmountVat) { this.lastAmountVat = lastAmountVat; return this; } - /** + /** * Get lastAmountVat * @return lastAmountVat - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public BigDecimal getLastAmountVat() { return lastAmountVat; } - - public void setLastAmountVat(BigDecimal lastAmountVat) { + public void setLastAmountVat(@javax.annotation.Nonnull BigDecimal lastAmountVat) { this.lastAmountVat = lastAmountVat; } - public TransactionAgreement lastPayment(String lastPayment) { - + public TransactionAgreement lastPayment(@javax.annotation.Nonnull String lastPayment) { this.lastPayment = lastPayment; return this; } - /** + /** * Get lastPayment * @return lastPayment - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getLastPayment() { return lastPayment; } - - public void setLastPayment(String lastPayment) { + public void setLastPayment(@javax.annotation.Nonnull String lastPayment) { this.lastPayment = lastPayment; } - public TransactionAgreement nextPayment(String nextPayment) { - + public TransactionAgreement nextPayment(@javax.annotation.Nonnull String nextPayment) { this.nextPayment = nextPayment; return this; } - /** + /** * Get nextPayment * @return nextPayment - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getNextPayment() { return nextPayment; } - - public void setNextPayment(String nextPayment) { + public void setNextPayment(@javax.annotation.Nonnull String nextPayment) { this.nextPayment = nextPayment; } - public TransactionAgreement outstanding(Integer outstanding) { - + public TransactionAgreement outstanding(@javax.annotation.Nonnull Integer outstanding) { this.outstanding = outstanding; return this; } - /** + /** * Get outstanding * @return outstanding - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Integer getOutstanding() { return outstanding; } - - public void setOutstanding(Integer outstanding) { + public void setOutstanding(@javax.annotation.Nonnull Integer outstanding) { this.outstanding = outstanding; } - public TransactionAgreement period(String period) { - + public TransactionAgreement period(@javax.annotation.Nonnull String period) { this.period = period; return this; } - /** + /** * Get period * @return period - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getPeriod() { return period; } - - public void setPeriod(String period) { + public void setPeriod(@javax.annotation.Nonnull String period) { this.period = period; } - public TransactionAgreement recurringAmt(BigDecimal recurringAmt) { - + public TransactionAgreement recurringAmt(@javax.annotation.Nonnull BigDecimal recurringAmt) { this.recurringAmt = recurringAmt; return this; } - /** + /** * Get recurringAmt * @return recurringAmt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public BigDecimal getRecurringAmt() { return recurringAmt; } - - public void setRecurringAmt(BigDecimal recurringAmt) { + public void setRecurringAmt(@javax.annotation.Nonnull BigDecimal recurringAmt) { this.recurringAmt = recurringAmt; } - public TransactionAgreement startDate(String startDate) { - + public TransactionAgreement startDate(@javax.annotation.Nonnull String startDate) { this.startDate = startDate; return this; } - /** + /** * Get startDate * @return startDate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getStartDate() { return startDate; } - - public void setStartDate(String startDate) { + public void setStartDate(@javax.annotation.Nonnull String startDate) { this.startDate = startDate; } - public TransactionAgreement status(String status) { - + public TransactionAgreement status(@javax.annotation.Nonnull String status) { this.status = status; return this; } - /** + /** * This is NOT TransactionStatus, but whatever Steam return. * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "This is NOT TransactionStatus, but whatever Steam return.") - public String getStatus() { return status; } - - public void setStatus(String status) { + public void setStatus(@javax.annotation.Nonnull String status) { this.status = status; } - public TransactionAgreement timeCreated(String timeCreated) { - + public TransactionAgreement timeCreated(@javax.annotation.Nonnull String timeCreated) { this.timeCreated = timeCreated; return this; } - /** + /** * Get timeCreated * @return timeCreated - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getTimeCreated() { return timeCreated; } - - public void setTimeCreated(String timeCreated) { + public void setTimeCreated(@javax.annotation.Nonnull String timeCreated) { this.timeCreated = timeCreated; } @@ -606,10 +551,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -618,107 +560,72 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("agreement"); - openapiFields.add("agreementId"); - openapiFields.add("billingType"); - openapiFields.add("currency"); - openapiFields.add("endDate"); - openapiFields.add("failedAttempts"); - openapiFields.add("frequency"); - openapiFields.add("itemId"); - openapiFields.add("lastAmount"); - openapiFields.add("lastAmountVat"); - openapiFields.add("lastPayment"); - openapiFields.add("nextPayment"); - openapiFields.add("outstanding"); - openapiFields.add("period"); - openapiFields.add("recurringAmt"); - openapiFields.add("startDate"); - openapiFields.add("status"); - openapiFields.add("timeCreated"); + openapiFields = new HashSet(Arrays.asList("agreement", "agreementId", "billingType", "currency", "endDate", "failedAttempts", "frequency", "itemId", "lastAmount", "lastAmountVat", "lastPayment", "nextPayment", "outstanding", "period", "recurringAmt", "startDate", "status", "timeCreated")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("agreement"); - openapiRequiredFields.add("agreementId"); - openapiRequiredFields.add("billingType"); - openapiRequiredFields.add("currency"); - openapiRequiredFields.add("endDate"); - openapiRequiredFields.add("failedAttempts"); - openapiRequiredFields.add("frequency"); - openapiRequiredFields.add("itemId"); - openapiRequiredFields.add("lastAmount"); - openapiRequiredFields.add("lastAmountVat"); - openapiRequiredFields.add("lastPayment"); - openapiRequiredFields.add("nextPayment"); - openapiRequiredFields.add("outstanding"); - openapiRequiredFields.add("period"); - openapiRequiredFields.add("recurringAmt"); - openapiRequiredFields.add("startDate"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("timeCreated"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TransactionAgreement - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TransactionAgreement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransactionAgreement is not found in the empty JSON string", TransactionAgreement.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("agreement", "agreementId", "billingType", "currency", "endDate", "failedAttempts", "frequency", "itemId", "lastAmount", "lastAmountVat", "lastPayment", "nextPayment", "outstanding", "period", "recurringAmt", "startDate", "status", "timeCreated")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TransactionAgreement + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TransactionAgreement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TransactionAgreement is not found in the empty JSON string", TransactionAgreement.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TransactionAgreement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransactionAgreement` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TransactionAgreement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TransactionAgreement.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("agreement").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `agreement` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agreement").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `agreement` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agreement").toString())); } if (!jsonObj.get("agreementId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `agreementId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agreementId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `agreementId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agreementId").toString())); } if (!jsonObj.get("billingType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `billingType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billingType").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `billingType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billingType").toString())); } if (!jsonObj.get("currency").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString())); } if (!jsonObj.get("endDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); } if (!jsonObj.get("lastPayment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lastPayment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastPayment").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `lastPayment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastPayment").toString())); } if (!jsonObj.get("nextPayment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nextPayment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPayment").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `nextPayment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPayment").toString())); } if (!jsonObj.get("period").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `period` to be a primitive type in the JSON string but got `%s`", jsonObj.get("period").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `period` to be a primitive type in the JSON string but got `%s`", jsonObj.get("period").toString())); } if (!jsonObj.get("startDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); } if (!jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if (!jsonObj.get("timeCreated").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `timeCreated` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timeCreated").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `timeCreated` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timeCreated").toString())); } } @@ -742,31 +649,31 @@ public void write(JsonWriter out, TransactionAgreement value) throws IOException @Override public TransactionAgreement read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TransactionAgreement given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransactionAgreement - * @throws IOException if the JSON string is invalid with respect to TransactionAgreement - */ + /** + * Create an instance of TransactionAgreement given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransactionAgreement + * @throws IOException if the JSON string is invalid with respect to TransactionAgreement + */ public static TransactionAgreement fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TransactionAgreement.class); } - /** - * Convert an instance of TransactionAgreement to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TransactionAgreement to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TransactionStatus.java b/src/main/java/io/github/vrchatapi/model/TransactionStatus.java index 567bdb54..2ae8f9f8 100644 --- a/src/main/java/io/github/vrchatapi/model/TransactionStatus.java +++ b/src/main/java/io/github/vrchatapi/model/TransactionStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -72,5 +72,10 @@ public TransactionStatus read(final JsonReader jsonReader) throws IOException { return TransactionStatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TransactionStatus.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/TransactionSteamInfo.java b/src/main/java/io/github/vrchatapi/model/TransactionSteamInfo.java index 41195c1b..946bbc41 100644 --- a/src/main/java/io/github/vrchatapi/model/TransactionSteamInfo.java +++ b/src/main/java/io/github/vrchatapi/model/TransactionSteamInfo.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.TransactionSteamWalletInfo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,143 +48,127 @@ /** * */ -@ApiModel(description = "") -@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 TransactionSteamInfo { public static final String SERIALIZED_NAME_ORDER_ID = "orderId"; @SerializedName(SERIALIZED_NAME_ORDER_ID) + @javax.annotation.Nonnull private String orderId; public static final String SERIALIZED_NAME_STEAM_ID = "steamId"; @SerializedName(SERIALIZED_NAME_STEAM_ID) + @javax.annotation.Nonnull private String steamId; public static final String SERIALIZED_NAME_STEAM_URL = "steamUrl"; @SerializedName(SERIALIZED_NAME_STEAM_URL) + @javax.annotation.Nonnull private String steamUrl; public static final String SERIALIZED_NAME_TRANS_ID = "transId"; @SerializedName(SERIALIZED_NAME_TRANS_ID) + @javax.annotation.Nonnull private String transId; public static final String SERIALIZED_NAME_WALLET_INFO = "walletInfo"; @SerializedName(SERIALIZED_NAME_WALLET_INFO) + @javax.annotation.Nonnull private TransactionSteamWalletInfo walletInfo; public TransactionSteamInfo() { } - public TransactionSteamInfo orderId(String orderId) { - + public TransactionSteamInfo orderId(@javax.annotation.Nonnull String orderId) { this.orderId = orderId; return this; } - /** + /** * Steam Order ID * @return orderId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Steam Order ID") - public String getOrderId() { return orderId; } - - public void setOrderId(String orderId) { + public void setOrderId(@javax.annotation.Nonnull String orderId) { this.orderId = orderId; } - public TransactionSteamInfo steamId(String steamId) { - + public TransactionSteamInfo steamId(@javax.annotation.Nonnull String steamId) { this.steamId = steamId; return this; } - /** + /** * Steam User ID * @return steamId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Steam User ID") - public String getSteamId() { return steamId; } - - public void setSteamId(String steamId) { + public void setSteamId(@javax.annotation.Nonnull String steamId) { this.steamId = steamId; } - public TransactionSteamInfo steamUrl(String steamUrl) { - + public TransactionSteamInfo steamUrl(@javax.annotation.Nonnull String steamUrl) { this.steamUrl = steamUrl; return this; } - /** + /** * Empty * @return steamUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Empty") - public String getSteamUrl() { return steamUrl; } - - public void setSteamUrl(String steamUrl) { + public void setSteamUrl(@javax.annotation.Nonnull String steamUrl) { this.steamUrl = steamUrl; } - public TransactionSteamInfo transId(String transId) { - + public TransactionSteamInfo transId(@javax.annotation.Nonnull String transId) { this.transId = transId; return this; } - /** + /** * Steam Transaction ID, NOT the same as VRChat TransactionID * @return transId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Steam Transaction ID, NOT the same as VRChat TransactionID") - public String getTransId() { return transId; } - - public void setTransId(String transId) { + public void setTransId(@javax.annotation.Nonnull String transId) { this.transId = transId; } - public TransactionSteamInfo walletInfo(TransactionSteamWalletInfo walletInfo) { - + public TransactionSteamInfo walletInfo(@javax.annotation.Nonnull TransactionSteamWalletInfo walletInfo) { this.walletInfo = walletInfo; return this; } - /** + /** * Get walletInfo * @return walletInfo - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public TransactionSteamWalletInfo getWalletInfo() { return walletInfo; } - - public void setWalletInfo(TransactionSteamWalletInfo walletInfo) { + public void setWalletInfo(@javax.annotation.Nonnull TransactionSteamWalletInfo walletInfo) { this.walletInfo = walletInfo; } @@ -229,10 +213,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -241,63 +222,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("orderId"); - openapiFields.add("steamId"); - openapiFields.add("steamUrl"); - openapiFields.add("transId"); - openapiFields.add("walletInfo"); + openapiFields = new HashSet(Arrays.asList("orderId", "steamId", "steamUrl", "transId", "walletInfo")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("orderId"); - openapiRequiredFields.add("steamId"); - openapiRequiredFields.add("steamUrl"); - openapiRequiredFields.add("transId"); - openapiRequiredFields.add("walletInfo"); + openapiRequiredFields = new HashSet(Arrays.asList("orderId", "steamId", "steamUrl", "transId", "walletInfo")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TransactionSteamInfo - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TransactionSteamInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransactionSteamInfo is not found in the empty JSON string", TransactionSteamInfo.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TransactionSteamInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TransactionSteamInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TransactionSteamInfo is not found in the empty JSON string", TransactionSteamInfo.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TransactionSteamInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransactionSteamInfo` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TransactionSteamInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TransactionSteamInfo.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("orderId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `orderId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `orderId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderId").toString())); } if (!jsonObj.get("steamId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `steamId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `steamId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamId").toString())); } if (!jsonObj.get("steamUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `steamUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `steamUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamUrl").toString())); } if (!jsonObj.get("transId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transId").toString())); } // validate the required field `walletInfo` - TransactionSteamWalletInfo.validateJsonObject(jsonObj.getAsJsonObject("walletInfo")); + TransactionSteamWalletInfo.validateJsonElement(jsonObj.get("walletInfo")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -320,31 +292,31 @@ public void write(JsonWriter out, TransactionSteamInfo value) throws IOException @Override public TransactionSteamInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TransactionSteamInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransactionSteamInfo - * @throws IOException if the JSON string is invalid with respect to TransactionSteamInfo - */ + /** + * Create an instance of TransactionSteamInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransactionSteamInfo + * @throws IOException if the JSON string is invalid with respect to TransactionSteamInfo + */ public static TransactionSteamInfo fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TransactionSteamInfo.class); } - /** - * Convert an instance of TransactionSteamInfo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TransactionSteamInfo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TransactionSteamWalletInfo.java b/src/main/java/io/github/vrchatapi/model/TransactionSteamWalletInfo.java index 93a74c91..05159975 100644 --- a/src/main/java/io/github/vrchatapi/model/TransactionSteamWalletInfo.java +++ b/src/main/java/io/github/vrchatapi/model/TransactionSteamWalletInfo.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,116 +47,103 @@ /** * */ -@ApiModel(description = "") -@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 TransactionSteamWalletInfo { public static final String SERIALIZED_NAME_COUNTRY = "country"; @SerializedName(SERIALIZED_NAME_COUNTRY) + @javax.annotation.Nonnull private String country = "US"; public static final String SERIALIZED_NAME_CURRENCY = "currency"; @SerializedName(SERIALIZED_NAME_CURRENCY) + @javax.annotation.Nonnull private String currency = "USD"; public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nonnull private String state; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private String status; public TransactionSteamWalletInfo() { } - public TransactionSteamWalletInfo country(String country) { - + public TransactionSteamWalletInfo country(@javax.annotation.Nonnull String country) { this.country = country; return this; } - /** + /** * Get country * @return country - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "SE", required = true, value = "") - public String getCountry() { return country; } - - public void setCountry(String country) { + public void setCountry(@javax.annotation.Nonnull String country) { this.country = country; } - public TransactionSteamWalletInfo currency(String currency) { - + public TransactionSteamWalletInfo currency(@javax.annotation.Nonnull String currency) { this.currency = currency; return this; } - /** + /** * Get currency * @return currency - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "EUR", required = true, value = "") - public String getCurrency() { return currency; } - - public void setCurrency(String currency) { + public void setCurrency(@javax.annotation.Nonnull String currency) { this.currency = currency; } - public TransactionSteamWalletInfo state(String state) { - + public TransactionSteamWalletInfo state(@javax.annotation.Nonnull String state) { this.state = state; return this; } - /** + /** * Get state * @return state - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getState() { return state; } - - public void setState(String state) { + public void setState(@javax.annotation.Nonnull String state) { this.state = state; } - public TransactionSteamWalletInfo status(String status) { - + public TransactionSteamWalletInfo status(@javax.annotation.Nonnull String status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Trusted", required = true, value = "") - public String getStatus() { return status; } - - public void setStatus(String status) { + public void setStatus(@javax.annotation.Nonnull String status) { this.status = status; } @@ -199,10 +186,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -211,58 +195,51 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("country"); - openapiFields.add("currency"); - openapiFields.add("state"); - openapiFields.add("status"); + openapiFields = new HashSet(Arrays.asList("country", "currency", "state", "status")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("country"); - openapiRequiredFields.add("currency"); - openapiRequiredFields.add("state"); - openapiRequiredFields.add("status"); + openapiRequiredFields = new HashSet(Arrays.asList("country", "currency", "state", "status")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TransactionSteamWalletInfo - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TransactionSteamWalletInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransactionSteamWalletInfo is not found in the empty JSON string", TransactionSteamWalletInfo.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TransactionSteamWalletInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TransactionSteamWalletInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TransactionSteamWalletInfo is not found in the empty JSON string", TransactionSteamWalletInfo.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TransactionSteamWalletInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransactionSteamWalletInfo` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TransactionSteamWalletInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TransactionSteamWalletInfo.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); } if (!jsonObj.get("currency").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString())); } if (!jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } if (!jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } } @@ -286,31 +263,31 @@ public void write(JsonWriter out, TransactionSteamWalletInfo value) throws IOExc @Override public TransactionSteamWalletInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TransactionSteamWalletInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransactionSteamWalletInfo - * @throws IOException if the JSON string is invalid with respect to TransactionSteamWalletInfo - */ + /** + * Create an instance of TransactionSteamWalletInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransactionSteamWalletInfo + * @throws IOException if the JSON string is invalid with respect to TransactionSteamWalletInfo + */ public static TransactionSteamWalletInfo fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TransactionSteamWalletInfo.class); } - /** - * Convert an instance of TransactionSteamWalletInfo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TransactionSteamWalletInfo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TransferGroupRequest.java b/src/main/java/io/github/vrchatapi/model/TransferGroupRequest.java index 16f822b2..c4a48d06 100644 --- a/src/main/java/io/github/vrchatapi/model/TransferGroupRequest.java +++ b/src/main/java/io/github/vrchatapi/model/TransferGroupRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * TransferGroupRequest */ -@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 TransferGroupRequest { public static final String SERIALIZED_NAME_TRANSFER_TARGET_ID = "transferTargetId"; @SerializedName(SERIALIZED_NAME_TRANSFER_TARGET_ID) + @javax.annotation.Nullable private String transferTargetId; public TransferGroupRequest() { } - public TransferGroupRequest transferTargetId(String transferTargetId) { - + public TransferGroupRequest transferTargetId(@javax.annotation.Nullable String transferTargetId) { this.transferTargetId = transferTargetId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return transferTargetId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getTransferTargetId() { return transferTargetId; } - - public void setTransferTargetId(String transferTargetId) { + public void setTransferTargetId(@javax.annotation.Nullable String transferTargetId) { this.transferTargetId = transferTargetId; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,35 +117,35 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("transferTargetId"); + openapiFields = new HashSet(Arrays.asList("transferTargetId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TransferGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TransferGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransferGroupRequest is not found in the empty JSON string", TransferGroupRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TransferGroupRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TransferGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TransferGroupRequest is not found in the empty JSON string", TransferGroupRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TransferGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TransferGroupRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TransferGroupRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("transferTargetId") != null && !jsonObj.get("transferTargetId").isJsonNull()) && !jsonObj.get("transferTargetId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTargetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTargetId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transferTargetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTargetId").toString())); } } @@ -175,31 +169,31 @@ public void write(JsonWriter out, TransferGroupRequest value) throws IOException @Override public TransferGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TransferGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransferGroupRequest - * @throws IOException if the JSON string is invalid with respect to TransferGroupRequest - */ + /** + * Create an instance of TransferGroupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of TransferGroupRequest + * @throws IOException if the JSON string is invalid with respect to TransferGroupRequest + */ public static TransferGroupRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TransferGroupRequest.class); } - /** - * Convert an instance of TransferGroupRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TransferGroupRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TutorialStatus.java b/src/main/java/io/github/vrchatapi/model/TutorialStatus.java index 46938994..31bc3efb 100644 --- a/src/main/java/io/github/vrchatapi/model/TutorialStatus.java +++ b/src/main/java/io/github/vrchatapi/model/TutorialStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,120 +49,111 @@ /** * TutorialStatus */ -@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 TutorialStatus { public static final String SERIALIZED_NAME_COMPLETED = "completed"; @SerializedName(SERIALIZED_NAME_COMPLETED) + @javax.annotation.Nonnull private Boolean completed; public static final String SERIALIZED_NAME_COMPLETED_ANY_TUTORIAL = "completedAnyTutorial"; @SerializedName(SERIALIZED_NAME_COMPLETED_ANY_TUTORIAL) + @javax.annotation.Nonnull private Boolean completedAnyTutorial; public static final String SERIALIZED_NAME_COMPLETED_TUTORIALS = "completedTutorials"; @SerializedName(SERIALIZED_NAME_COMPLETED_TUTORIALS) + @javax.annotation.Nonnull private List completedTutorials = new ArrayList<>(); public static final String SERIALIZED_NAME_TUTORIAL_KEY = "tutorialKey"; @SerializedName(SERIALIZED_NAME_TUTORIAL_KEY) + @javax.annotation.Nonnull private String tutorialKey = "undefined:undefined:v1"; public TutorialStatus() { } - public TutorialStatus completed(Boolean completed) { - + public TutorialStatus completed(@javax.annotation.Nonnull Boolean completed) { this.completed = completed; return this; } - /** + /** * Get completed * @return completed - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getCompleted() { return completed; } - - public void setCompleted(Boolean completed) { + public void setCompleted(@javax.annotation.Nonnull Boolean completed) { this.completed = completed; } - public TutorialStatus completedAnyTutorial(Boolean completedAnyTutorial) { - + public TutorialStatus completedAnyTutorial(@javax.annotation.Nonnull Boolean completedAnyTutorial) { this.completedAnyTutorial = completedAnyTutorial; return this; } - /** + /** * Get completedAnyTutorial * @return completedAnyTutorial - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getCompletedAnyTutorial() { return completedAnyTutorial; } - - public void setCompletedAnyTutorial(Boolean completedAnyTutorial) { + public void setCompletedAnyTutorial(@javax.annotation.Nonnull Boolean completedAnyTutorial) { this.completedAnyTutorial = completedAnyTutorial; } - public TutorialStatus completedTutorials(List completedTutorials) { - + public TutorialStatus completedTutorials(@javax.annotation.Nonnull List completedTutorials) { this.completedTutorials = completedTutorials; return this; } public TutorialStatus addCompletedTutorialsItem(String completedTutorialsItem) { + if (this.completedTutorials == null) { + this.completedTutorials = new ArrayList<>(); + } this.completedTutorials.add(completedTutorialsItem); return this; } - /** + /** * Get completedTutorials * @return completedTutorials - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getCompletedTutorials() { return completedTutorials; } - - public void setCompletedTutorials(List completedTutorials) { + public void setCompletedTutorials(@javax.annotation.Nonnull List completedTutorials) { this.completedTutorials = completedTutorials; } - public TutorialStatus tutorialKey(String tutorialKey) { - + public TutorialStatus tutorialKey(@javax.annotation.Nonnull String tutorialKey) { this.tutorialKey = tutorialKey; return this; } - /** + /** * The ID of a tutorial, in the format `{platform}:{tutorial}:{version}`. `undefined:undefined:v1` is used as a null-ish or sentinel value. * @return tutorialKey - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows:steam:v1", required = true, value = "The ID of a tutorial, in the format `{platform}:{tutorial}:{version}`. `undefined:undefined:v1` is used as a null-ish or sentinel value.") - public String getTutorialKey() { return tutorialKey; } - - public void setTutorialKey(String tutorialKey) { + public void setTutorialKey(@javax.annotation.Nonnull String tutorialKey) { this.tutorialKey = tutorialKey; } @@ -205,10 +196,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -217,55 +205,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("completed"); - openapiFields.add("completedAnyTutorial"); - openapiFields.add("completedTutorials"); - openapiFields.add("tutorialKey"); + openapiFields = new HashSet(Arrays.asList("completed", "completedAnyTutorial", "completedTutorials", "tutorialKey")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("completed"); - openapiRequiredFields.add("completedAnyTutorial"); - openapiRequiredFields.add("completedTutorials"); - openapiRequiredFields.add("tutorialKey"); + openapiRequiredFields = new HashSet(Arrays.asList("completed", "completedAnyTutorial", "completedTutorials", "tutorialKey")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TutorialStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TutorialStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TutorialStatus is not found in the empty JSON string", TutorialStatus.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TutorialStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TutorialStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TutorialStatus is not found in the empty JSON string", TutorialStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TutorialStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TutorialStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TutorialStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TutorialStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("completedTutorials") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("completedTutorials").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `completedTutorials` to be an array in the JSON string but got `%s`", jsonObj.get("completedTutorials").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `completedTutorials` to be an array in the JSON string but got `%s`", jsonObj.get("completedTutorials").toString())); } if (!jsonObj.get("tutorialKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tutorialKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tutorialKey").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tutorialKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tutorialKey").toString())); } } @@ -289,31 +270,31 @@ public void write(JsonWriter out, TutorialStatus value) throws IOException { @Override public TutorialStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TutorialStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of TutorialStatus - * @throws IOException if the JSON string is invalid with respect to TutorialStatus - */ + /** + * Create an instance of TutorialStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of TutorialStatus + * @throws IOException if the JSON string is invalid with respect to TutorialStatus + */ public static TutorialStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TutorialStatus.class); } - /** - * Convert an instance of TutorialStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TutorialStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TwoFactorAuthCode.java b/src/main/java/io/github/vrchatapi/model/TwoFactorAuthCode.java index 01b48edc..967ae423 100644 --- a/src/main/java/io/github/vrchatapi/model/TwoFactorAuthCode.java +++ b/src/main/java/io/github/vrchatapi/model/TwoFactorAuthCode.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * TwoFactorAuthCode */ -@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 TwoFactorAuthCode { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nonnull private String code; public TwoFactorAuthCode() { } - public TwoFactorAuthCode code(String code) { - + public TwoFactorAuthCode code(@javax.annotation.Nonnull String code) { this.code = code; return this; } - /** + /** * Get code * @return code - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getCode() { return code; } - - public void setCode(String code) { + public void setCode(@javax.annotation.Nonnull String code) { this.code = code; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,43 +117,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); + openapiFields = new HashSet(Arrays.asList("code")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); + openapiRequiredFields = new HashSet(Arrays.asList("code")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TwoFactorAuthCode - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TwoFactorAuthCode.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TwoFactorAuthCode is not found in the empty JSON string", TwoFactorAuthCode.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TwoFactorAuthCode + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TwoFactorAuthCode.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TwoFactorAuthCode is not found in the empty JSON string", TwoFactorAuthCode.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TwoFactorAuthCode.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TwoFactorAuthCode` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TwoFactorAuthCode` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TwoFactorAuthCode.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } } @@ -183,31 +176,31 @@ public void write(JsonWriter out, TwoFactorAuthCode value) throws IOException { @Override public TwoFactorAuthCode read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TwoFactorAuthCode given an JSON string - * - * @param jsonString JSON string - * @return An instance of TwoFactorAuthCode - * @throws IOException if the JSON string is invalid with respect to TwoFactorAuthCode - */ + /** + * Create an instance of TwoFactorAuthCode given an JSON string + * + * @param jsonString JSON string + * @return An instance of TwoFactorAuthCode + * @throws IOException if the JSON string is invalid with respect to TwoFactorAuthCode + */ public static TwoFactorAuthCode fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TwoFactorAuthCode.class); } - /** - * Convert an instance of TwoFactorAuthCode to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TwoFactorAuthCode to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TwoFactorAuthType.java b/src/main/java/io/github/vrchatapi/model/TwoFactorAuthType.java new file mode 100644 index 00000000..8c06bed7 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/TwoFactorAuthType.java @@ -0,0 +1,79 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8-nightly.20 + * 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.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets TwoFactorAuthType + */ +@JsonAdapter(TwoFactorAuthType.Adapter.class) +public enum TwoFactorAuthType { + + EMAIL_OTP("emailOtp"), + + OTP("otp"), + + TOTP("totp"); + + private String value; + + TwoFactorAuthType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TwoFactorAuthType fromValue(String value) { + for (TwoFactorAuthType b : TwoFactorAuthType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TwoFactorAuthType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TwoFactorAuthType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TwoFactorAuthType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TwoFactorAuthType.fromValue(value); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/TwoFactorEmailCode.java b/src/main/java/io/github/vrchatapi/model/TwoFactorEmailCode.java index 17a17b71..209d0881 100644 --- a/src/main/java/io/github/vrchatapi/model/TwoFactorEmailCode.java +++ b/src/main/java/io/github/vrchatapi/model/TwoFactorEmailCode.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * TwoFactorEmailCode */ -@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 TwoFactorEmailCode { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nonnull private String code; public TwoFactorEmailCode() { } - public TwoFactorEmailCode code(String code) { - + public TwoFactorEmailCode code(@javax.annotation.Nonnull String code) { this.code = code; return this; } - /** + /** * Get code * @return code - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getCode() { return code; } - - public void setCode(String code) { + public void setCode(@javax.annotation.Nonnull String code) { this.code = code; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,43 +117,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); + openapiFields = new HashSet(Arrays.asList("code")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); + openapiRequiredFields = new HashSet(Arrays.asList("code")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TwoFactorEmailCode - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TwoFactorEmailCode.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TwoFactorEmailCode is not found in the empty JSON string", TwoFactorEmailCode.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TwoFactorEmailCode + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TwoFactorEmailCode.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TwoFactorEmailCode is not found in the empty JSON string", TwoFactorEmailCode.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TwoFactorEmailCode.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TwoFactorEmailCode` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TwoFactorEmailCode` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TwoFactorEmailCode.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } } @@ -183,31 +176,31 @@ public void write(JsonWriter out, TwoFactorEmailCode value) throws IOException { @Override public TwoFactorEmailCode read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TwoFactorEmailCode given an JSON string - * - * @param jsonString JSON string - * @return An instance of TwoFactorEmailCode - * @throws IOException if the JSON string is invalid with respect to TwoFactorEmailCode - */ + /** + * Create an instance of TwoFactorEmailCode given an JSON string + * + * @param jsonString JSON string + * @return An instance of TwoFactorEmailCode + * @throws IOException if the JSON string is invalid with respect to TwoFactorEmailCode + */ public static TwoFactorEmailCode fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TwoFactorEmailCode.class); } - /** - * Convert an instance of TwoFactorEmailCode to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TwoFactorEmailCode to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodes.java b/src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodes.java index 9c939e03..176e0290 100644 --- a/src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodes.java +++ b/src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodes.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.TwoFactorRecoveryCodesOtpInner; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,21 +50,22 @@ /** * TwoFactorRecoveryCodes */ -@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 TwoFactorRecoveryCodes { public static final String SERIALIZED_NAME_OTP = "otp"; @SerializedName(SERIALIZED_NAME_OTP) - private List otp = null; + @javax.annotation.Nullable + private List otp = new ArrayList<>(); public static final String SERIALIZED_NAME_REQUIRES_TWO_FACTOR_AUTH = "requiresTwoFactorAuth"; @SerializedName(SERIALIZED_NAME_REQUIRES_TWO_FACTOR_AUTH) - private List requiresTwoFactorAuth = null; + @javax.annotation.Nullable + private List requiresTwoFactorAuth = new ArrayList<>(); public TwoFactorRecoveryCodes() { } - public TwoFactorRecoveryCodes otp(List otp) { - + public TwoFactorRecoveryCodes otp(@javax.annotation.Nullable List otp) { this.otp = otp; return this; } @@ -77,25 +78,21 @@ public TwoFactorRecoveryCodes addOtpItem(TwoFactorRecoveryCodesOtpInner otpItem) return this; } - /** + /** * Get otp * @return otp - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getOtp() { return otp; } - - public void setOtp(List otp) { + public void setOtp(@javax.annotation.Nullable List otp) { this.otp = otp; } - public TwoFactorRecoveryCodes requiresTwoFactorAuth(List requiresTwoFactorAuth) { - + public TwoFactorRecoveryCodes requiresTwoFactorAuth(@javax.annotation.Nullable List requiresTwoFactorAuth) { this.requiresTwoFactorAuth = requiresTwoFactorAuth; return this; } @@ -108,19 +105,16 @@ public TwoFactorRecoveryCodes addRequiresTwoFactorAuthItem(String requiresTwoFac return this; } - /** + /** * Get requiresTwoFactorAuth * @return requiresTwoFactorAuth - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getRequiresTwoFactorAuth() { return requiresTwoFactorAuth; } - - public void setRequiresTwoFactorAuth(List requiresTwoFactorAuth) { + public void setRequiresTwoFactorAuth(@javax.annotation.Nullable List requiresTwoFactorAuth) { this.requiresTwoFactorAuth = requiresTwoFactorAuth; } @@ -159,10 +153,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -171,51 +162,50 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("otp"); - openapiFields.add("requiresTwoFactorAuth"); + openapiFields = new HashSet(Arrays.asList("otp", "requiresTwoFactorAuth")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TwoFactorRecoveryCodes - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TwoFactorRecoveryCodes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TwoFactorRecoveryCodes is not found in the empty JSON string", TwoFactorRecoveryCodes.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TwoFactorRecoveryCodes + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TwoFactorRecoveryCodes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TwoFactorRecoveryCodes is not found in the empty JSON string", TwoFactorRecoveryCodes.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TwoFactorRecoveryCodes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TwoFactorRecoveryCodes` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TwoFactorRecoveryCodes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("otp") != null && !jsonObj.get("otp").isJsonNull()) { JsonArray jsonArrayotp = jsonObj.getAsJsonArray("otp"); if (jsonArrayotp != null) { // ensure the json data is an array if (!jsonObj.get("otp").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `otp` to be an array in the JSON string but got `%s`", jsonObj.get("otp").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `otp` to be an array in the JSON string but got `%s`", jsonObj.get("otp").toString())); } // validate the optional field `otp` (array) for (int i = 0; i < jsonArrayotp.size(); i++) { - TwoFactorRecoveryCodesOtpInner.validateJsonObject(jsonArrayotp.get(i).getAsJsonObject()); + TwoFactorRecoveryCodesOtpInner.validateJsonElement(jsonArrayotp.get(i)); }; } } // ensure the optional json data is an array if present - if (jsonObj.get("requiresTwoFactorAuth") != null && !jsonObj.get("requiresTwoFactorAuth").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `requiresTwoFactorAuth` to be an array in the JSON string but got `%s`", jsonObj.get("requiresTwoFactorAuth").toString())); + if (jsonObj.get("requiresTwoFactorAuth") != null && !jsonObj.get("requiresTwoFactorAuth").isJsonNull() && !jsonObj.get("requiresTwoFactorAuth").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `requiresTwoFactorAuth` to be an array in the JSON string but got `%s`", jsonObj.get("requiresTwoFactorAuth").toString())); } } @@ -239,31 +229,31 @@ public void write(JsonWriter out, TwoFactorRecoveryCodes value) throws IOExcepti @Override public TwoFactorRecoveryCodes read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TwoFactorRecoveryCodes given an JSON string - * - * @param jsonString JSON string - * @return An instance of TwoFactorRecoveryCodes - * @throws IOException if the JSON string is invalid with respect to TwoFactorRecoveryCodes - */ + /** + * Create an instance of TwoFactorRecoveryCodes given an JSON string + * + * @param jsonString JSON string + * @return An instance of TwoFactorRecoveryCodes + * @throws IOException if the JSON string is invalid with respect to TwoFactorRecoveryCodes + */ public static TwoFactorRecoveryCodes fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TwoFactorRecoveryCodes.class); } - /** - * Convert an instance of TwoFactorRecoveryCodes to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TwoFactorRecoveryCodes to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodesOtpInner.java b/src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodesOtpInner.java index c813dbd5..1ac05816 100644 --- a/src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodesOtpInner.java +++ b/src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodesOtpInner.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * TwoFactorRecoveryCodesOtpInner */ -@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 TwoFactorRecoveryCodesOtpInner { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nonnull private String code; public static final String SERIALIZED_NAME_USED = "used"; @SerializedName(SERIALIZED_NAME_USED) + @javax.annotation.Nonnull private Boolean used; public TwoFactorRecoveryCodesOtpInner() { } - public TwoFactorRecoveryCodesOtpInner code(String code) { - + public TwoFactorRecoveryCodesOtpInner code(@javax.annotation.Nonnull String code) { this.code = code; return this; } - /** + /** * Get code * @return code - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getCode() { return code; } - - public void setCode(String code) { + public void setCode(@javax.annotation.Nonnull String code) { this.code = code; } - public TwoFactorRecoveryCodesOtpInner used(Boolean used) { - + public TwoFactorRecoveryCodesOtpInner used(@javax.annotation.Nonnull Boolean used) { this.used = used; return this; } - /** + /** * Get used * @return used - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getUsed() { return used; } - - public void setUsed(Boolean used) { + public void setUsed(@javax.annotation.Nonnull Boolean used) { this.used = used; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,45 +143,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("used"); + openapiFields = new HashSet(Arrays.asList("code", "used")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); - openapiRequiredFields.add("used"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to TwoFactorRecoveryCodesOtpInner - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TwoFactorRecoveryCodesOtpInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TwoFactorRecoveryCodesOtpInner is not found in the empty JSON string", TwoFactorRecoveryCodesOtpInner.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("code", "used")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TwoFactorRecoveryCodesOtpInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TwoFactorRecoveryCodesOtpInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in TwoFactorRecoveryCodesOtpInner is not found in the empty JSON string", TwoFactorRecoveryCodesOtpInner.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!TwoFactorRecoveryCodesOtpInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TwoFactorRecoveryCodesOtpInner` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `TwoFactorRecoveryCodesOtpInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TwoFactorRecoveryCodesOtpInner.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } } @@ -214,31 +202,31 @@ public void write(JsonWriter out, TwoFactorRecoveryCodesOtpInner value) throws I @Override public TwoFactorRecoveryCodesOtpInner read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of TwoFactorRecoveryCodesOtpInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of TwoFactorRecoveryCodesOtpInner - * @throws IOException if the JSON string is invalid with respect to TwoFactorRecoveryCodesOtpInner - */ + /** + * Create an instance of TwoFactorRecoveryCodesOtpInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of TwoFactorRecoveryCodesOtpInner + * @throws IOException if the JSON string is invalid with respect to TwoFactorRecoveryCodesOtpInner + */ public static TwoFactorRecoveryCodesOtpInner fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, TwoFactorRecoveryCodesOtpInner.class); } - /** - * Convert an instance of TwoFactorRecoveryCodesOtpInner to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of TwoFactorRecoveryCodesOtpInner to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UnityPackage.java b/src/main/java/io/github/vrchatapi/model/UnityPackage.java index 4005eb62..840bfdab 100644 --- a/src/main/java/io/github/vrchatapi/model/UnityPackage.java +++ b/src/main/java/io/github/vrchatapi/model/UnityPackage.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.PerformanceRatings; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,442 +50,393 @@ /** * */ -@ApiModel(description = "") -@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 UnityPackage { public static final String SERIALIZED_NAME_ASSET_URL = "assetUrl"; @SerializedName(SERIALIZED_NAME_ASSET_URL) + @javax.annotation.Nullable private String assetUrl; public static final String SERIALIZED_NAME_ASSET_URL_OBJECT = "assetUrlObject"; @SerializedName(SERIALIZED_NAME_ASSET_URL_OBJECT) + @javax.annotation.Nullable private Object assetUrlObject; public static final String SERIALIZED_NAME_ASSET_VERSION = "assetVersion"; @SerializedName(SERIALIZED_NAME_ASSET_VERSION) + @javax.annotation.Nonnull private Integer assetVersion; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMPOSTOR_URL = "impostorUrl"; @SerializedName(SERIALIZED_NAME_IMPOSTOR_URL) + @javax.annotation.Nullable private String impostorUrl; public static final String SERIALIZED_NAME_IMPOSTORIZER_VERSION = "impostorizerVersion"; @SerializedName(SERIALIZED_NAME_IMPOSTORIZER_VERSION) + @javax.annotation.Nullable private String impostorizerVersion; public static final String SERIALIZED_NAME_PERFORMANCE_RATING = "performanceRating"; @SerializedName(SERIALIZED_NAME_PERFORMANCE_RATING) + @javax.annotation.Nullable private PerformanceRatings performanceRating; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nonnull private String platform; public static final String SERIALIZED_NAME_PLUGIN_URL = "pluginUrl"; @SerializedName(SERIALIZED_NAME_PLUGIN_URL) + @javax.annotation.Nullable private String pluginUrl; public static final String SERIALIZED_NAME_PLUGIN_URL_OBJECT = "pluginUrlObject"; @SerializedName(SERIALIZED_NAME_PLUGIN_URL_OBJECT) + @javax.annotation.Nullable private Object pluginUrlObject; public static final String SERIALIZED_NAME_SCAN_STATUS = "scanStatus"; @SerializedName(SERIALIZED_NAME_SCAN_STATUS) + @javax.annotation.Nullable private String scanStatus; public static final String SERIALIZED_NAME_UNITY_SORT_NUMBER = "unitySortNumber"; @SerializedName(SERIALIZED_NAME_UNITY_SORT_NUMBER) + @javax.annotation.Nullable private Long unitySortNumber; public static final String SERIALIZED_NAME_UNITY_VERSION = "unityVersion"; @SerializedName(SERIALIZED_NAME_UNITY_VERSION) + @javax.annotation.Nonnull private String unityVersion = "5.3.4p1"; public static final String SERIALIZED_NAME_VARIANT = "variant"; @SerializedName(SERIALIZED_NAME_VARIANT) + @javax.annotation.Nullable private String variant; public static final String SERIALIZED_NAME_WORLD_SIGNATURE = "worldSignature"; @SerializedName(SERIALIZED_NAME_WORLD_SIGNATURE) + @javax.annotation.Nullable private String worldSignature; public UnityPackage() { } - public UnityPackage assetUrl(String assetUrl) { - + public UnityPackage assetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; return this; } - /** + /** * Get assetUrl * @return assetUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/file/file_cd0caa7b-69ba-4715-8dfe-7d667a9d2537/65/file", value = "") - public String getAssetUrl() { return assetUrl; } - - public void setAssetUrl(String assetUrl) { + public void setAssetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; } - public UnityPackage assetUrlObject(Object assetUrlObject) { - + public UnityPackage assetUrlObject(@javax.annotation.Nullable Object assetUrlObject) { this.assetUrlObject = assetUrlObject; return this; } - /** + /** * Get assetUrlObject * @return assetUrlObject - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "{}", value = "") - public Object getAssetUrlObject() { return assetUrlObject; } - - public void setAssetUrlObject(Object assetUrlObject) { + public void setAssetUrlObject(@javax.annotation.Nullable Object assetUrlObject) { this.assetUrlObject = assetUrlObject; } - public UnityPackage assetVersion(Integer assetVersion) { - + public UnityPackage assetVersion(@javax.annotation.Nonnull Integer assetVersion) { this.assetVersion = assetVersion; return this; } - /** + /** * Get assetVersion * minimum: 0 * @return assetVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "4", required = true, value = "") - public Integer getAssetVersion() { return assetVersion; } - - public void setAssetVersion(Integer assetVersion) { + public void setAssetVersion(@javax.annotation.Nonnull Integer assetVersion) { this.assetVersion = assetVersion; } - public UnityPackage createdAt(OffsetDateTime createdAt) { - + public UnityPackage createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "2020-09-10T06:13:27.777Z", value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } - public UnityPackage id(String id) { - + public UnityPackage id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "unp_52b12c39-4163-457d-a4a9-630e7aff1bff", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public UnityPackage impostorUrl(String impostorUrl) { - + public UnityPackage impostorUrl(@javax.annotation.Nullable String impostorUrl) { this.impostorUrl = impostorUrl; return this; } - /** + /** * Get impostorUrl * @return impostorUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImpostorUrl() { return impostorUrl; } - - public void setImpostorUrl(String impostorUrl) { + public void setImpostorUrl(@javax.annotation.Nullable String impostorUrl) { this.impostorUrl = impostorUrl; } - public UnityPackage impostorizerVersion(String impostorizerVersion) { - + public UnityPackage impostorizerVersion(@javax.annotation.Nullable String impostorizerVersion) { this.impostorizerVersion = impostorizerVersion; return this; } - /** + /** * Get impostorizerVersion * @return impostorizerVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "0.17.0", value = "") - public String getImpostorizerVersion() { return impostorizerVersion; } - - public void setImpostorizerVersion(String impostorizerVersion) { + public void setImpostorizerVersion(@javax.annotation.Nullable String impostorizerVersion) { this.impostorizerVersion = impostorizerVersion; } - public UnityPackage performanceRating(PerformanceRatings performanceRating) { - + public UnityPackage performanceRating(@javax.annotation.Nullable PerformanceRatings performanceRating) { this.performanceRating = performanceRating; return this; } - /** + /** * Get performanceRating * @return performanceRating - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public PerformanceRatings getPerformanceRating() { return performanceRating; } - - public void setPerformanceRating(PerformanceRatings performanceRating) { + public void setPerformanceRating(@javax.annotation.Nullable PerformanceRatings performanceRating) { this.performanceRating = performanceRating; } - public UnityPackage platform(String platform) { - + public UnityPackage platform(@javax.annotation.Nonnull String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows", required = true, value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nonnull String platform) { this.platform = platform; } - public UnityPackage pluginUrl(String pluginUrl) { - + public UnityPackage pluginUrl(@javax.annotation.Nullable String pluginUrl) { this.pluginUrl = pluginUrl; return this; } - /** + /** * Get pluginUrl * @return pluginUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "", value = "") - public String getPluginUrl() { return pluginUrl; } - - public void setPluginUrl(String pluginUrl) { + public void setPluginUrl(@javax.annotation.Nullable String pluginUrl) { this.pluginUrl = pluginUrl; } - public UnityPackage pluginUrlObject(Object pluginUrlObject) { - + public UnityPackage pluginUrlObject(@javax.annotation.Nullable Object pluginUrlObject) { this.pluginUrlObject = pluginUrlObject; return this; } - /** + /** * Get pluginUrlObject * @return pluginUrlObject - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "{}", value = "") - public Object getPluginUrlObject() { return pluginUrlObject; } - - public void setPluginUrlObject(Object pluginUrlObject) { + public void setPluginUrlObject(@javax.annotation.Nullable Object pluginUrlObject) { this.pluginUrlObject = pluginUrlObject; } - public UnityPackage scanStatus(String scanStatus) { - + public UnityPackage scanStatus(@javax.annotation.Nullable String scanStatus) { this.scanStatus = scanStatus; return this; } - /** + /** * Get scanStatus * @return scanStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getScanStatus() { return scanStatus; } - - public void setScanStatus(String scanStatus) { + public void setScanStatus(@javax.annotation.Nullable String scanStatus) { this.scanStatus = scanStatus; } - public UnityPackage unitySortNumber(Long unitySortNumber) { - + public UnityPackage unitySortNumber(@javax.annotation.Nullable Long unitySortNumber) { this.unitySortNumber = unitySortNumber; return this; } - /** + /** * Get unitySortNumber * minimum: 0 * @return unitySortNumber - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "20180414000", value = "") - public Long getUnitySortNumber() { return unitySortNumber; } - - public void setUnitySortNumber(Long unitySortNumber) { + public void setUnitySortNumber(@javax.annotation.Nullable Long unitySortNumber) { this.unitySortNumber = unitySortNumber; } - public UnityPackage unityVersion(String unityVersion) { - + public UnityPackage unityVersion(@javax.annotation.Nonnull String unityVersion) { this.unityVersion = unityVersion; return this; } - /** + /** * Get unityVersion * @return unityVersion - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "2022.3.6f1", required = true, value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nonnull String unityVersion) { this.unityVersion = unityVersion; } - public UnityPackage variant(String variant) { - + public UnityPackage variant(@javax.annotation.Nullable String variant) { this.variant = variant; return this; } - /** + /** * Get variant * @return variant - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getVariant() { return variant; } - - public void setVariant(String variant) { + public void setVariant(@javax.annotation.Nullable String variant) { this.variant = variant; } - public UnityPackage worldSignature(String worldSignature) { - + public UnityPackage worldSignature(@javax.annotation.Nullable String worldSignature) { this.worldSignature = worldSignature; return this; } - /** + /** * Get worldSignature * @return worldSignature - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "AHiPAWerwCpeYrxDthF5TU2SdUWEWnm43UAn8PKRXlS8k8tVRQ==", value = "") - public String getWorldSignature() { return worldSignature; } - - public void setWorldSignature(String worldSignature) { + public void setWorldSignature(@javax.annotation.Nullable String worldSignature) { this.worldSignature = worldSignature; } @@ -563,10 +514,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -575,88 +523,73 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assetUrl"); - openapiFields.add("assetUrlObject"); - openapiFields.add("assetVersion"); - openapiFields.add("created_at"); - openapiFields.add("id"); - openapiFields.add("impostorUrl"); - openapiFields.add("impostorizerVersion"); - openapiFields.add("performanceRating"); - openapiFields.add("platform"); - openapiFields.add("pluginUrl"); - openapiFields.add("pluginUrlObject"); - openapiFields.add("scanStatus"); - openapiFields.add("unitySortNumber"); - openapiFields.add("unityVersion"); - openapiFields.add("variant"); - openapiFields.add("worldSignature"); + openapiFields = new HashSet(Arrays.asList("assetUrl", "assetUrlObject", "assetVersion", "created_at", "id", "impostorUrl", "impostorizerVersion", "performanceRating", "platform", "pluginUrl", "pluginUrlObject", "scanStatus", "unitySortNumber", "unityVersion", "variant", "worldSignature")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("assetVersion"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("platform"); - openapiRequiredFields.add("unityVersion"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UnityPackage - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnityPackage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnityPackage is not found in the empty JSON string", UnityPackage.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("assetVersion", "id", "platform", "unityVersion")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UnityPackage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UnityPackage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UnityPackage is not found in the empty JSON string", UnityPackage.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UnityPackage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnityPackage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UnityPackage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UnityPackage.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("assetUrl") != null && !jsonObj.get("assetUrl").isJsonNull()) && !jsonObj.get("assetUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("impostorUrl") != null && !jsonObj.get("impostorUrl").isJsonNull()) && !jsonObj.get("impostorUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `impostorUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("impostorUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `impostorUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("impostorUrl").toString())); } if ((jsonObj.get("impostorizerVersion") != null && !jsonObj.get("impostorizerVersion").isJsonNull()) && !jsonObj.get("impostorizerVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `impostorizerVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("impostorizerVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `impostorizerVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("impostorizerVersion").toString())); + } + // validate the optional field `performanceRating` + if (jsonObj.get("performanceRating") != null && !jsonObj.get("performanceRating").isJsonNull()) { + PerformanceRatings.validateJsonElement(jsonObj.get("performanceRating")); } if (!jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if ((jsonObj.get("pluginUrl") != null && !jsonObj.get("pluginUrl").isJsonNull()) && !jsonObj.get("pluginUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `pluginUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pluginUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pluginUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pluginUrl").toString())); } if ((jsonObj.get("scanStatus") != null && !jsonObj.get("scanStatus").isJsonNull()) && !jsonObj.get("scanStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `scanStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scanStatus").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `scanStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scanStatus").toString())); } if (!jsonObj.get("unityVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); } if ((jsonObj.get("variant") != null && !jsonObj.get("variant").isJsonNull()) && !jsonObj.get("variant").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `variant` to be a primitive type in the JSON string but got `%s`", jsonObj.get("variant").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `variant` to be a primitive type in the JSON string but got `%s`", jsonObj.get("variant").toString())); } if ((jsonObj.get("worldSignature") != null && !jsonObj.get("worldSignature").isJsonNull()) && !jsonObj.get("worldSignature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldSignature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldSignature").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldSignature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldSignature").toString())); } } @@ -680,31 +613,31 @@ public void write(JsonWriter out, UnityPackage value) throws IOException { @Override public UnityPackage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UnityPackage given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnityPackage - * @throws IOException if the JSON string is invalid with respect to UnityPackage - */ + /** + * Create an instance of UnityPackage given an JSON string + * + * @param jsonString JSON string + * @return An instance of UnityPackage + * @throws IOException if the JSON string is invalid with respect to UnityPackage + */ public static UnityPackage fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UnityPackage.class); } - /** - * Convert an instance of UnityPackage to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UnityPackage to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateAssetReviewNotesRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateAssetReviewNotesRequest.java index 3996adc2..6ecbc1b6 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateAssetReviewNotesRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateAssetReviewNotesRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * UpdateAssetReviewNotesRequest */ -@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 UpdateAssetReviewNotesRequest { public static final String SERIALIZED_NAME_REVIEW_NOTES = "reviewNotes"; @SerializedName(SERIALIZED_NAME_REVIEW_NOTES) + @javax.annotation.Nonnull private String reviewNotes; public UpdateAssetReviewNotesRequest() { } - public UpdateAssetReviewNotesRequest reviewNotes(String reviewNotes) { - + public UpdateAssetReviewNotesRequest reviewNotes(@javax.annotation.Nonnull String reviewNotes) { this.reviewNotes = reviewNotes; return this; } - /** + /** * Get reviewNotes * @return reviewNotes - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getReviewNotes() { return reviewNotes; } - - public void setReviewNotes(String reviewNotes) { + public void setReviewNotes(@javax.annotation.Nonnull String reviewNotes) { this.reviewNotes = reviewNotes; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,43 +117,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reviewNotes"); + openapiFields = new HashSet(Arrays.asList("reviewNotes")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("reviewNotes"); + openapiRequiredFields = new HashSet(Arrays.asList("reviewNotes")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateAssetReviewNotesRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateAssetReviewNotesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateAssetReviewNotesRequest is not found in the empty JSON string", UpdateAssetReviewNotesRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateAssetReviewNotesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateAssetReviewNotesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateAssetReviewNotesRequest is not found in the empty JSON string", UpdateAssetReviewNotesRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateAssetReviewNotesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateAssetReviewNotesRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateAssetReviewNotesRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateAssetReviewNotesRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("reviewNotes").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reviewNotes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reviewNotes").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reviewNotes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reviewNotes").toString())); } } @@ -183,31 +176,31 @@ public void write(JsonWriter out, UpdateAssetReviewNotesRequest value) throws IO @Override public UpdateAssetReviewNotesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateAssetReviewNotesRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateAssetReviewNotesRequest - * @throws IOException if the JSON string is invalid with respect to UpdateAssetReviewNotesRequest - */ + /** + * Create an instance of UpdateAssetReviewNotesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateAssetReviewNotesRequest + * @throws IOException if the JSON string is invalid with respect to UpdateAssetReviewNotesRequest + */ public static UpdateAssetReviewNotesRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateAssetReviewNotesRequest.class); } - /** - * Convert an instance of UpdateAssetReviewNotesRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateAssetReviewNotesRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateAvatarRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateAvatarRequest.java index 93f21b60..52e1599a 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateAvatarRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateAvatarRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ReleaseStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,191 +50,176 @@ /** * UpdateAvatarRequest */ -@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 UpdateAvatarRequest { public static final String SERIALIZED_NAME_ASSET_URL = "assetUrl"; @SerializedName(SERIALIZED_NAME_ASSET_URL) + @javax.annotation.Nullable private String assetUrl; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_RELEASE_STATUS = "releaseStatus"; @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) + @javax.annotation.Nullable private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_UNITY_PACKAGE_URL = "unityPackageUrl"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGE_URL) + @javax.annotation.Nullable private String unityPackageUrl; public static final String SERIALIZED_NAME_UNITY_VERSION = "unityVersion"; @SerializedName(SERIALIZED_NAME_UNITY_VERSION) + @javax.annotation.Nullable private String unityVersion = "5.3.4p1"; public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nullable private Integer version = 1; public UpdateAvatarRequest() { } - public UpdateAvatarRequest assetUrl(String assetUrl) { - + public UpdateAvatarRequest assetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; return this; } - /** + /** * Get assetUrl * @return assetUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAssetUrl() { return assetUrl; } - - public void setAssetUrl(String assetUrl) { + public void setAssetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; } - public UpdateAvatarRequest description(String description) { - + public UpdateAvatarRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public UpdateAvatarRequest id(String id) { - + public UpdateAvatarRequest id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "avtr_912d66a4-4714-43b8-8407-7de2cafbf55b", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public UpdateAvatarRequest imageUrl(String imageUrl) { - + public UpdateAvatarRequest imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public UpdateAvatarRequest name(String name) { - + public UpdateAvatarRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public UpdateAvatarRequest releaseStatus(ReleaseStatus releaseStatus) { - + public UpdateAvatarRequest releaseStatus(@javax.annotation.Nullable ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; return this; } - /** + /** * Get releaseStatus * @return releaseStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ReleaseStatus getReleaseStatus() { return releaseStatus; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { + public void setReleaseStatus(@javax.annotation.Nullable ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; } - public UpdateAvatarRequest tags(List tags) { - + public UpdateAvatarRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -247,89 +232,74 @@ public UpdateAvatarRequest addTagsItem(String tagsItem) { return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public UpdateAvatarRequest unityPackageUrl(String unityPackageUrl) { - + public UpdateAvatarRequest unityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; return this; } - /** + /** * Get unityPackageUrl * @return unityPackageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUnityPackageUrl() { return unityPackageUrl; } - - public void setUnityPackageUrl(String unityPackageUrl) { + public void setUnityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; } - public UpdateAvatarRequest unityVersion(String unityVersion) { - + public UpdateAvatarRequest unityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; return this; } - /** + /** * Get unityVersion * @return unityVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "2022.3.6f1", value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; } - public UpdateAvatarRequest version(Integer version) { - + public UpdateAvatarRequest version(@javax.annotation.Nullable Integer version) { this.version = version; return this; } - /** + /** * Get version * minimum: 0 * @return version - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nullable Integer version) { this.version = version; } @@ -384,10 +354,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -396,66 +363,61 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assetUrl"); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("name"); - openapiFields.add("releaseStatus"); - openapiFields.add("tags"); - openapiFields.add("unityPackageUrl"); - openapiFields.add("unityVersion"); - openapiFields.add("version"); + openapiFields = new HashSet(Arrays.asList("assetUrl", "description", "id", "imageUrl", "name", "releaseStatus", "tags", "unityPackageUrl", "unityVersion", "version")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateAvatarRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateAvatarRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateAvatarRequest is not found in the empty JSON string", UpdateAvatarRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateAvatarRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateAvatarRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateAvatarRequest is not found in the empty JSON string", UpdateAvatarRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateAvatarRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateAvatarRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateAvatarRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("assetUrl") != null && !jsonObj.get("assetUrl").isJsonNull()) && !jsonObj.get("assetUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // validate the optional field `releaseStatus` + if (jsonObj.get("releaseStatus") != null && !jsonObj.get("releaseStatus").isJsonNull()) { + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("unityPackageUrl") != null && !jsonObj.get("unityPackageUrl").isJsonNull()) && !jsonObj.get("unityPackageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); } if ((jsonObj.get("unityVersion") != null && !jsonObj.get("unityVersion").isJsonNull()) && !jsonObj.get("unityVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); } } @@ -479,31 +441,31 @@ public void write(JsonWriter out, UpdateAvatarRequest value) throws IOException @Override public UpdateAvatarRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateAvatarRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateAvatarRequest - * @throws IOException if the JSON string is invalid with respect to UpdateAvatarRequest - */ + /** + * Create an instance of UpdateAvatarRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateAvatarRequest + * @throws IOException if the JSON string is invalid with respect to UpdateAvatarRequest + */ public static UpdateAvatarRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateAvatarRequest.class); } - /** - * Convert an instance of UpdateAvatarRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateAvatarRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateCalendarEventRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateCalendarEventRequest.java index c6e4c440..c8bff3ba 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateCalendarEventRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateCalendarEventRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,18 +13,16 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.CalendarEventRecurrence; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -38,13 +36,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -52,296 +52,278 @@ /** * UpdateCalendarEventRequest */ -@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 UpdateCalendarEventRequest { public static final String SERIALIZED_NAME_CATEGORY = "category"; @SerializedName(SERIALIZED_NAME_CATEGORY) + @javax.annotation.Nullable private String category; public static final String SERIALIZED_NAME_CLOSE_INSTANCE_AFTER_END_MINUTES = "closeInstanceAfterEndMinutes"; @SerializedName(SERIALIZED_NAME_CLOSE_INSTANCE_AFTER_END_MINUTES) + @javax.annotation.Nullable private Integer closeInstanceAfterEndMinutes; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_ENDS_AT = "endsAt"; @SerializedName(SERIALIZED_NAME_ENDS_AT) + @javax.annotation.Nullable private OffsetDateTime endsAt; public static final String SERIALIZED_NAME_FEATURED = "featured"; @SerializedName(SERIALIZED_NAME_FEATURED) + @javax.annotation.Nullable private Boolean featured; public static final String SERIALIZED_NAME_GUEST_EARLY_JOIN_MINUTES = "guestEarlyJoinMinutes"; @SerializedName(SERIALIZED_NAME_GUEST_EARLY_JOIN_MINUTES) + @javax.annotation.Nullable private Integer guestEarlyJoinMinutes; public static final String SERIALIZED_NAME_HOST_EARLY_JOIN_MINUTES = "hostEarlyJoinMinutes"; @SerializedName(SERIALIZED_NAME_HOST_EARLY_JOIN_MINUTES) + @javax.annotation.Nullable private Integer hostEarlyJoinMinutes; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nullable private String imageId; public static final String SERIALIZED_NAME_IS_DRAFT = "isDraft"; @SerializedName(SERIALIZED_NAME_IS_DRAFT) + @javax.annotation.Nullable private Boolean isDraft; public static final String SERIALIZED_NAME_LANGUAGES = "languages"; @SerializedName(SERIALIZED_NAME_LANGUAGES) - private List languages = null; + @javax.annotation.Nullable + private List languages = new ArrayList<>(); public static final String SERIALIZED_NAME_PARENT_ID = "parentId"; @SerializedName(SERIALIZED_NAME_PARENT_ID) + @javax.annotation.Nullable private String parentId; public static final String SERIALIZED_NAME_PLATFORMS = "platforms"; @SerializedName(SERIALIZED_NAME_PLATFORMS) - private List platforms = null; + @javax.annotation.Nullable + private List platforms = new ArrayList<>(); public static final String SERIALIZED_NAME_RECURRENCE = "recurrence"; @SerializedName(SERIALIZED_NAME_RECURRENCE) + @javax.annotation.Nullable private CalendarEventRecurrence recurrence; public static final String SERIALIZED_NAME_ROLE_IDS = "roleIds"; @SerializedName(SERIALIZED_NAME_ROLE_IDS) - private List roleIds = null; + @javax.annotation.Nullable + private List roleIds = new ArrayList<>(); public static final String SERIALIZED_NAME_SEND_CREATION_NOTIFICATION = "sendCreationNotification"; @SerializedName(SERIALIZED_NAME_SEND_CREATION_NOTIFICATION) + @javax.annotation.Nullable private Boolean sendCreationNotification = false; public static final String SERIALIZED_NAME_STARTS_AT = "startsAt"; @SerializedName(SERIALIZED_NAME_STARTS_AT) + @javax.annotation.Nullable private OffsetDateTime startsAt; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) + @javax.annotation.Nullable private String title; public static final String SERIALIZED_NAME_USES_INSTANCE_OVERFLOW = "usesInstanceOverflow"; @SerializedName(SERIALIZED_NAME_USES_INSTANCE_OVERFLOW) + @javax.annotation.Nullable private Boolean usesInstanceOverflow; public UpdateCalendarEventRequest() { } - public UpdateCalendarEventRequest category(String category) { - + public UpdateCalendarEventRequest category(@javax.annotation.Nullable String category) { this.category = category; return this; } - /** + /** * Get category * @return category - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "performance", value = "") - public String getCategory() { return category; } - - public void setCategory(String category) { + public void setCategory(@javax.annotation.Nullable String category) { this.category = category; } - public UpdateCalendarEventRequest closeInstanceAfterEndMinutes(Integer closeInstanceAfterEndMinutes) { - + public UpdateCalendarEventRequest closeInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; return this; } - /** + /** * Get closeInstanceAfterEndMinutes * @return closeInstanceAfterEndMinutes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "5", value = "") - public Integer getCloseInstanceAfterEndMinutes() { return closeInstanceAfterEndMinutes; } - - public void setCloseInstanceAfterEndMinutes(Integer closeInstanceAfterEndMinutes) { + public void setCloseInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; } - public UpdateCalendarEventRequest description(String description) { - + public UpdateCalendarEventRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public UpdateCalendarEventRequest endsAt(OffsetDateTime endsAt) { - + public UpdateCalendarEventRequest endsAt(@javax.annotation.Nullable OffsetDateTime endsAt) { this.endsAt = endsAt; return this; } - /** + /** * Time the vent starts at * @return endsAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Time the vent starts at") - public OffsetDateTime getEndsAt() { return endsAt; } - - public void setEndsAt(OffsetDateTime endsAt) { + public void setEndsAt(@javax.annotation.Nullable OffsetDateTime endsAt) { this.endsAt = endsAt; } - public UpdateCalendarEventRequest featured(Boolean featured) { - + public UpdateCalendarEventRequest featured(@javax.annotation.Nullable Boolean featured) { this.featured = featured; return this; } - /** + /** * Get featured * @return featured - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getFeatured() { return featured; } - - public void setFeatured(Boolean featured) { + public void setFeatured(@javax.annotation.Nullable Boolean featured) { this.featured = featured; } - public UpdateCalendarEventRequest guestEarlyJoinMinutes(Integer guestEarlyJoinMinutes) { - + public UpdateCalendarEventRequest guestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; return this; } - /** + /** * Get guestEarlyJoinMinutes * @return guestEarlyJoinMinutes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "5", value = "") - public Integer getGuestEarlyJoinMinutes() { return guestEarlyJoinMinutes; } - - public void setGuestEarlyJoinMinutes(Integer guestEarlyJoinMinutes) { + public void setGuestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; } - public UpdateCalendarEventRequest hostEarlyJoinMinutes(Integer hostEarlyJoinMinutes) { - + public UpdateCalendarEventRequest hostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; return this; } - /** + /** * Get hostEarlyJoinMinutes * @return hostEarlyJoinMinutes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "60", value = "") - public Integer getHostEarlyJoinMinutes() { return hostEarlyJoinMinutes; } - - public void setHostEarlyJoinMinutes(Integer hostEarlyJoinMinutes) { + public void setHostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; } - public UpdateCalendarEventRequest imageId(String imageId) { - + public UpdateCalendarEventRequest imageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; } - public UpdateCalendarEventRequest isDraft(Boolean isDraft) { - + public UpdateCalendarEventRequest isDraft(@javax.annotation.Nullable Boolean isDraft) { this.isDraft = isDraft; return this; } - /** + /** * Get isDraft * @return isDraft - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsDraft() { return isDraft; } - - public void setIsDraft(Boolean isDraft) { + public void setIsDraft(@javax.annotation.Nullable Boolean isDraft) { this.isDraft = isDraft; } - public UpdateCalendarEventRequest languages(List languages) { - + public UpdateCalendarEventRequest languages(@javax.annotation.Nullable List languages) { this.languages = languages; return this; } @@ -354,48 +336,40 @@ public UpdateCalendarEventRequest addLanguagesItem(String languagesItem) { return this; } - /** + /** * Get languages * @return languages - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getLanguages() { return languages; } - - public void setLanguages(List languages) { + public void setLanguages(@javax.annotation.Nullable List languages) { this.languages = languages; } - public UpdateCalendarEventRequest parentId(String parentId) { - + public UpdateCalendarEventRequest parentId(@javax.annotation.Nullable String parentId) { this.parentId = parentId; return this; } - /** + /** * Get parentId * @return parentId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getParentId() { return parentId; } - - public void setParentId(String parentId) { + public void setParentId(@javax.annotation.Nullable String parentId) { this.parentId = parentId; } - public UpdateCalendarEventRequest platforms(List platforms) { - + public UpdateCalendarEventRequest platforms(@javax.annotation.Nullable List platforms) { this.platforms = platforms; return this; } @@ -408,48 +382,40 @@ public UpdateCalendarEventRequest addPlatformsItem(String platformsItem) { return this; } - /** + /** * Get platforms * @return platforms - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getPlatforms() { return platforms; } - - public void setPlatforms(List platforms) { + public void setPlatforms(@javax.annotation.Nullable List platforms) { this.platforms = platforms; } - public UpdateCalendarEventRequest recurrence(CalendarEventRecurrence recurrence) { - + public UpdateCalendarEventRequest recurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { this.recurrence = recurrence; return this; } - /** + /** * Get recurrence * @return recurrence - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public CalendarEventRecurrence getRecurrence() { return recurrence; } - - public void setRecurrence(CalendarEventRecurrence recurrence) { + public void setRecurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { this.recurrence = recurrence; } - public UpdateCalendarEventRequest roleIds(List roleIds) { - + public UpdateCalendarEventRequest roleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; return this; } @@ -462,71 +428,59 @@ public UpdateCalendarEventRequest addRoleIdsItem(String roleIdsItem) { return this; } - /** + /** * Get roleIds * @return roleIds - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getRoleIds() { return roleIds; } - - public void setRoleIds(List roleIds) { + public void setRoleIds(@javax.annotation.Nullable List roleIds) { this.roleIds = roleIds; } - public UpdateCalendarEventRequest sendCreationNotification(Boolean sendCreationNotification) { - + public UpdateCalendarEventRequest sendCreationNotification(@javax.annotation.Nullable Boolean sendCreationNotification) { this.sendCreationNotification = sendCreationNotification; return this; } - /** + /** * Send notification to group members. * @return sendCreationNotification - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "Send notification to group members.") - public Boolean getSendCreationNotification() { return sendCreationNotification; } - - public void setSendCreationNotification(Boolean sendCreationNotification) { + public void setSendCreationNotification(@javax.annotation.Nullable Boolean sendCreationNotification) { this.sendCreationNotification = sendCreationNotification; } - public UpdateCalendarEventRequest startsAt(OffsetDateTime startsAt) { - + public UpdateCalendarEventRequest startsAt(@javax.annotation.Nullable OffsetDateTime startsAt) { this.startsAt = startsAt; return this; } - /** + /** * Time the vent starts at * @return startsAt - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Time the vent starts at") - public OffsetDateTime getStartsAt() { return startsAt; } - - public void setStartsAt(OffsetDateTime startsAt) { + public void setStartsAt(@javax.annotation.Nullable OffsetDateTime startsAt) { this.startsAt = startsAt; } - public UpdateCalendarEventRequest tags(List tags) { - + public UpdateCalendarEventRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -539,65 +493,54 @@ public UpdateCalendarEventRequest addTagsItem(String tagsItem) { return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public UpdateCalendarEventRequest title(String title) { - + public UpdateCalendarEventRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } - /** + /** * Event title * @return title - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Performance Event!", value = "Event title") - public String getTitle() { return title; } - - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public UpdateCalendarEventRequest usesInstanceOverflow(Boolean usesInstanceOverflow) { - + public UpdateCalendarEventRequest usesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { this.usesInstanceOverflow = usesInstanceOverflow; return this; } - /** + /** * Get usesInstanceOverflow * @return usesInstanceOverflow - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - public Boolean getUsesInstanceOverflow() { return usesInstanceOverflow; } - - public void setUsesInstanceOverflow(Boolean usesInstanceOverflow) { + public void setUsesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { this.usesInstanceOverflow = usesInstanceOverflow; } @@ -681,10 +624,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -693,85 +633,67 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("category"); - openapiFields.add("closeInstanceAfterEndMinutes"); - openapiFields.add("description"); - openapiFields.add("endsAt"); - openapiFields.add("featured"); - openapiFields.add("guestEarlyJoinMinutes"); - openapiFields.add("hostEarlyJoinMinutes"); - openapiFields.add("imageId"); - openapiFields.add("isDraft"); - openapiFields.add("languages"); - openapiFields.add("parentId"); - openapiFields.add("platforms"); - openapiFields.add("recurrence"); - openapiFields.add("roleIds"); - openapiFields.add("sendCreationNotification"); - openapiFields.add("startsAt"); - openapiFields.add("tags"); - openapiFields.add("title"); - openapiFields.add("usesInstanceOverflow"); + openapiFields = new HashSet(Arrays.asList("category", "closeInstanceAfterEndMinutes", "description", "endsAt", "featured", "guestEarlyJoinMinutes", "hostEarlyJoinMinutes", "imageId", "isDraft", "languages", "parentId", "platforms", "recurrence", "roleIds", "sendCreationNotification", "startsAt", "tags", "title", "usesInstanceOverflow")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateCalendarEventRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateCalendarEventRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCalendarEventRequest is not found in the empty JSON string", UpdateCalendarEventRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateCalendarEventRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateCalendarEventRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateCalendarEventRequest is not found in the empty JSON string", UpdateCalendarEventRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateCalendarEventRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCalendarEventRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateCalendarEventRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("languages") != null && !jsonObj.get("languages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `languages` to be an array in the JSON string but got `%s`", jsonObj.get("languages").toString())); + if (jsonObj.get("languages") != null && !jsonObj.get("languages").isJsonNull() && !jsonObj.get("languages").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `languages` to be an array in the JSON string but got `%s`", jsonObj.get("languages").toString())); } if ((jsonObj.get("parentId") != null && !jsonObj.get("parentId").isJsonNull()) && !jsonObj.get("parentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `parentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentId").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("platforms") != null && !jsonObj.get("platforms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `platforms` to be an array in the JSON string but got `%s`", jsonObj.get("platforms").toString())); + if (jsonObj.get("platforms") != null && !jsonObj.get("platforms").isJsonNull() && !jsonObj.get("platforms").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platforms` to be an array in the JSON string but got `%s`", jsonObj.get("platforms").toString())); } // validate the optional field `recurrence` if (jsonObj.get("recurrence") != null && !jsonObj.get("recurrence").isJsonNull()) { - CalendarEventRecurrence.validateJsonObject(jsonObj.getAsJsonObject("recurrence")); + CalendarEventRecurrence.validateJsonElement(jsonObj.get("recurrence")); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); + if (jsonObj.get("roleIds") != null && !jsonObj.get("roleIds").isJsonNull() && !jsonObj.get("roleIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIds` to be an array in the JSON string but got `%s`", jsonObj.get("roleIds").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } } @@ -795,31 +717,31 @@ public void write(JsonWriter out, UpdateCalendarEventRequest value) throws IOExc @Override public UpdateCalendarEventRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateCalendarEventRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateCalendarEventRequest - * @throws IOException if the JSON string is invalid with respect to UpdateCalendarEventRequest - */ + /** + * Create an instance of UpdateCalendarEventRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateCalendarEventRequest + * @throws IOException if the JSON string is invalid with respect to UpdateCalendarEventRequest + */ public static UpdateCalendarEventRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateCalendarEventRequest.class); } - /** - * Convert an instance of UpdateCalendarEventRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateCalendarEventRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateFavoriteGroupRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateFavoriteGroupRequest.java index 7ba96074..4d571181 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateFavoriteGroupRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateFavoriteGroupRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.FavoriteGroupVisibility; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,48 +50,46 @@ /** * UpdateFavoriteGroupRequest */ -@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 UpdateFavoriteGroupRequest { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable private String displayName; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable private FavoriteGroupVisibility visibility = FavoriteGroupVisibility.PRIVATE; public UpdateFavoriteGroupRequest() { } - public UpdateFavoriteGroupRequest displayName(String displayName) { - + public UpdateFavoriteGroupRequest displayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; } - public UpdateFavoriteGroupRequest tags(List tags) { - + public UpdateFavoriteGroupRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -104,42 +102,35 @@ public UpdateFavoriteGroupRequest addTagsItem(String tagsItem) { return this; } - /** + /** * Tags on FavoriteGroups are believed to do nothing. * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Tags on FavoriteGroups are believed to do nothing.") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public UpdateFavoriteGroupRequest visibility(FavoriteGroupVisibility visibility) { - + public UpdateFavoriteGroupRequest visibility(@javax.annotation.Nullable FavoriteGroupVisibility visibility) { this.visibility = visibility; return this; } - /** + /** * Get visibility * @return visibility - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public FavoriteGroupVisibility getVisibility() { return visibility; } - - public void setVisibility(FavoriteGroupVisibility visibility) { + public void setVisibility(@javax.annotation.Nullable FavoriteGroupVisibility visibility) { this.visibility = visibility; } @@ -180,10 +171,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -192,41 +180,43 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("displayName"); - openapiFields.add("tags"); - openapiFields.add("visibility"); + openapiFields = new HashSet(Arrays.asList("displayName", "tags", "visibility")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateFavoriteGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateFavoriteGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateFavoriteGroupRequest is not found in the empty JSON string", UpdateFavoriteGroupRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateFavoriteGroupRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateFavoriteGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateFavoriteGroupRequest is not found in the empty JSON string", UpdateFavoriteGroupRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateFavoriteGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateFavoriteGroupRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateFavoriteGroupRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + FavoriteGroupVisibility.validateJsonElement(jsonObj.get("visibility")); } } @@ -250,31 +240,31 @@ public void write(JsonWriter out, UpdateFavoriteGroupRequest value) throws IOExc @Override public UpdateFavoriteGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateFavoriteGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateFavoriteGroupRequest - * @throws IOException if the JSON string is invalid with respect to UpdateFavoriteGroupRequest - */ + /** + * Create an instance of UpdateFavoriteGroupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateFavoriteGroupRequest + * @throws IOException if the JSON string is invalid with respect to UpdateFavoriteGroupRequest + */ public static UpdateFavoriteGroupRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateFavoriteGroupRequest.class); } - /** - * Convert an instance of UpdateFavoriteGroupRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateFavoriteGroupRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateGroupGalleryRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateGroupGalleryRequest.java index 31f57f68..00546c05 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateGroupGalleryRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateGroupGalleryRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,110 +50,104 @@ /** * UpdateGroupGalleryRequest */ -@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 UpdateGroupGalleryRequest { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_MEMBERS_ONLY = "membersOnly"; @SerializedName(SERIALIZED_NAME_MEMBERS_ONLY) + @javax.annotation.Nullable private Boolean membersOnly = false; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_ROLE_IDS_TO_AUTO_APPROVE = "roleIdsToAutoApprove"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_AUTO_APPROVE) - private List roleIdsToAutoApprove = null; + @javax.annotation.Nullable + private List roleIdsToAutoApprove; public static final String SERIALIZED_NAME_ROLE_IDS_TO_MANAGE = "roleIdsToManage"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_MANAGE) - private List roleIdsToManage = null; + @javax.annotation.Nullable + private List roleIdsToManage; public static final String SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT = "roleIdsToSubmit"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT) - private List roleIdsToSubmit = null; + @javax.annotation.Nullable + private List roleIdsToSubmit; public static final String SERIALIZED_NAME_ROLE_IDS_TO_VIEW = "roleIdsToView"; @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_VIEW) - private List roleIdsToView = null; + @javax.annotation.Nullable + private List roleIdsToView; public UpdateGroupGalleryRequest() { } - public UpdateGroupGalleryRequest description(String description) { - + public UpdateGroupGalleryRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Description of the gallery. * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Example Description", value = "Description of the gallery.") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public UpdateGroupGalleryRequest membersOnly(Boolean membersOnly) { - + public UpdateGroupGalleryRequest membersOnly(@javax.annotation.Nullable Boolean membersOnly) { this.membersOnly = membersOnly; return this; } - /** + /** * Whether the gallery is members only. * @return membersOnly - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "Whether the gallery is members only.") - public Boolean getMembersOnly() { return membersOnly; } - - public void setMembersOnly(Boolean membersOnly) { + public void setMembersOnly(@javax.annotation.Nullable Boolean membersOnly) { this.membersOnly = membersOnly; } - public UpdateGroupGalleryRequest name(String name) { - + public UpdateGroupGalleryRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Name of the gallery. * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "Example Gallery", value = "Name of the gallery.") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public UpdateGroupGalleryRequest roleIdsToAutoApprove(List roleIdsToAutoApprove) { - + public UpdateGroupGalleryRequest roleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { this.roleIdsToAutoApprove = roleIdsToAutoApprove; return this; } @@ -166,25 +160,21 @@ public UpdateGroupGalleryRequest addRoleIdsToAutoApproveItem(String roleIdsToAut return this; } - /** + /** * * @return roleIdsToAutoApprove - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToAutoApprove() { return roleIdsToAutoApprove; } - - public void setRoleIdsToAutoApprove(List roleIdsToAutoApprove) { + public void setRoleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { this.roleIdsToAutoApprove = roleIdsToAutoApprove; } - public UpdateGroupGalleryRequest roleIdsToManage(List roleIdsToManage) { - + public UpdateGroupGalleryRequest roleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { this.roleIdsToManage = roleIdsToManage; return this; } @@ -197,25 +187,21 @@ public UpdateGroupGalleryRequest addRoleIdsToManageItem(String roleIdsToManageIt return this; } - /** + /** * * @return roleIdsToManage - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToManage() { return roleIdsToManage; } - - public void setRoleIdsToManage(List roleIdsToManage) { + public void setRoleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { this.roleIdsToManage = roleIdsToManage; } - public UpdateGroupGalleryRequest roleIdsToSubmit(List roleIdsToSubmit) { - + public UpdateGroupGalleryRequest roleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { this.roleIdsToSubmit = roleIdsToSubmit; return this; } @@ -228,25 +214,21 @@ public UpdateGroupGalleryRequest addRoleIdsToSubmitItem(String roleIdsToSubmitIt return this; } - /** + /** * * @return roleIdsToSubmit - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToSubmit() { return roleIdsToSubmit; } - - public void setRoleIdsToSubmit(List roleIdsToSubmit) { + public void setRoleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { this.roleIdsToSubmit = roleIdsToSubmit; } - public UpdateGroupGalleryRequest roleIdsToView(List roleIdsToView) { - + public UpdateGroupGalleryRequest roleIdsToView(@javax.annotation.Nullable List roleIdsToView) { this.roleIdsToView = roleIdsToView; return this; } @@ -259,19 +241,16 @@ public UpdateGroupGalleryRequest addRoleIdsToViewItem(String roleIdsToViewItem) return this; } - /** + /** * * @return roleIdsToView - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getRoleIdsToView() { return roleIdsToView; } - - public void setRoleIdsToView(List roleIdsToView) { + public void setRoleIdsToView(@javax.annotation.Nullable List roleIdsToView) { this.roleIdsToView = roleIdsToView; } @@ -331,10 +310,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -343,60 +319,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("membersOnly"); - openapiFields.add("name"); - openapiFields.add("roleIdsToAutoApprove"); - openapiFields.add("roleIdsToManage"); - openapiFields.add("roleIdsToSubmit"); - openapiFields.add("roleIdsToView"); + openapiFields = new HashSet(Arrays.asList("description", "membersOnly", "name", "roleIdsToAutoApprove", "roleIdsToManage", "roleIdsToSubmit", "roleIdsToView")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateGroupGalleryRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateGroupGalleryRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateGroupGalleryRequest is not found in the empty JSON string", UpdateGroupGalleryRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateGroupGalleryRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateGroupGalleryRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateGroupGalleryRequest is not found in the empty JSON string", UpdateGroupGalleryRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateGroupGalleryRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateGroupGalleryRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateGroupGalleryRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToAutoApprove") != null && !jsonObj.get("roleIdsToAutoApprove").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToAutoApprove` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToAutoApprove").toString())); + if (jsonObj.get("roleIdsToAutoApprove") != null && !jsonObj.get("roleIdsToAutoApprove").isJsonNull() && !jsonObj.get("roleIdsToAutoApprove").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToAutoApprove` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToAutoApprove").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToManage") != null && !jsonObj.get("roleIdsToManage").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToManage` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToManage").toString())); + if (jsonObj.get("roleIdsToManage") != null && !jsonObj.get("roleIdsToManage").isJsonNull() && !jsonObj.get("roleIdsToManage").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToManage` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToManage").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToSubmit") != null && !jsonObj.get("roleIdsToSubmit").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToSubmit` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToSubmit").toString())); + if (jsonObj.get("roleIdsToSubmit") != null && !jsonObj.get("roleIdsToSubmit").isJsonNull() && !jsonObj.get("roleIdsToSubmit").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToSubmit` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToSubmit").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("roleIdsToView") != null && !jsonObj.get("roleIdsToView").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roleIdsToView` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToView").toString())); + if (jsonObj.get("roleIdsToView") != null && !jsonObj.get("roleIdsToView").isJsonNull() && !jsonObj.get("roleIdsToView").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `roleIdsToView` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToView").toString())); } } @@ -420,31 +390,31 @@ public void write(JsonWriter out, UpdateGroupGalleryRequest value) throws IOExce @Override public UpdateGroupGalleryRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateGroupGalleryRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateGroupGalleryRequest - * @throws IOException if the JSON string is invalid with respect to UpdateGroupGalleryRequest - */ + /** + * Create an instance of UpdateGroupGalleryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateGroupGalleryRequest + * @throws IOException if the JSON string is invalid with respect to UpdateGroupGalleryRequest + */ public static UpdateGroupGalleryRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateGroupGalleryRequest.class); } - /** - * Convert an instance of UpdateGroupGalleryRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateGroupGalleryRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateGroupMemberRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateGroupMemberRequest.java index c151753c..a319ec05 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateGroupMemberRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateGroupMemberRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupUserVisibility; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,115 +48,103 @@ /** * UpdateGroupMemberRequest */ -@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 UpdateGroupMemberRequest { public static final String SERIALIZED_NAME_IS_SUBSCRIBED_TO_ANNOUNCEMENTS = "isSubscribedToAnnouncements"; @SerializedName(SERIALIZED_NAME_IS_SUBSCRIBED_TO_ANNOUNCEMENTS) + @javax.annotation.Nullable private Boolean isSubscribedToAnnouncements; public static final String SERIALIZED_NAME_IS_SUBSCRIBED_TO_EVENT_ANNOUNCEMENTS = "isSubscribedToEventAnnouncements"; @SerializedName(SERIALIZED_NAME_IS_SUBSCRIBED_TO_EVENT_ANNOUNCEMENTS) + @javax.annotation.Nullable private Boolean isSubscribedToEventAnnouncements; public static final String SERIALIZED_NAME_MANAGER_NOTES = "managerNotes"; @SerializedName(SERIALIZED_NAME_MANAGER_NOTES) + @javax.annotation.Nullable private String managerNotes; public static final String SERIALIZED_NAME_VISIBILITY = "visibility"; @SerializedName(SERIALIZED_NAME_VISIBILITY) + @javax.annotation.Nullable private GroupUserVisibility visibility; public UpdateGroupMemberRequest() { } - public UpdateGroupMemberRequest isSubscribedToAnnouncements(Boolean isSubscribedToAnnouncements) { - + public UpdateGroupMemberRequest isSubscribedToAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToAnnouncements) { this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; return this; } - /** + /** * Get isSubscribedToAnnouncements * @return isSubscribedToAnnouncements - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsSubscribedToAnnouncements() { return isSubscribedToAnnouncements; } - - public void setIsSubscribedToAnnouncements(Boolean isSubscribedToAnnouncements) { + public void setIsSubscribedToAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToAnnouncements) { this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; } - public UpdateGroupMemberRequest isSubscribedToEventAnnouncements(Boolean isSubscribedToEventAnnouncements) { - + public UpdateGroupMemberRequest isSubscribedToEventAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToEventAnnouncements) { this.isSubscribedToEventAnnouncements = isSubscribedToEventAnnouncements; return this; } - /** + /** * Get isSubscribedToEventAnnouncements * @return isSubscribedToEventAnnouncements - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsSubscribedToEventAnnouncements() { return isSubscribedToEventAnnouncements; } - - public void setIsSubscribedToEventAnnouncements(Boolean isSubscribedToEventAnnouncements) { + public void setIsSubscribedToEventAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToEventAnnouncements) { this.isSubscribedToEventAnnouncements = isSubscribedToEventAnnouncements; } - public UpdateGroupMemberRequest managerNotes(String managerNotes) { - + public UpdateGroupMemberRequest managerNotes(@javax.annotation.Nullable String managerNotes) { this.managerNotes = managerNotes; return this; } - /** + /** * Get managerNotes * @return managerNotes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getManagerNotes() { return managerNotes; } - - public void setManagerNotes(String managerNotes) { + public void setManagerNotes(@javax.annotation.Nullable String managerNotes) { this.managerNotes = managerNotes; } - public UpdateGroupMemberRequest visibility(GroupUserVisibility visibility) { - + public UpdateGroupMemberRequest visibility(@javax.annotation.Nullable GroupUserVisibility visibility) { this.visibility = visibility; return this; } - /** + /** * Get visibility * @return visibility - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupUserVisibility getVisibility() { return visibility; } - - public void setVisibility(GroupUserVisibility visibility) { + public void setVisibility(@javax.annotation.Nullable GroupUserVisibility visibility) { this.visibility = visibility; } @@ -199,10 +187,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -211,38 +196,39 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("isSubscribedToAnnouncements"); - openapiFields.add("isSubscribedToEventAnnouncements"); - openapiFields.add("managerNotes"); - openapiFields.add("visibility"); + openapiFields = new HashSet(Arrays.asList("isSubscribedToAnnouncements", "isSubscribedToEventAnnouncements", "managerNotes", "visibility")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateGroupMemberRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateGroupMemberRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateGroupMemberRequest is not found in the empty JSON string", UpdateGroupMemberRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateGroupMemberRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateGroupMemberRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateGroupMemberRequest is not found in the empty JSON string", UpdateGroupMemberRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateGroupMemberRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateGroupMemberRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateGroupMemberRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("managerNotes") != null && !jsonObj.get("managerNotes").isJsonNull()) && !jsonObj.get("managerNotes").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `managerNotes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("managerNotes").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `managerNotes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("managerNotes").toString())); + } + // validate the optional field `visibility` + if (jsonObj.get("visibility") != null && !jsonObj.get("visibility").isJsonNull()) { + GroupUserVisibility.validateJsonElement(jsonObj.get("visibility")); } } @@ -266,31 +252,31 @@ public void write(JsonWriter out, UpdateGroupMemberRequest value) throws IOExcep @Override public UpdateGroupMemberRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateGroupMemberRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateGroupMemberRequest - * @throws IOException if the JSON string is invalid with respect to UpdateGroupMemberRequest - */ + /** + * Create an instance of UpdateGroupMemberRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateGroupMemberRequest + * @throws IOException if the JSON string is invalid with respect to UpdateGroupMemberRequest + */ public static UpdateGroupMemberRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateGroupMemberRequest.class); } - /** - * Convert an instance of UpdateGroupMemberRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateGroupMemberRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateGroupRepresentationRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateGroupRepresentationRequest.java index ee2895eb..27e6a1ed 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateGroupRepresentationRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateGroupRepresentationRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * UpdateGroupRepresentationRequest */ -@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 UpdateGroupRepresentationRequest { public static final String SERIALIZED_NAME_IS_REPRESENTING = "isRepresenting"; @SerializedName(SERIALIZED_NAME_IS_REPRESENTING) + @javax.annotation.Nonnull private Boolean isRepresenting; public UpdateGroupRepresentationRequest() { } - public UpdateGroupRepresentationRequest isRepresenting(Boolean isRepresenting) { - + public UpdateGroupRepresentationRequest isRepresenting(@javax.annotation.Nonnull Boolean isRepresenting) { this.isRepresenting = isRepresenting; return this; } - /** + /** * Whether the user is representing the group. * @return isRepresenting - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Whether the user is representing the group.") - public Boolean getIsRepresenting() { return isRepresenting; } - - public void setIsRepresenting(Boolean isRepresenting) { + public void setIsRepresenting(@javax.annotation.Nonnull Boolean isRepresenting) { this.isRepresenting = isRepresenting; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("isRepresenting"); + openapiFields = new HashSet(Arrays.asList("isRepresenting")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("isRepresenting"); + openapiRequiredFields = new HashSet(Arrays.asList("isRepresenting")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateGroupRepresentationRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateGroupRepresentationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateGroupRepresentationRequest is not found in the empty JSON string", UpdateGroupRepresentationRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateGroupRepresentationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateGroupRepresentationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateGroupRepresentationRequest is not found in the empty JSON string", UpdateGroupRepresentationRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateGroupRepresentationRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateGroupRepresentationRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateGroupRepresentationRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateGroupRepresentationRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -180,31 +173,31 @@ public void write(JsonWriter out, UpdateGroupRepresentationRequest value) throws @Override public UpdateGroupRepresentationRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateGroupRepresentationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateGroupRepresentationRequest - * @throws IOException if the JSON string is invalid with respect to UpdateGroupRepresentationRequest - */ + /** + * Create an instance of UpdateGroupRepresentationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateGroupRepresentationRequest + * @throws IOException if the JSON string is invalid with respect to UpdateGroupRepresentationRequest + */ public static UpdateGroupRepresentationRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateGroupRepresentationRequest.class); } - /** - * Convert an instance of UpdateGroupRepresentationRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateGroupRepresentationRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateGroupRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateGroupRequest.java index f34f0cbc..b95d753e 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateGroupRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateGroupRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupJoinState; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -37,13 +35,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -51,145 +51,138 @@ /** * UpdateGroupRequest */ -@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 UpdateGroupRequest { public static final String SERIALIZED_NAME_BANNER_ID = "bannerId"; @SerializedName(SERIALIZED_NAME_BANNER_ID) + @javax.annotation.Nullable private String bannerId; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_ICON_ID = "iconId"; @SerializedName(SERIALIZED_NAME_ICON_ID) + @javax.annotation.Nullable private String iconId; public static final String SERIALIZED_NAME_JOIN_STATE = "joinState"; @SerializedName(SERIALIZED_NAME_JOIN_STATE) + @javax.annotation.Nullable private GroupJoinState joinState = GroupJoinState.OPEN; public static final String SERIALIZED_NAME_LANGUAGES = "languages"; @SerializedName(SERIALIZED_NAME_LANGUAGES) - private List languages = null; + @javax.annotation.Nullable + private List languages = new ArrayList<>(); public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) - private List links = null; + @javax.annotation.Nullable + private List links = new ArrayList<>(); public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) + @javax.annotation.Nullable private String rules; public static final String SERIALIZED_NAME_SHORT_CODE = "shortCode"; @SerializedName(SERIALIZED_NAME_SHORT_CODE) + @javax.annotation.Nullable private String shortCode; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public UpdateGroupRequest() { } - public UpdateGroupRequest bannerId(String bannerId) { - + public UpdateGroupRequest bannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; return this; } - /** + /** * Get bannerId * @return bannerId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBannerId() { return bannerId; } - - public void setBannerId(String bannerId) { + public void setBannerId(@javax.annotation.Nullable String bannerId) { this.bannerId = bannerId; } - public UpdateGroupRequest description(String description) { - + public UpdateGroupRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public UpdateGroupRequest iconId(String iconId) { - + public UpdateGroupRequest iconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; return this; } - /** + /** * Get iconId * @return iconId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getIconId() { return iconId; } - - public void setIconId(String iconId) { + public void setIconId(@javax.annotation.Nullable String iconId) { this.iconId = iconId; } - public UpdateGroupRequest joinState(GroupJoinState joinState) { - + public UpdateGroupRequest joinState(@javax.annotation.Nullable GroupJoinState joinState) { this.joinState = joinState; return this; } - /** + /** * Get joinState * @return joinState - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public GroupJoinState getJoinState() { return joinState; } - - public void setJoinState(GroupJoinState joinState) { + public void setJoinState(@javax.annotation.Nullable GroupJoinState joinState) { this.joinState = joinState; } - public UpdateGroupRequest languages(List languages) { - + public UpdateGroupRequest languages(@javax.annotation.Nullable List languages) { this.languages = languages; return this; } @@ -202,25 +195,21 @@ public UpdateGroupRequest addLanguagesItem(String languagesItem) { return this; } - /** + /** * 3 letter language code * @return languages - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "3 letter language code") - public List getLanguages() { return languages; } - - public void setLanguages(List languages) { + public void setLanguages(@javax.annotation.Nullable List languages) { this.languages = languages; } - public UpdateGroupRequest links(List links) { - + public UpdateGroupRequest links(@javax.annotation.Nullable List links) { this.links = links; return this; } @@ -233,94 +222,78 @@ public UpdateGroupRequest addLinksItem(String linksItem) { return this; } - /** + /** * Get links * @return links - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getLinks() { return links; } - - public void setLinks(List links) { + public void setLinks(@javax.annotation.Nullable List links) { this.links = links; } - public UpdateGroupRequest name(String name) { - + public UpdateGroupRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public UpdateGroupRequest rules(String rules) { - + public UpdateGroupRequest rules(@javax.annotation.Nullable String rules) { this.rules = rules; return this; } - /** + /** * Get rules * @return rules - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getRules() { return rules; } - - public void setRules(String rules) { + public void setRules(@javax.annotation.Nullable String rules) { this.rules = rules; } - public UpdateGroupRequest shortCode(String shortCode) { - + public UpdateGroupRequest shortCode(@javax.annotation.Nullable String shortCode) { this.shortCode = shortCode; return this; } - /** + /** * Get shortCode * @return shortCode - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getShortCode() { return shortCode; } - - public void setShortCode(String shortCode) { + public void setShortCode(@javax.annotation.Nullable String shortCode) { this.shortCode = shortCode; } - public UpdateGroupRequest tags(List tags) { - + public UpdateGroupRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -333,19 +306,16 @@ public UpdateGroupRequest addTagsItem(String tagsItem) { return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } @@ -411,10 +381,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -423,71 +390,66 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bannerId"); - openapiFields.add("description"); - openapiFields.add("iconId"); - openapiFields.add("joinState"); - openapiFields.add("languages"); - openapiFields.add("links"); - openapiFields.add("name"); - openapiFields.add("rules"); - openapiFields.add("shortCode"); - openapiFields.add("tags"); + openapiFields = new HashSet(Arrays.asList("bannerId", "description", "iconId", "joinState", "languages", "links", "name", "rules", "shortCode", "tags")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateGroupRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateGroupRequest is not found in the empty JSON string", UpdateGroupRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateGroupRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateGroupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateGroupRequest is not found in the empty JSON string", UpdateGroupRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateGroupRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateGroupRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateGroupRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("bannerId") != null && !jsonObj.get("bannerId").isJsonNull()) && !jsonObj.get("bannerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerId").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("iconId") != null && !jsonObj.get("iconId").isJsonNull()) && !jsonObj.get("iconId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconId").toString())); + } + // validate the optional field `joinState` + if (jsonObj.get("joinState") != null && !jsonObj.get("joinState").isJsonNull()) { + GroupJoinState.validateJsonElement(jsonObj.get("joinState")); } // ensure the optional json data is an array if present - if (jsonObj.get("languages") != null && !jsonObj.get("languages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `languages` to be an array in the JSON string but got `%s`", jsonObj.get("languages").toString())); + if (jsonObj.get("languages") != null && !jsonObj.get("languages").isJsonNull() && !jsonObj.get("languages").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `languages` to be an array in the JSON string but got `%s`", jsonObj.get("languages").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull() && !jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("rules") != null && !jsonObj.get("rules").isJsonNull()) && !jsonObj.get("rules").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `rules` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rules").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `rules` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rules").toString())); } if ((jsonObj.get("shortCode") != null && !jsonObj.get("shortCode").isJsonNull()) && !jsonObj.get("shortCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -511,31 +473,31 @@ public void write(JsonWriter out, UpdateGroupRequest value) throws IOException { @Override public UpdateGroupRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateGroupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateGroupRequest - * @throws IOException if the JSON string is invalid with respect to UpdateGroupRequest - */ + /** + * Create an instance of UpdateGroupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateGroupRequest + * @throws IOException if the JSON string is invalid with respect to UpdateGroupRequest + */ public static UpdateGroupRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateGroupRequest.class); } - /** - * Convert an instance of UpdateGroupRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateGroupRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateGroupRoleRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateGroupRoleRequest.java index 49115523..db89d8b7 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateGroupRoleRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateGroupRoleRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.GroupPermissions; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,125 +50,113 @@ /** * UpdateGroupRoleRequest */ -@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 UpdateGroupRoleRequest { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_IS_SELF_ASSIGNABLE = "isSelfAssignable"; @SerializedName(SERIALIZED_NAME_IS_SELF_ASSIGNABLE) + @javax.annotation.Nullable private Boolean isSelfAssignable = false; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_ORDER = "order"; @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable private Integer order; public static final String SERIALIZED_NAME_PERMISSIONS = "permissions"; @SerializedName(SERIALIZED_NAME_PERMISSIONS) - private List permissions = null; + @javax.annotation.Nullable + private List permissions = new ArrayList<>(); public UpdateGroupRoleRequest() { } - public UpdateGroupRoleRequest description(String description) { - + public UpdateGroupRoleRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public UpdateGroupRoleRequest isSelfAssignable(Boolean isSelfAssignable) { - + public UpdateGroupRoleRequest isSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { this.isSelfAssignable = isSelfAssignable; return this; } - /** + /** * Get isSelfAssignable * @return isSelfAssignable - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsSelfAssignable() { return isSelfAssignable; } - - public void setIsSelfAssignable(Boolean isSelfAssignable) { + public void setIsSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { this.isSelfAssignable = isSelfAssignable; } - public UpdateGroupRoleRequest name(String name) { - + public UpdateGroupRoleRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public UpdateGroupRoleRequest order(Integer order) { - + public UpdateGroupRoleRequest order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } - /** + /** * Get order * @return order - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getOrder() { return order; } - - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } - public UpdateGroupRoleRequest permissions(List permissions) { - + public UpdateGroupRoleRequest permissions(@javax.annotation.Nullable List permissions) { this.permissions = permissions; return this; } @@ -181,19 +169,16 @@ public UpdateGroupRoleRequest addPermissionsItem(GroupPermissions permissionsIte return this; } - /** + /** * Get permissions * @return permissions - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getPermissions() { return permissions; } - - public void setPermissions(List permissions) { + public void setPermissions(@javax.annotation.Nullable List permissions) { this.permissions = permissions; } @@ -238,10 +223,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -250,46 +232,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("isSelfAssignable"); - openapiFields.add("name"); - openapiFields.add("order"); - openapiFields.add("permissions"); + openapiFields = new HashSet(Arrays.asList("description", "isSelfAssignable", "name", "order", "permissions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateGroupRoleRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateGroupRoleRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateGroupRoleRequest is not found in the empty JSON string", UpdateGroupRoleRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateGroupRoleRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateGroupRoleRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateGroupRoleRequest is not found in the empty JSON string", UpdateGroupRoleRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateGroupRoleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateGroupRoleRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateGroupRoleRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); + if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull() && !jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); } } @@ -313,31 +291,31 @@ public void write(JsonWriter out, UpdateGroupRoleRequest value) throws IOExcepti @Override public UpdateGroupRoleRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateGroupRoleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateGroupRoleRequest - * @throws IOException if the JSON string is invalid with respect to UpdateGroupRoleRequest - */ + /** + * Create an instance of UpdateGroupRoleRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateGroupRoleRequest + * @throws IOException if the JSON string is invalid with respect to UpdateGroupRoleRequest + */ public static UpdateGroupRoleRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateGroupRoleRequest.class); } - /** - * Convert an instance of UpdateGroupRoleRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateGroupRoleRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateInventoryItemRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateInventoryItemRequest.java index 74172a0c..c79f273e 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateInventoryItemRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateInventoryItemRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.InventoryUserAttributes; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,88 +48,79 @@ /** * UpdateInventoryItemRequest */ -@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 UpdateInventoryItemRequest { public static final String SERIALIZED_NAME_IS_ARCHIVED = "isArchived"; @SerializedName(SERIALIZED_NAME_IS_ARCHIVED) + @javax.annotation.Nullable private Boolean isArchived; public static final String SERIALIZED_NAME_IS_SEEN = "isSeen"; @SerializedName(SERIALIZED_NAME_IS_SEEN) + @javax.annotation.Nullable private Boolean isSeen; public static final String SERIALIZED_NAME_USER_ATTRIBUTES = "userAttributes"; @SerializedName(SERIALIZED_NAME_USER_ATTRIBUTES) + @javax.annotation.Nullable private InventoryUserAttributes userAttributes; public UpdateInventoryItemRequest() { } - public UpdateInventoryItemRequest isArchived(Boolean isArchived) { - + public UpdateInventoryItemRequest isArchived(@javax.annotation.Nullable Boolean isArchived) { this.isArchived = isArchived; return this; } - /** + /** * Get isArchived * @return isArchived - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsArchived() { return isArchived; } - - public void setIsArchived(Boolean isArchived) { + public void setIsArchived(@javax.annotation.Nullable Boolean isArchived) { this.isArchived = isArchived; } - public UpdateInventoryItemRequest isSeen(Boolean isSeen) { - + public UpdateInventoryItemRequest isSeen(@javax.annotation.Nullable Boolean isSeen) { this.isSeen = isSeen; return this; } - /** + /** * Get isSeen * @return isSeen - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsSeen() { return isSeen; } - - public void setIsSeen(Boolean isSeen) { + public void setIsSeen(@javax.annotation.Nullable Boolean isSeen) { this.isSeen = isSeen; } - public UpdateInventoryItemRequest userAttributes(InventoryUserAttributes userAttributes) { - + public UpdateInventoryItemRequest userAttributes(@javax.annotation.Nullable InventoryUserAttributes userAttributes) { this.userAttributes = userAttributes; return this; } - /** + /** * Get userAttributes * @return userAttributes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InventoryUserAttributes getUserAttributes() { return userAttributes; } - - public void setUserAttributes(InventoryUserAttributes userAttributes) { + public void setUserAttributes(@javax.annotation.Nullable InventoryUserAttributes userAttributes) { this.userAttributes = userAttributes; } @@ -170,10 +161,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -182,38 +170,36 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("isArchived"); - openapiFields.add("isSeen"); - openapiFields.add("userAttributes"); + openapiFields = new HashSet(Arrays.asList("isArchived", "isSeen", "userAttributes")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateInventoryItemRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateInventoryItemRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateInventoryItemRequest is not found in the empty JSON string", UpdateInventoryItemRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateInventoryItemRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateInventoryItemRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateInventoryItemRequest is not found in the empty JSON string", UpdateInventoryItemRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateInventoryItemRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateInventoryItemRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateInventoryItemRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `userAttributes` if (jsonObj.get("userAttributes") != null && !jsonObj.get("userAttributes").isJsonNull()) { - InventoryUserAttributes.validateJsonObject(jsonObj.getAsJsonObject("userAttributes")); + InventoryUserAttributes.validateJsonElement(jsonObj.get("userAttributes")); } } @@ -237,31 +223,31 @@ public void write(JsonWriter out, UpdateInventoryItemRequest value) throws IOExc @Override public UpdateInventoryItemRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateInventoryItemRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateInventoryItemRequest - * @throws IOException if the JSON string is invalid with respect to UpdateInventoryItemRequest - */ + /** + * Create an instance of UpdateInventoryItemRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateInventoryItemRequest + * @throws IOException if the JSON string is invalid with respect to UpdateInventoryItemRequest + */ public static UpdateInventoryItemRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateInventoryItemRequest.class); } - /** - * Convert an instance of UpdateInventoryItemRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateInventoryItemRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateInviteMessageRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateInviteMessageRequest.java index 454b4a9d..7f4eaa12 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateInviteMessageRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateInviteMessageRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * UpdateInviteMessageRequest */ -@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 UpdateInviteMessageRequest { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nonnull private String message; public UpdateInviteMessageRequest() { } - public UpdateInviteMessageRequest message(String message) { - + public UpdateInviteMessageRequest message(@javax.annotation.Nonnull String message) { this.message = message; return this; } - /** + /** * Get message * @return message - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getMessage() { return message; } - - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nonnull String message) { this.message = message; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,43 +117,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("message"); + openapiFields = new HashSet(Arrays.asList("message")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("message"); + openapiRequiredFields = new HashSet(Arrays.asList("message")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateInviteMessageRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateInviteMessageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateInviteMessageRequest is not found in the empty JSON string", UpdateInviteMessageRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateInviteMessageRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateInviteMessageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateInviteMessageRequest is not found in the empty JSON string", UpdateInviteMessageRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateInviteMessageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateInviteMessageRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateInviteMessageRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateInviteMessageRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -183,31 +176,31 @@ public void write(JsonWriter out, UpdateInviteMessageRequest value) throws IOExc @Override public UpdateInviteMessageRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateInviteMessageRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateInviteMessageRequest - * @throws IOException if the JSON string is invalid with respect to UpdateInviteMessageRequest - */ + /** + * Create an instance of UpdateInviteMessageRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateInviteMessageRequest + * @throws IOException if the JSON string is invalid with respect to UpdateInviteMessageRequest + */ public static UpdateInviteMessageRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateInviteMessageRequest.class); } - /** - * Convert an instance of UpdateInviteMessageRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateInviteMessageRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateListingRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateListingRequest.java index db65a723..01231967 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateListingRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateListingRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * UpdateListingRequest */ -@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 UpdateListingRequest { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) + @javax.annotation.Nonnull private Boolean active; public UpdateListingRequest() { } - public UpdateListingRequest active(Boolean active) { - + public UpdateListingRequest active(@javax.annotation.Nonnull Boolean active) { this.active = active; return this; } - /** + /** * Get active * @return active - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getActive() { return active; } - - public void setActive(Boolean active) { + public void setActive(@javax.annotation.Nonnull Boolean active) { this.active = active; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("active"); + openapiFields = new HashSet(Arrays.asList("active")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("active"); + openapiRequiredFields = new HashSet(Arrays.asList("active")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateListingRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateListingRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateListingRequest is not found in the empty JSON string", UpdateListingRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateListingRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateListingRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateListingRequest is not found in the empty JSON string", UpdateListingRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateListingRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateListingRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateListingRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateListingRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -180,31 +173,31 @@ public void write(JsonWriter out, UpdateListingRequest value) throws IOException @Override public UpdateListingRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateListingRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateListingRequest - * @throws IOException if the JSON string is invalid with respect to UpdateListingRequest - */ + /** + * Create an instance of UpdateListingRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateListingRequest + * @throws IOException if the JSON string is invalid with respect to UpdateListingRequest + */ public static UpdateListingRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateListingRequest.class); } - /** - * Convert an instance of UpdateListingRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateListingRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateProductRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateProductRequest.java index 02029315..d1c8aab7 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateProductRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateProductRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,102 +49,94 @@ /** * UpdateProductRequest */ -@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 UpdateProductRequest { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable private String displayName; public static final String SERIALIZED_NAME_IMAGE_ID = "imageId"; @SerializedName(SERIALIZED_NAME_IMAGE_ID) + @javax.annotation.Nullable private String imageId; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_USE_FOR_SUBSCRIBER_LIST = "useForSubscriberList"; @SerializedName(SERIALIZED_NAME_USE_FOR_SUBSCRIBER_LIST) + @javax.annotation.Nullable private Boolean useForSubscriberList; public UpdateProductRequest() { } - public UpdateProductRequest description(String description) { - + public UpdateProductRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public UpdateProductRequest displayName(String displayName) { - + public UpdateProductRequest displayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; } - public UpdateProductRequest imageId(String imageId) { - + public UpdateProductRequest imageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; return this; } - /** + /** * Get imageId * @return imageId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "file_ce35d830-e20a-4df0-a6d4-5aaef4508044", value = "") - public String getImageId() { return imageId; } - - public void setImageId(String imageId) { + public void setImageId(@javax.annotation.Nullable String imageId) { this.imageId = imageId; } - public UpdateProductRequest tags(List tags) { - + public UpdateProductRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -157,42 +149,35 @@ public UpdateProductRequest addTagsItem(String tagsItem) { return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public UpdateProductRequest useForSubscriberList(Boolean useForSubscriberList) { - + public UpdateProductRequest useForSubscriberList(@javax.annotation.Nullable Boolean useForSubscriberList) { this.useForSubscriberList = useForSubscriberList; return this; } - /** + /** * Get useForSubscriberList * @return useForSubscriberList - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getUseForSubscriberList() { return useForSubscriberList; } - - public void setUseForSubscriberList(Boolean useForSubscriberList) { + public void setUseForSubscriberList(@javax.annotation.Nullable Boolean useForSubscriberList) { this.useForSubscriberList = useForSubscriberList; } @@ -237,10 +222,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -249,49 +231,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("displayName"); - openapiFields.add("imageId"); - openapiFields.add("tags"); - openapiFields.add("useForSubscriberList"); + openapiFields = new HashSet(Arrays.asList("description", "displayName", "imageId", "tags", "useForSubscriberList")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateProductRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateProductRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateProductRequest is not found in the empty JSON string", UpdateProductRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateProductRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateProductRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateProductRequest is not found in the empty JSON string", UpdateProductRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateProductRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateProductRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateProductRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageId").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } } @@ -315,31 +293,31 @@ public void write(JsonWriter out, UpdateProductRequest value) throws IOException @Override public UpdateProductRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateProductRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateProductRequest - * @throws IOException if the JSON string is invalid with respect to UpdateProductRequest - */ + /** + * Create an instance of UpdateProductRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateProductRequest + * @throws IOException if the JSON string is invalid with respect to UpdateProductRequest + */ public static UpdateProductRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateProductRequest.class); } - /** - * Convert an instance of UpdateProductRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateProductRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdatePropRequest.java b/src/main/java/io/github/vrchatapi/model/UpdatePropRequest.java index 591d79ed..98ba14ef 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdatePropRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdatePropRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,242 +49,220 @@ /** * UpdatePropRequest */ -@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 UpdatePropRequest { public static final String SERIALIZED_NAME_ASSET_URL = "assetUrl"; @SerializedName(SERIALIZED_NAME_ASSET_URL) + @javax.annotation.Nullable private String assetUrl; public static final String SERIALIZED_NAME_ASSET_VERSION = "assetVersion"; @SerializedName(SERIALIZED_NAME_ASSET_VERSION) + @javax.annotation.Nullable private Integer assetVersion; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nullable private String platform; public static final String SERIALIZED_NAME_PROP_SIGNATURE = "propSignature"; @SerializedName(SERIALIZED_NAME_PROP_SIGNATURE) + @javax.annotation.Nullable private String propSignature; public static final String SERIALIZED_NAME_SPAWN_TYPE = "spawnType"; @SerializedName(SERIALIZED_NAME_SPAWN_TYPE) + @javax.annotation.Nullable private Integer spawnType = 1; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_UNITY_VERSION = "unityVersion"; @SerializedName(SERIALIZED_NAME_UNITY_VERSION) + @javax.annotation.Nullable private String unityVersion; public static final String SERIALIZED_NAME_WORLD_PLACEMENT_MASK = "worldPlacementMask"; @SerializedName(SERIALIZED_NAME_WORLD_PLACEMENT_MASK) + @javax.annotation.Nullable private Integer worldPlacementMask = 1; public UpdatePropRequest() { } - public UpdatePropRequest assetUrl(String assetUrl) { - + public UpdatePropRequest assetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; return this; } - /** + /** * Get assetUrl * @return assetUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAssetUrl() { return assetUrl; } - - public void setAssetUrl(String assetUrl) { + public void setAssetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; } - public UpdatePropRequest assetVersion(Integer assetVersion) { - + public UpdatePropRequest assetVersion(@javax.annotation.Nullable Integer assetVersion) { this.assetVersion = assetVersion; return this; } - /** + /** * Get assetVersion * @return assetVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getAssetVersion() { return assetVersion; } - - public void setAssetVersion(Integer assetVersion) { + public void setAssetVersion(@javax.annotation.Nullable Integer assetVersion) { this.assetVersion = assetVersion; } - public UpdatePropRequest description(String description) { - + public UpdatePropRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public UpdatePropRequest imageUrl(String imageUrl) { - + public UpdatePropRequest imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public UpdatePropRequest name(String name) { - + public UpdatePropRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public UpdatePropRequest platform(String platform) { - + public UpdatePropRequest platform(@javax.annotation.Nullable String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "standalonewindows", value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nullable String platform) { this.platform = platform; } - public UpdatePropRequest propSignature(String propSignature) { - + public UpdatePropRequest propSignature(@javax.annotation.Nullable String propSignature) { this.propSignature = propSignature; return this; } - /** + /** * Get propSignature * @return propSignature - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPropSignature() { return propSignature; } - - public void setPropSignature(String propSignature) { + public void setPropSignature(@javax.annotation.Nullable String propSignature) { this.propSignature = propSignature; } - public UpdatePropRequest spawnType(Integer spawnType) { - + public UpdatePropRequest spawnType(@javax.annotation.Nullable Integer spawnType) { this.spawnType = spawnType; return this; } - /** + /** * How a prop is summoned and interacted with. 0: the prop fixed to some surface in the world 1: the prop is a pickup and may be held by users 2: ??? * minimum: 0 * @return spawnType - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "How a prop is summoned and interacted with. 0: the prop fixed to some surface in the world 1: the prop is a pickup and may be held by users 2: ???") - public Integer getSpawnType() { return spawnType; } - - public void setSpawnType(Integer spawnType) { + public void setSpawnType(@javax.annotation.Nullable Integer spawnType) { this.spawnType = spawnType; } - public UpdatePropRequest tags(List tags) { - + public UpdatePropRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -297,66 +275,55 @@ public UpdatePropRequest addTagsItem(String tagsItem) { return this; } - /** + /** * Get tags * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public UpdatePropRequest unityVersion(String unityVersion) { - + public UpdatePropRequest unityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; return this; } - /** + /** * Get unityVersion * @return unityVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; } - public UpdatePropRequest worldPlacementMask(Integer worldPlacementMask) { - + public UpdatePropRequest worldPlacementMask(@javax.annotation.Nullable Integer worldPlacementMask) { this.worldPlacementMask = worldPlacementMask; return this; } - /** + /** * Bitmask for restrictions on what world surfaces a prop may be summoned. 0: no restrictions 1: floors 2: walls 4: ceilings * minimum: 0 * @return worldPlacementMask - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Bitmask for restrictions on what world surfaces a prop may be summoned. 0: no restrictions 1: floors 2: walls 4: ceilings") - public Integer getWorldPlacementMask() { return worldPlacementMask; } - - public void setWorldPlacementMask(Integer worldPlacementMask) { + public void setWorldPlacementMask(@javax.annotation.Nullable Integer worldPlacementMask) { this.worldPlacementMask = worldPlacementMask; } @@ -413,10 +380,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -425,67 +389,57 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assetUrl"); - openapiFields.add("assetVersion"); - openapiFields.add("description"); - openapiFields.add("imageUrl"); - openapiFields.add("name"); - openapiFields.add("platform"); - openapiFields.add("propSignature"); - openapiFields.add("spawnType"); - openapiFields.add("tags"); - openapiFields.add("unityVersion"); - openapiFields.add("worldPlacementMask"); + openapiFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "description", "imageUrl", "name", "platform", "propSignature", "spawnType", "tags", "unityVersion", "worldPlacementMask")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdatePropRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdatePropRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdatePropRequest is not found in the empty JSON string", UpdatePropRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdatePropRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdatePropRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdatePropRequest is not found in the empty JSON string", UpdatePropRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdatePropRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdatePropRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdatePropRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("assetUrl") != null && !jsonObj.get("assetUrl").isJsonNull()) && !jsonObj.get("assetUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) && !jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); } if ((jsonObj.get("propSignature") != null && !jsonObj.get("propSignature").isJsonNull()) && !jsonObj.get("propSignature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `propSignature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propSignature").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `propSignature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propSignature").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("unityVersion") != null && !jsonObj.get("unityVersion").isJsonNull()) && !jsonObj.get("unityVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); } } @@ -509,31 +463,31 @@ public void write(JsonWriter out, UpdatePropRequest value) throws IOException { @Override public UpdatePropRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdatePropRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdatePropRequest - * @throws IOException if the JSON string is invalid with respect to UpdatePropRequest - */ + /** + * Create an instance of UpdatePropRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdatePropRequest + * @throws IOException if the JSON string is invalid with respect to UpdatePropRequest + */ public static UpdatePropRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdatePropRequest.class); } - /** - * Convert an instance of UpdatePropRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdatePropRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateTiliaTOSRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateTiliaTOSRequest.java index 3f781174..b83f2653 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateTiliaTOSRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateTiliaTOSRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * UpdateTiliaTOSRequest */ -@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 UpdateTiliaTOSRequest { public static final String SERIALIZED_NAME_ACCEPTED = "accepted"; @SerializedName(SERIALIZED_NAME_ACCEPTED) + @javax.annotation.Nonnull private Boolean accepted; public UpdateTiliaTOSRequest() { } - public UpdateTiliaTOSRequest accepted(Boolean accepted) { - + public UpdateTiliaTOSRequest accepted(@javax.annotation.Nonnull Boolean accepted) { this.accepted = accepted; return this; } - /** + /** * Get accepted * @return accepted - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getAccepted() { return accepted; } - - public void setAccepted(Boolean accepted) { + public void setAccepted(@javax.annotation.Nonnull Boolean accepted) { this.accepted = accepted; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accepted"); + openapiFields = new HashSet(Arrays.asList("accepted")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("accepted"); + openapiRequiredFields = new HashSet(Arrays.asList("accepted")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateTiliaTOSRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateTiliaTOSRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateTiliaTOSRequest is not found in the empty JSON string", UpdateTiliaTOSRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateTiliaTOSRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateTiliaTOSRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateTiliaTOSRequest is not found in the empty JSON string", UpdateTiliaTOSRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateTiliaTOSRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateTiliaTOSRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateTiliaTOSRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateTiliaTOSRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -180,31 +173,31 @@ public void write(JsonWriter out, UpdateTiliaTOSRequest value) throws IOExceptio @Override public UpdateTiliaTOSRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateTiliaTOSRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateTiliaTOSRequest - * @throws IOException if the JSON string is invalid with respect to UpdateTiliaTOSRequest - */ + /** + * Create an instance of UpdateTiliaTOSRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateTiliaTOSRequest + * @throws IOException if the JSON string is invalid with respect to UpdateTiliaTOSRequest + */ public static UpdateTiliaTOSRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateTiliaTOSRequest.class); } - /** - * Convert an instance of UpdateTiliaTOSRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateTiliaTOSRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateUserBadgeRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateUserBadgeRequest.java index 491f243e..2771a650 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateUserBadgeRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateUserBadgeRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * UpdateUserBadgeRequest */ -@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 UpdateUserBadgeRequest { public static final String SERIALIZED_NAME_HIDDEN = "hidden"; @SerializedName(SERIALIZED_NAME_HIDDEN) + @javax.annotation.Nullable private Boolean hidden; public static final String SERIALIZED_NAME_SHOWCASED = "showcased"; @SerializedName(SERIALIZED_NAME_SHOWCASED) + @javax.annotation.Nullable private Boolean showcased; public UpdateUserBadgeRequest() { } - public UpdateUserBadgeRequest hidden(Boolean hidden) { - + public UpdateUserBadgeRequest hidden(@javax.annotation.Nullable Boolean hidden) { this.hidden = hidden; return this; } - /** + /** * Get hidden * @return hidden - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getHidden() { return hidden; } - - public void setHidden(Boolean hidden) { + public void setHidden(@javax.annotation.Nullable Boolean hidden) { this.hidden = hidden; } - public UpdateUserBadgeRequest showcased(Boolean showcased) { - + public UpdateUserBadgeRequest showcased(@javax.annotation.Nullable Boolean showcased) { this.showcased = showcased; return this; } - /** + /** * Get showcased * @return showcased - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getShowcased() { return showcased; } - - public void setShowcased(Boolean showcased) { + public void setShowcased(@javax.annotation.Nullable Boolean showcased) { this.showcased = showcased; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,34 +143,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("hidden"); - openapiFields.add("showcased"); + openapiFields = new HashSet(Arrays.asList("hidden", "showcased")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateUserBadgeRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateUserBadgeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateUserBadgeRequest is not found in the empty JSON string", UpdateUserBadgeRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateUserBadgeRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateUserBadgeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateUserBadgeRequest is not found in the empty JSON string", UpdateUserBadgeRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateUserBadgeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateUserBadgeRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateUserBadgeRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -202,31 +192,31 @@ public void write(JsonWriter out, UpdateUserBadgeRequest value) throws IOExcepti @Override public UpdateUserBadgeRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateUserBadgeRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUserBadgeRequest - * @throws IOException if the JSON string is invalid with respect to UpdateUserBadgeRequest - */ + /** + * Create an instance of UpdateUserBadgeRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateUserBadgeRequest + * @throws IOException if the JSON string is invalid with respect to UpdateUserBadgeRequest + */ public static UpdateUserBadgeRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateUserBadgeRequest.class); } - /** - * Convert an instance of UpdateUserBadgeRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateUserBadgeRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateUserNoteRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateUserNoteRequest.java index 95fc0d06..0981d719 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateUserNoteRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateUserNoteRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * UpdateUserNoteRequest */ -@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 UpdateUserNoteRequest { public static final String SERIALIZED_NAME_NOTE = "note"; @SerializedName(SERIALIZED_NAME_NOTE) + @javax.annotation.Nonnull private String note; public static final String SERIALIZED_NAME_TARGET_USER_ID = "targetUserId"; @SerializedName(SERIALIZED_NAME_TARGET_USER_ID) + @javax.annotation.Nonnull private String targetUserId; public UpdateUserNoteRequest() { } - public UpdateUserNoteRequest note(String note) { - + public UpdateUserNoteRequest note(@javax.annotation.Nonnull String note) { this.note = note; return this; } - /** + /** * Get note * @return note - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getNote() { return note; } - - public void setNote(String note) { + public void setNote(@javax.annotation.Nonnull String note) { this.note = note; } - public UpdateUserNoteRequest targetUserId(String targetUserId) { - + public UpdateUserNoteRequest targetUserId(@javax.annotation.Nonnull String targetUserId) { this.targetUserId = targetUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return targetUserId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getTargetUserId() { return targetUserId; } - - public void setTargetUserId(String targetUserId) { + public void setTargetUserId(@javax.annotation.Nonnull String targetUserId) { this.targetUserId = targetUserId; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,48 +143,45 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("note"); - openapiFields.add("targetUserId"); + openapiFields = new HashSet(Arrays.asList("note", "targetUserId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("note"); - openapiRequiredFields.add("targetUserId"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateUserNoteRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateUserNoteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateUserNoteRequest is not found in the empty JSON string", UpdateUserNoteRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("note", "targetUserId")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateUserNoteRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateUserNoteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateUserNoteRequest is not found in the empty JSON string", UpdateUserNoteRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateUserNoteRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateUserNoteRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateUserNoteRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateUserNoteRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("note").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); } if (!jsonObj.get("targetUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `targetUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `targetUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetUserId").toString())); } } @@ -217,31 +205,31 @@ public void write(JsonWriter out, UpdateUserNoteRequest value) throws IOExceptio @Override public UpdateUserNoteRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateUserNoteRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUserNoteRequest - * @throws IOException if the JSON string is invalid with respect to UpdateUserNoteRequest - */ + /** + * Create an instance of UpdateUserNoteRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateUserNoteRequest + * @throws IOException if the JSON string is invalid with respect to UpdateUserNoteRequest + */ public static UpdateUserNoteRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateUserNoteRequest.class); } - /** - * Convert an instance of UpdateUserNoteRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateUserNoteRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateUserRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateUserRequest.java index 88621d4e..8f670212 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateUserRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateUserRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,11 +20,10 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ContentFilter; import io.github.vrchatapi.model.UserStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.LocalDate; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -38,13 +36,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -52,131 +52,145 @@ /** * UpdateUserRequest */ -@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 UpdateUserRequest { public static final String SERIALIZED_NAME_ACCEPTED_T_O_S_VERSION = "acceptedTOSVersion"; @SerializedName(SERIALIZED_NAME_ACCEPTED_T_O_S_VERSION) + @javax.annotation.Nullable private Integer acceptedTOSVersion; public static final String SERIALIZED_NAME_BIO = "bio"; @SerializedName(SERIALIZED_NAME_BIO) + @javax.annotation.Nullable private String bio; public static final String SERIALIZED_NAME_BIO_LINKS = "bioLinks"; @SerializedName(SERIALIZED_NAME_BIO_LINKS) - private List bioLinks = null; + @javax.annotation.Nullable + private List bioLinks = new ArrayList<>(); public static final String SERIALIZED_NAME_BIRTHDAY = "birthday"; @SerializedName(SERIALIZED_NAME_BIRTHDAY) + @javax.annotation.Nullable private LocalDate birthday; public static final String SERIALIZED_NAME_CONTENT_FILTERS = "contentFilters"; @SerializedName(SERIALIZED_NAME_CONTENT_FILTERS) - private List contentFilters = null; + @javax.annotation.Nullable + private List contentFilters = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_PASSWORD = "currentPassword"; @SerializedName(SERIALIZED_NAME_CURRENT_PASSWORD) + @javax.annotation.Nullable private String currentPassword; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable private String displayName; public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable private String email; + public static final String SERIALIZED_NAME_HAS_DISCORD_FRIENDS_OPT_OUT = "hasDiscordFriendsOptOut"; + @SerializedName(SERIALIZED_NAME_HAS_DISCORD_FRIENDS_OPT_OUT) + @javax.annotation.Nullable + private Boolean hasDiscordFriendsOptOut; + public static final String SERIALIZED_NAME_HAS_SHARED_CONNECTIONS_OPT_OUT = "hasSharedConnectionsOptOut"; @SerializedName(SERIALIZED_NAME_HAS_SHARED_CONNECTIONS_OPT_OUT) + @javax.annotation.Nullable private Boolean hasSharedConnectionsOptOut; public static final String SERIALIZED_NAME_IS_BOOPING_ENABLED = "isBoopingEnabled"; @SerializedName(SERIALIZED_NAME_IS_BOOPING_ENABLED) + @javax.annotation.Nullable private Boolean isBoopingEnabled; public static final String SERIALIZED_NAME_PASSWORD = "password"; @SerializedName(SERIALIZED_NAME_PASSWORD) + @javax.annotation.Nullable private String password; public static final String SERIALIZED_NAME_PRONOUNS = "pronouns"; @SerializedName(SERIALIZED_NAME_PRONOUNS) + @javax.annotation.Nullable private String pronouns; public static final String SERIALIZED_NAME_REVERT_DISPLAY_NAME = "revertDisplayName"; @SerializedName(SERIALIZED_NAME_REVERT_DISPLAY_NAME) + @javax.annotation.Nullable private Boolean revertDisplayName; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private UserStatus status = UserStatus.OFFLINE; public static final String SERIALIZED_NAME_STATUS_DESCRIPTION = "statusDescription"; @SerializedName(SERIALIZED_NAME_STATUS_DESCRIPTION) + @javax.annotation.Nullable private String statusDescription; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_UNSUBSCRIBE = "unsubscribe"; @SerializedName(SERIALIZED_NAME_UNSUBSCRIBE) + @javax.annotation.Nullable private Boolean unsubscribe; public static final String SERIALIZED_NAME_USER_ICON = "userIcon"; @SerializedName(SERIALIZED_NAME_USER_ICON) + @javax.annotation.Nullable private String userIcon; public UpdateUserRequest() { } - public UpdateUserRequest acceptedTOSVersion(Integer acceptedTOSVersion) { - + public UpdateUserRequest acceptedTOSVersion(@javax.annotation.Nullable Integer acceptedTOSVersion) { this.acceptedTOSVersion = acceptedTOSVersion; return this; } - /** + /** * Get acceptedTOSVersion * @return acceptedTOSVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Integer getAcceptedTOSVersion() { return acceptedTOSVersion; } - - public void setAcceptedTOSVersion(Integer acceptedTOSVersion) { + public void setAcceptedTOSVersion(@javax.annotation.Nullable Integer acceptedTOSVersion) { this.acceptedTOSVersion = acceptedTOSVersion; } - public UpdateUserRequest bio(String bio) { - + public UpdateUserRequest bio(@javax.annotation.Nullable String bio) { this.bio = bio; return this; } - /** + /** * Get bio * @return bio - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getBio() { return bio; } - - public void setBio(String bio) { + public void setBio(@javax.annotation.Nullable String bio) { this.bio = bio; } - public UpdateUserRequest bioLinks(List bioLinks) { - + public UpdateUserRequest bioLinks(@javax.annotation.Nullable List bioLinks) { this.bioLinks = bioLinks; return this; } @@ -189,48 +203,40 @@ public UpdateUserRequest addBioLinksItem(String bioLinksItem) { return this; } - /** + /** * Get bioLinks * @return bioLinks - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getBioLinks() { return bioLinks; } - - public void setBioLinks(List bioLinks) { + public void setBioLinks(@javax.annotation.Nullable List bioLinks) { this.bioLinks = bioLinks; } - public UpdateUserRequest birthday(LocalDate birthday) { - + public UpdateUserRequest birthday(@javax.annotation.Nullable LocalDate birthday) { this.birthday = birthday; return this; } - /** + /** * Get birthday * @return birthday - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public LocalDate getBirthday() { return birthday; } - - public void setBirthday(LocalDate birthday) { + public void setBirthday(@javax.annotation.Nullable LocalDate birthday) { this.birthday = birthday; } - public UpdateUserRequest contentFilters(List contentFilters) { - + public UpdateUserRequest contentFilters(@javax.annotation.Nullable List contentFilters) { this.contentFilters = contentFilters; return this; } @@ -243,255 +249,230 @@ public UpdateUserRequest addContentFiltersItem(ContentFilter contentFiltersItem) return this; } - /** + /** * These tags begin with `content_` and control content gating * @return contentFilters - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "These tags begin with `content_` and control content gating") - public List getContentFilters() { return contentFilters; } - - public void setContentFilters(List contentFilters) { + public void setContentFilters(@javax.annotation.Nullable List contentFilters) { this.contentFilters = contentFilters; } - public UpdateUserRequest currentPassword(String currentPassword) { - + public UpdateUserRequest currentPassword(@javax.annotation.Nullable String currentPassword) { this.currentPassword = currentPassword; return this; } - /** + /** * Get currentPassword * @return currentPassword - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getCurrentPassword() { return currentPassword; } - - public void setCurrentPassword(String currentPassword) { + public void setCurrentPassword(@javax.annotation.Nullable String currentPassword) { this.currentPassword = currentPassword; } - public UpdateUserRequest displayName(String displayName) { - + public UpdateUserRequest displayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; return this; } - /** + /** * MUST specify currentPassword as well to change display name * @return displayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "MUST specify currentPassword as well to change display name") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; } - public UpdateUserRequest email(String email) { - + public UpdateUserRequest email(@javax.annotation.Nullable String email) { this.email = email; return this; } - /** + /** * Get email * @return email - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getEmail() { return email; } - - public void setEmail(String email) { + public void setEmail(@javax.annotation.Nullable String email) { this.email = email; } - public UpdateUserRequest hasSharedConnectionsOptOut(Boolean hasSharedConnectionsOptOut) { - + public UpdateUserRequest hasDiscordFriendsOptOut(@javax.annotation.Nullable Boolean hasDiscordFriendsOptOut) { + this.hasDiscordFriendsOptOut = hasDiscordFriendsOptOut; + return this; + } + + /** + * Opt out of the Discord Friend Connections feature + * @return hasDiscordFriendsOptOut + */ + @javax.annotation.Nullable + public Boolean getHasDiscordFriendsOptOut() { + return hasDiscordFriendsOptOut; + } + + public void setHasDiscordFriendsOptOut(@javax.annotation.Nullable Boolean hasDiscordFriendsOptOut) { + this.hasDiscordFriendsOptOut = hasDiscordFriendsOptOut; + } + + + public UpdateUserRequest hasSharedConnectionsOptOut(@javax.annotation.Nullable Boolean hasSharedConnectionsOptOut) { this.hasSharedConnectionsOptOut = hasSharedConnectionsOptOut; return this; } - /** + /** * Opt out of the Mutuals feature * @return hasSharedConnectionsOptOut - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Opt out of the Mutuals feature") - public Boolean getHasSharedConnectionsOptOut() { return hasSharedConnectionsOptOut; } - - public void setHasSharedConnectionsOptOut(Boolean hasSharedConnectionsOptOut) { + public void setHasSharedConnectionsOptOut(@javax.annotation.Nullable Boolean hasSharedConnectionsOptOut) { this.hasSharedConnectionsOptOut = hasSharedConnectionsOptOut; } - public UpdateUserRequest isBoopingEnabled(Boolean isBoopingEnabled) { - + public UpdateUserRequest isBoopingEnabled(@javax.annotation.Nullable Boolean isBoopingEnabled) { this.isBoopingEnabled = isBoopingEnabled; return this; } - /** + /** * Get isBoopingEnabled * @return isBoopingEnabled - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getIsBoopingEnabled() { return isBoopingEnabled; } - - public void setIsBoopingEnabled(Boolean isBoopingEnabled) { + public void setIsBoopingEnabled(@javax.annotation.Nullable Boolean isBoopingEnabled) { this.isBoopingEnabled = isBoopingEnabled; } - public UpdateUserRequest password(String password) { - + public UpdateUserRequest password(@javax.annotation.Nullable String password) { this.password = password; return this; } - /** + /** * MUST specify currentPassword as well to change password * @return password - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "MUST specify currentPassword as well to change password") - public String getPassword() { return password; } - - public void setPassword(String password) { + public void setPassword(@javax.annotation.Nullable String password) { this.password = password; } - public UpdateUserRequest pronouns(String pronouns) { - + public UpdateUserRequest pronouns(@javax.annotation.Nullable String pronouns) { this.pronouns = pronouns; return this; } - /** + /** * Get pronouns * @return pronouns - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPronouns() { return pronouns; } - - public void setPronouns(String pronouns) { + public void setPronouns(@javax.annotation.Nullable String pronouns) { this.pronouns = pronouns; } - public UpdateUserRequest revertDisplayName(Boolean revertDisplayName) { - + public UpdateUserRequest revertDisplayName(@javax.annotation.Nullable Boolean revertDisplayName) { this.revertDisplayName = revertDisplayName; return this; } - /** + /** * MUST specify currentPassword as well to revert display name * @return revertDisplayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "MUST specify currentPassword as well to revert display name") - public Boolean getRevertDisplayName() { return revertDisplayName; } - - public void setRevertDisplayName(Boolean revertDisplayName) { + public void setRevertDisplayName(@javax.annotation.Nullable Boolean revertDisplayName) { this.revertDisplayName = revertDisplayName; } - public UpdateUserRequest status(UserStatus status) { - + public UpdateUserRequest status(@javax.annotation.Nullable UserStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UserStatus getStatus() { return status; } - - public void setStatus(UserStatus status) { + public void setStatus(@javax.annotation.Nullable UserStatus status) { this.status = status; } - public UpdateUserRequest statusDescription(String statusDescription) { - + public UpdateUserRequest statusDescription(@javax.annotation.Nullable String statusDescription) { this.statusDescription = statusDescription; return this; } - /** + /** * Get statusDescription * @return statusDescription - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getStatusDescription() { return statusDescription; } - - public void setStatusDescription(String statusDescription) { + public void setStatusDescription(@javax.annotation.Nullable String statusDescription) { this.statusDescription = statusDescription; } - public UpdateUserRequest tags(List tags) { - + public UpdateUserRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -504,65 +485,54 @@ public UpdateUserRequest addTagsItem(String tagsItem) { return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public UpdateUserRequest unsubscribe(Boolean unsubscribe) { - + public UpdateUserRequest unsubscribe(@javax.annotation.Nullable Boolean unsubscribe) { this.unsubscribe = unsubscribe; return this; } - /** + /** * Get unsubscribe * @return unsubscribe - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getUnsubscribe() { return unsubscribe; } - - public void setUnsubscribe(Boolean unsubscribe) { + public void setUnsubscribe(@javax.annotation.Nullable Boolean unsubscribe) { this.unsubscribe = unsubscribe; } - public UpdateUserRequest userIcon(String userIcon) { - + public UpdateUserRequest userIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; return this; } - /** + /** * MUST be a valid VRChat /file/ url. * @return userIcon - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/file/file_76dc2964-0ce8-41df-b2e7-8edf994fee31/1", value = "MUST be a valid VRChat /file/ url.") - public String getUserIcon() { return userIcon; } - - public void setUserIcon(String userIcon) { + public void setUserIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; } @@ -585,6 +555,7 @@ public boolean equals(Object o) { Objects.equals(this.currentPassword, updateUserRequest.currentPassword) && Objects.equals(this.displayName, updateUserRequest.displayName) && Objects.equals(this.email, updateUserRequest.email) && + Objects.equals(this.hasDiscordFriendsOptOut, updateUserRequest.hasDiscordFriendsOptOut) && Objects.equals(this.hasSharedConnectionsOptOut, updateUserRequest.hasSharedConnectionsOptOut) && Objects.equals(this.isBoopingEnabled, updateUserRequest.isBoopingEnabled) && Objects.equals(this.password, updateUserRequest.password) && @@ -599,7 +570,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(acceptedTOSVersion, bio, bioLinks, birthday, contentFilters, currentPassword, displayName, email, hasSharedConnectionsOptOut, isBoopingEnabled, password, pronouns, revertDisplayName, status, statusDescription, tags, unsubscribe, userIcon); + return Objects.hash(acceptedTOSVersion, bio, bioLinks, birthday, contentFilters, currentPassword, displayName, email, hasDiscordFriendsOptOut, hasSharedConnectionsOptOut, isBoopingEnabled, password, pronouns, revertDisplayName, status, statusDescription, tags, unsubscribe, userIcon); } @Override @@ -614,6 +585,7 @@ public String toString() { sb.append(" currentPassword: ").append(toIndentedString(currentPassword)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" hasDiscordFriendsOptOut: ").append(toIndentedString(hasDiscordFriendsOptOut)).append("\n"); sb.append(" hasSharedConnectionsOptOut: ").append(toIndentedString(hasSharedConnectionsOptOut)).append("\n"); sb.append(" isBoopingEnabled: ").append(toIndentedString(isBoopingEnabled)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); @@ -633,10 +605,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -645,85 +614,72 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("acceptedTOSVersion"); - openapiFields.add("bio"); - openapiFields.add("bioLinks"); - openapiFields.add("birthday"); - openapiFields.add("contentFilters"); - openapiFields.add("currentPassword"); - openapiFields.add("displayName"); - openapiFields.add("email"); - openapiFields.add("hasSharedConnectionsOptOut"); - openapiFields.add("isBoopingEnabled"); - openapiFields.add("password"); - openapiFields.add("pronouns"); - openapiFields.add("revertDisplayName"); - openapiFields.add("status"); - openapiFields.add("statusDescription"); - openapiFields.add("tags"); - openapiFields.add("unsubscribe"); - openapiFields.add("userIcon"); + openapiFields = new HashSet(Arrays.asList("acceptedTOSVersion", "bio", "bioLinks", "birthday", "contentFilters", "currentPassword", "displayName", "email", "hasDiscordFriendsOptOut", "hasSharedConnectionsOptOut", "isBoopingEnabled", "password", "pronouns", "revertDisplayName", "status", "statusDescription", "tags", "unsubscribe", "userIcon")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateUserRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateUserRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateUserRequest is not found in the empty JSON string", UpdateUserRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateUserRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateUserRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateUserRequest is not found in the empty JSON string", UpdateUserRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateUserRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateUserRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateUserRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("bio") != null && !jsonObj.get("bio").isJsonNull()) && !jsonObj.get("bio").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("bioLinks") != null && !jsonObj.get("bioLinks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); + if (jsonObj.get("bioLinks") != null && !jsonObj.get("bioLinks").isJsonNull() && !jsonObj.get("bioLinks").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("contentFilters") != null && !jsonObj.get("contentFilters").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `contentFilters` to be an array in the JSON string but got `%s`", jsonObj.get("contentFilters").toString())); + if (jsonObj.get("contentFilters") != null && !jsonObj.get("contentFilters").isJsonNull() && !jsonObj.get("contentFilters").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contentFilters` to be an array in the JSON string but got `%s`", jsonObj.get("contentFilters").toString())); } if ((jsonObj.get("currentPassword") != null && !jsonObj.get("currentPassword").isJsonNull()) && !jsonObj.get("currentPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentPassword").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentPassword").toString())); } if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("pronouns") != null && !jsonObj.get("pronouns").isJsonNull()) && !jsonObj.get("pronouns").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `pronouns` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronouns").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pronouns` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronouns").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + UserStatus.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("statusDescription") != null && !jsonObj.get("statusDescription").isJsonNull()) && !jsonObj.get("statusDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("userIcon") != null && !jsonObj.get("userIcon").isJsonNull()) && !jsonObj.get("userIcon").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); } } @@ -747,31 +703,31 @@ public void write(JsonWriter out, UpdateUserRequest value) throws IOException { @Override public UpdateUserRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateUserRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateUserRequest - * @throws IOException if the JSON string is invalid with respect to UpdateUserRequest - */ + /** + * Create an instance of UpdateUserRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateUserRequest + * @throws IOException if the JSON string is invalid with respect to UpdateUserRequest + */ public static UpdateUserRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateUserRequest.class); } - /** - * Convert an instance of UpdateUserRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateUserRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UpdateWorldRequest.java b/src/main/java/io/github/vrchatapi/model/UpdateWorldRequest.java index c826186f..435e80b2 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateWorldRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateWorldRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.ReleaseStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,297 +50,269 @@ /** * UpdateWorldRequest */ -@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 UpdateWorldRequest { public static final String SERIALIZED_NAME_ASSET_URL = "assetUrl"; @SerializedName(SERIALIZED_NAME_ASSET_URL) + @javax.annotation.Nullable private String assetUrl; public static final String SERIALIZED_NAME_ASSET_VERSION = "assetVersion"; @SerializedName(SERIALIZED_NAME_ASSET_VERSION) + @javax.annotation.Nullable private String assetVersion; public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable private String authorId; public static final String SERIALIZED_NAME_AUTHOR_NAME = "authorName"; @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nullable private String authorName; public static final String SERIALIZED_NAME_CAPACITY = "capacity"; @SerializedName(SERIALIZED_NAME_CAPACITY) + @javax.annotation.Nullable private Integer capacity; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nullable private String imageUrl; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nullable private String platform; public static final String SERIALIZED_NAME_RELEASE_STATUS = "releaseStatus"; @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) + @javax.annotation.Nullable private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + @javax.annotation.Nullable + private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_UNITY_PACKAGE_URL = "unityPackageUrl"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGE_URL) + @javax.annotation.Nullable private String unityPackageUrl; public static final String SERIALIZED_NAME_UNITY_VERSION = "unityVersion"; @SerializedName(SERIALIZED_NAME_UNITY_VERSION) + @javax.annotation.Nullable private String unityVersion = "5.3.4p1"; public UpdateWorldRequest() { } - public UpdateWorldRequest assetUrl(String assetUrl) { - + public UpdateWorldRequest assetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; return this; } - /** + /** * Get assetUrl * @return assetUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAssetUrl() { return assetUrl; } - - public void setAssetUrl(String assetUrl) { + public void setAssetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; } - public UpdateWorldRequest assetVersion(String assetVersion) { - + public UpdateWorldRequest assetVersion(@javax.annotation.Nullable String assetVersion) { this.assetVersion = assetVersion; return this; } - /** + /** * Get assetVersion * @return assetVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAssetVersion() { return assetVersion; } - - public void setAssetVersion(String assetVersion) { + public void setAssetVersion(@javax.annotation.Nullable String assetVersion) { this.assetVersion = assetVersion; } - public UpdateWorldRequest authorId(String authorId) { - + public UpdateWorldRequest authorId(@javax.annotation.Nullable String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nullable String authorId) { this.authorId = authorId; } - public UpdateWorldRequest authorName(String authorName) { - + public UpdateWorldRequest authorName(@javax.annotation.Nullable String authorName) { this.authorName = authorName; return this; } - /** + /** * Get authorName * @return authorName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getAuthorName() { return authorName; } - - public void setAuthorName(String authorName) { + public void setAuthorName(@javax.annotation.Nullable String authorName) { this.authorName = authorName; } - public UpdateWorldRequest capacity(Integer capacity) { - + public UpdateWorldRequest capacity(@javax.annotation.Nullable Integer capacity) { this.capacity = capacity; return this; } - /** + /** * Get capacity * minimum: 0 * maximum: 40 * @return capacity - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "8", value = "") - public Integer getCapacity() { return capacity; } - - public void setCapacity(Integer capacity) { + public void setCapacity(@javax.annotation.Nullable Integer capacity) { this.capacity = capacity; } - public UpdateWorldRequest description(String description) { - + public UpdateWorldRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public UpdateWorldRequest imageUrl(String imageUrl) { - + public UpdateWorldRequest imageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { this.imageUrl = imageUrl; } - public UpdateWorldRequest name(String name) { - + public UpdateWorldRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public UpdateWorldRequest platform(String platform) { - + public UpdateWorldRequest platform(@javax.annotation.Nullable String platform) { this.platform = platform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return platform - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "standalonewindows", value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nullable String platform) { this.platform = platform; } - public UpdateWorldRequest releaseStatus(ReleaseStatus releaseStatus) { - + public UpdateWorldRequest releaseStatus(@javax.annotation.Nullable ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; return this; } - /** + /** * Get releaseStatus * @return releaseStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ReleaseStatus getReleaseStatus() { return releaseStatus; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { + public void setReleaseStatus(@javax.annotation.Nullable ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; } - public UpdateWorldRequest tags(List tags) { - + public UpdateWorldRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } @@ -353,65 +325,54 @@ public UpdateWorldRequest addTagsItem(String tagsItem) { return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nullable List tags) { this.tags = tags; } - public UpdateWorldRequest unityPackageUrl(String unityPackageUrl) { - + public UpdateWorldRequest unityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; return this; } - /** + /** * Get unityPackageUrl * @return unityPackageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUnityPackageUrl() { return unityPackageUrl; } - - public void setUnityPackageUrl(String unityPackageUrl) { + public void setUnityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { this.unityPackageUrl = unityPackageUrl; } - public UpdateWorldRequest unityVersion(String unityVersion) { - + public UpdateWorldRequest unityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; return this; } - /** + /** * Get unityVersion * @return unityVersion - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "2022.3.6f1", value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; } @@ -472,10 +433,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -484,78 +442,70 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assetUrl"); - openapiFields.add("assetVersion"); - openapiFields.add("authorId"); - openapiFields.add("authorName"); - openapiFields.add("capacity"); - openapiFields.add("description"); - openapiFields.add("imageUrl"); - openapiFields.add("name"); - openapiFields.add("platform"); - openapiFields.add("releaseStatus"); - openapiFields.add("tags"); - openapiFields.add("unityPackageUrl"); - openapiFields.add("unityVersion"); + openapiFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "authorId", "authorName", "capacity", "description", "imageUrl", "name", "platform", "releaseStatus", "tags", "unityPackageUrl", "unityVersion")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UpdateWorldRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdateWorldRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateWorldRequest is not found in the empty JSON string", UpdateWorldRequest.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateWorldRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateWorldRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UpdateWorldRequest is not found in the empty JSON string", UpdateWorldRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UpdateWorldRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateWorldRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UpdateWorldRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("assetUrl") != null && !jsonObj.get("assetUrl").isJsonNull()) && !jsonObj.get("assetUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetUrl").toString())); } if ((jsonObj.get("assetVersion") != null && !jsonObj.get("assetVersion").isJsonNull()) && !jsonObj.get("assetVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `assetVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `assetVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("assetVersion").toString())); } if ((jsonObj.get("authorId") != null && !jsonObj.get("authorId").isJsonNull()) && !jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if ((jsonObj.get("authorName") != null && !jsonObj.get("authorName").isJsonNull()) && !jsonObj.get("authorName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("imageUrl") != null && !jsonObj.get("imageUrl").isJsonNull()) && !jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) && !jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + } + // validate the optional field `releaseStatus` + if (jsonObj.get("releaseStatus") != null && !jsonObj.get("releaseStatus").isJsonNull()) { + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); } // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("unityPackageUrl") != null && !jsonObj.get("unityPackageUrl").isJsonNull()) && !jsonObj.get("unityPackageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); } if ((jsonObj.get("unityVersion") != null && !jsonObj.get("unityVersion").isJsonNull()) && !jsonObj.get("unityVersion").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); } } @@ -579,31 +529,31 @@ public void write(JsonWriter out, UpdateWorldRequest value) throws IOException { @Override public UpdateWorldRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UpdateWorldRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateWorldRequest - * @throws IOException if the JSON string is invalid with respect to UpdateWorldRequest - */ + /** + * Create an instance of UpdateWorldRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateWorldRequest + * @throws IOException if the JSON string is invalid with respect to UpdateWorldRequest + */ public static UpdateWorldRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateWorldRequest.class); } - /** - * Convert an instance of UpdateWorldRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UpdateWorldRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UploadGalleryImageRequest.java b/src/main/java/io/github/vrchatapi/model/UploadGalleryImageRequest.java index 6f5d4332..90e8957e 100644 --- a/src/main/java/io/github/vrchatapi/model/UploadGalleryImageRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UploadGalleryImageRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,13 +32,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -48,34 +48,31 @@ /** * UploadGalleryImageRequest */ -@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 UploadGalleryImageRequest { public static final String SERIALIZED_NAME_FILE = "file"; @SerializedName(SERIALIZED_NAME_FILE) + @javax.annotation.Nonnull private File _file; public UploadGalleryImageRequest() { } - public UploadGalleryImageRequest _file(File _file) { - + public UploadGalleryImageRequest _file(@javax.annotation.Nonnull File _file) { this._file = _file; return this; } - /** + /** * The binary blob of the png file. * @return _file - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The binary blob of the png file.") - public File getFile() { return _file; } - - public void setFile(File _file) { + public void setFile(@javax.annotation.Nonnull File _file) { this._file = _file; } @@ -112,10 +109,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -124,41 +118,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("file"); + openapiFields = new HashSet(Arrays.asList("file")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("file"); + openapiRequiredFields = new HashSet(Arrays.asList("file")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UploadGalleryImageRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UploadGalleryImageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UploadGalleryImageRequest is not found in the empty JSON string", UploadGalleryImageRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UploadGalleryImageRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UploadGalleryImageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UploadGalleryImageRequest is not found in the empty JSON string", UploadGalleryImageRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UploadGalleryImageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UploadGalleryImageRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UploadGalleryImageRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UploadGalleryImageRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -181,31 +174,31 @@ public void write(JsonWriter out, UploadGalleryImageRequest value) throws IOExce @Override public UploadGalleryImageRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UploadGalleryImageRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UploadGalleryImageRequest - * @throws IOException if the JSON string is invalid with respect to UploadGalleryImageRequest - */ + /** + * Create an instance of UploadGalleryImageRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UploadGalleryImageRequest + * @throws IOException if the JSON string is invalid with respect to UploadGalleryImageRequest + */ public static UploadGalleryImageRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UploadGalleryImageRequest.class); } - /** - * Convert an instance of UploadGalleryImageRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UploadGalleryImageRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UploadImageRequest.java b/src/main/java/io/github/vrchatapi/model/UploadImageRequest.java index c8be8a02..e8d88327 100644 --- a/src/main/java/io/github/vrchatapi/model/UploadImageRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UploadImageRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,10 +22,9 @@ import io.github.vrchatapi.model.ImageLoopStyle; import io.github.vrchatapi.model.ImageMask; import io.github.vrchatapi.model.ImagePurpose; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -38,13 +36,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -52,200 +52,179 @@ /** * UploadImageRequest */ -@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 UploadImageRequest { public static final String SERIALIZED_NAME_ANIMATION_STYLE = "animationStyle"; @SerializedName(SERIALIZED_NAME_ANIMATION_STYLE) + @javax.annotation.Nullable private ImageAnimationStyle animationStyle; public static final String SERIALIZED_NAME_FILE = "file"; @SerializedName(SERIALIZED_NAME_FILE) + @javax.annotation.Nonnull private File _file; public static final String SERIALIZED_NAME_FRAMES = "frames"; @SerializedName(SERIALIZED_NAME_FRAMES) + @javax.annotation.Nullable private Integer frames; public static final String SERIALIZED_NAME_FRAMES_OVER_TIME = "framesOverTime"; @SerializedName(SERIALIZED_NAME_FRAMES_OVER_TIME) + @javax.annotation.Nullable private Integer framesOverTime; public static final String SERIALIZED_NAME_LOOP_STYLE = "loopStyle"; @SerializedName(SERIALIZED_NAME_LOOP_STYLE) + @javax.annotation.Nullable private ImageLoopStyle loopStyle = ImageLoopStyle.LINEAR; public static final String SERIALIZED_NAME_MASK_TAG = "maskTag"; @SerializedName(SERIALIZED_NAME_MASK_TAG) + @javax.annotation.Nullable private ImageMask maskTag = ImageMask.SQUARE; public static final String SERIALIZED_NAME_TAG = "tag"; @SerializedName(SERIALIZED_NAME_TAG) + @javax.annotation.Nonnull private ImagePurpose tag = ImagePurpose.GALLERY; public UploadImageRequest() { } - public UploadImageRequest animationStyle(ImageAnimationStyle animationStyle) { - + public UploadImageRequest animationStyle(@javax.annotation.Nullable ImageAnimationStyle animationStyle) { this.animationStyle = animationStyle; return this; } - /** + /** * Get animationStyle * @return animationStyle - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ImageAnimationStyle getAnimationStyle() { return animationStyle; } - - public void setAnimationStyle(ImageAnimationStyle animationStyle) { + public void setAnimationStyle(@javax.annotation.Nullable ImageAnimationStyle animationStyle) { this.animationStyle = animationStyle; } - public UploadImageRequest _file(File _file) { - + public UploadImageRequest _file(@javax.annotation.Nonnull File _file) { this._file = _file; return this; } - /** + /** * The binary blob of the png file. * @return _file - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The binary blob of the png file.") - public File getFile() { return _file; } - - public void setFile(File _file) { + public void setFile(@javax.annotation.Nonnull File _file) { this._file = _file; } - public UploadImageRequest frames(Integer frames) { - + public UploadImageRequest frames(@javax.annotation.Nullable Integer frames) { this.frames = frames; return this; } - /** + /** * Required for animated images. Total number of frames of the spritesheet to be animated. * minimum: 2 * maximum: 64 * @return frames - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Required for animated images. Total number of frames of the spritesheet to be animated.") - public Integer getFrames() { return frames; } - - public void setFrames(Integer frames) { + public void setFrames(@javax.annotation.Nullable Integer frames) { this.frames = frames; } - public UploadImageRequest framesOverTime(Integer framesOverTime) { - + public UploadImageRequest framesOverTime(@javax.annotation.Nullable Integer framesOverTime) { this.framesOverTime = framesOverTime; return this; } - /** + /** * Required for animated images. Animation frames per second. * minimum: 1 * maximum: 64 * @return framesOverTime - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Required for animated images. Animation frames per second.") - public Integer getFramesOverTime() { return framesOverTime; } - - public void setFramesOverTime(Integer framesOverTime) { + public void setFramesOverTime(@javax.annotation.Nullable Integer framesOverTime) { this.framesOverTime = framesOverTime; } - public UploadImageRequest loopStyle(ImageLoopStyle loopStyle) { - + public UploadImageRequest loopStyle(@javax.annotation.Nullable ImageLoopStyle loopStyle) { this.loopStyle = loopStyle; return this; } - /** + /** * Get loopStyle * @return loopStyle - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ImageLoopStyle getLoopStyle() { return loopStyle; } - - public void setLoopStyle(ImageLoopStyle loopStyle) { + public void setLoopStyle(@javax.annotation.Nullable ImageLoopStyle loopStyle) { this.loopStyle = loopStyle; } - public UploadImageRequest maskTag(ImageMask maskTag) { - + public UploadImageRequest maskTag(@javax.annotation.Nullable ImageMask maskTag) { this.maskTag = maskTag; return this; } - /** + /** * Get maskTag * @return maskTag - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public ImageMask getMaskTag() { return maskTag; } - - public void setMaskTag(ImageMask maskTag) { + public void setMaskTag(@javax.annotation.Nullable ImageMask maskTag) { this.maskTag = maskTag; } - public UploadImageRequest tag(ImagePurpose tag) { - + public UploadImageRequest tag(@javax.annotation.Nonnull ImagePurpose tag) { this.tag = tag; return this; } - /** + /** * Get tag * @return tag - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ImagePurpose getTag() { return tag; } - - public void setTag(ImagePurpose tag) { + public void setTag(@javax.annotation.Nonnull ImagePurpose tag) { this.tag = tag; } @@ -294,10 +273,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -306,48 +282,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("animationStyle"); - openapiFields.add("file"); - openapiFields.add("frames"); - openapiFields.add("framesOverTime"); - openapiFields.add("loopStyle"); - openapiFields.add("maskTag"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("animationStyle", "file", "frames", "framesOverTime", "loopStyle", "maskTag", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("file"); - openapiRequiredFields.add("tag"); + openapiRequiredFields = new HashSet(Arrays.asList("file", "tag")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UploadImageRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UploadImageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UploadImageRequest is not found in the empty JSON string", UploadImageRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UploadImageRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UploadImageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UploadImageRequest is not found in the empty JSON string", UploadImageRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UploadImageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UploadImageRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UploadImageRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UploadImageRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `animationStyle` + if (jsonObj.get("animationStyle") != null && !jsonObj.get("animationStyle").isJsonNull()) { + ImageAnimationStyle.validateJsonElement(jsonObj.get("animationStyle")); + } + // validate the optional field `loopStyle` + if (jsonObj.get("loopStyle") != null && !jsonObj.get("loopStyle").isJsonNull()) { + ImageLoopStyle.validateJsonElement(jsonObj.get("loopStyle")); + } + // validate the optional field `maskTag` + if (jsonObj.get("maskTag") != null && !jsonObj.get("maskTag").isJsonNull()) { + ImageMask.validateJsonElement(jsonObj.get("maskTag")); + } + // validate the required field `tag` + ImagePurpose.validateJsonElement(jsonObj.get("tag")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -370,31 +352,31 @@ public void write(JsonWriter out, UploadImageRequest value) throws IOException { @Override public UploadImageRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UploadImageRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UploadImageRequest - * @throws IOException if the JSON string is invalid with respect to UploadImageRequest - */ + /** + * Create an instance of UploadImageRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UploadImageRequest + * @throws IOException if the JSON string is invalid with respect to UploadImageRequest + */ public static UploadImageRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UploadImageRequest.class); } - /** - * Convert an instance of UploadImageRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UploadImageRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UploadPrintRequest.java b/src/main/java/io/github/vrchatapi/model/UploadPrintRequest.java index 88ef6fc6..5ced5abb 100644 --- a/src/main/java/io/github/vrchatapi/model/UploadPrintRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UploadPrintRequest.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,142 +49,127 @@ /** * UploadPrintRequest */ -@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 UploadPrintRequest { public static final String SERIALIZED_NAME_IMAGE = "image"; @SerializedName(SERIALIZED_NAME_IMAGE) + @javax.annotation.Nonnull private File image; public static final String SERIALIZED_NAME_NOTE = "note"; @SerializedName(SERIALIZED_NAME_NOTE) + @javax.annotation.Nullable private String note; public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; @SerializedName(SERIALIZED_NAME_TIMESTAMP) + @javax.annotation.Nonnull private OffsetDateTime timestamp; public static final String SERIALIZED_NAME_WORLD_ID = "worldId"; @SerializedName(SERIALIZED_NAME_WORLD_ID) + @javax.annotation.Nullable private String worldId; public static final String SERIALIZED_NAME_WORLD_NAME = "worldName"; @SerializedName(SERIALIZED_NAME_WORLD_NAME) + @javax.annotation.Nullable private String worldName; public UploadPrintRequest() { } - public UploadPrintRequest image(File image) { - + public UploadPrintRequest image(@javax.annotation.Nonnull File image) { this.image = image; return this; } - /** + /** * The binary blob of the png file. * @return image - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The binary blob of the png file.") - public File getImage() { return image; } - - public void setImage(File image) { + public void setImage(@javax.annotation.Nonnull File image) { this.image = image; } - public UploadPrintRequest note(String note) { - + public UploadPrintRequest note(@javax.annotation.Nullable String note) { this.note = note; return this; } - /** + /** * The caption for the image. * @return note - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The caption for the image.") - public String getNote() { return note; } - - public void setNote(String note) { + public void setNote(@javax.annotation.Nullable String note) { this.note = note; } - public UploadPrintRequest timestamp(OffsetDateTime timestamp) { - + public UploadPrintRequest timestamp(@javax.annotation.Nonnull OffsetDateTime timestamp) { this.timestamp = timestamp; return this; } - /** + /** * The time the image was captured. * @return timestamp - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The time the image was captured.") - public OffsetDateTime getTimestamp() { return timestamp; } - - public void setTimestamp(OffsetDateTime timestamp) { + public void setTimestamp(@javax.annotation.Nonnull OffsetDateTime timestamp) { this.timestamp = timestamp; } - public UploadPrintRequest worldId(String worldId) { - + public UploadPrintRequest worldId(@javax.annotation.Nullable String worldId) { this.worldId = worldId; return this; } - /** + /** * The id of the world in which the image was captured. * @return worldId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The id of the world in which the image was captured.") - public String getWorldId() { return worldId; } - - public void setWorldId(String worldId) { + public void setWorldId(@javax.annotation.Nullable String worldId) { this.worldId = worldId; } - public UploadPrintRequest worldName(String worldName) { - + public UploadPrintRequest worldName(@javax.annotation.Nullable String worldName) { this.worldName = worldName; return this; } - /** + /** * The name of the world in which the image was captured. * @return worldName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "The name of the world in which the image was captured.") - public String getWorldName() { return worldName; } - - public void setWorldName(String worldName) { + public void setWorldName(@javax.annotation.Nullable String worldName) { this.worldName = worldName; } @@ -229,10 +214,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -241,54 +223,48 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("image"); - openapiFields.add("note"); - openapiFields.add("timestamp"); - openapiFields.add("worldId"); - openapiFields.add("worldName"); + openapiFields = new HashSet(Arrays.asList("image", "note", "timestamp", "worldId", "worldName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("image"); - openapiRequiredFields.add("timestamp"); + openapiRequiredFields = new HashSet(Arrays.asList("image", "timestamp")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UploadPrintRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UploadPrintRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UploadPrintRequest is not found in the empty JSON string", UploadPrintRequest.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UploadPrintRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UploadPrintRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UploadPrintRequest is not found in the empty JSON string", UploadPrintRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UploadPrintRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UploadPrintRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UploadPrintRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UploadPrintRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("note") != null && !jsonObj.get("note").isJsonNull()) && !jsonObj.get("note").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); } if ((jsonObj.get("worldId") != null && !jsonObj.get("worldId").isJsonNull()) && !jsonObj.get("worldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); } if ((jsonObj.get("worldName") != null && !jsonObj.get("worldName").isJsonNull()) && !jsonObj.get("worldName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldName").toString())); } } @@ -312,31 +288,31 @@ public void write(JsonWriter out, UploadPrintRequest value) throws IOException { @Override public UploadPrintRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UploadPrintRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of UploadPrintRequest - * @throws IOException if the JSON string is invalid with respect to UploadPrintRequest - */ + /** + * Create an instance of UploadPrintRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UploadPrintRequest + * @throws IOException if the JSON string is invalid with respect to UploadPrintRequest + */ public static UploadPrintRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UploadPrintRequest.class); } - /** - * Convert an instance of UploadPrintRequest to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UploadPrintRequest to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/User.java b/src/main/java/io/github/vrchatapi/model/User.java index 5cd3bef3..828b2a1f 100644 --- a/src/main/java/io/github/vrchatapi/model/User.java +++ b/src/main/java/io/github/vrchatapi/model/User.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,11 +23,10 @@ import io.github.vrchatapi.model.DeveloperType; import io.github.vrchatapi.model.UserState; import io.github.vrchatapi.model.UserStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.LocalDate; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -42,13 +40,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -56,230 +56,290 @@ /** * User */ -@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 User { public static final String SERIALIZED_NAME_AGE_VERIFICATION_STATUS = "ageVerificationStatus"; @SerializedName(SERIALIZED_NAME_AGE_VERIFICATION_STATUS) + @javax.annotation.Nonnull private AgeVerificationStatus ageVerificationStatus; public static final String SERIALIZED_NAME_AGE_VERIFIED = "ageVerified"; @SerializedName(SERIALIZED_NAME_AGE_VERIFIED) + @javax.annotation.Nonnull private Boolean ageVerified; public static final String SERIALIZED_NAME_ALLOW_AVATAR_COPYING = "allowAvatarCopying"; @SerializedName(SERIALIZED_NAME_ALLOW_AVATAR_COPYING) + @javax.annotation.Nonnull private Boolean allowAvatarCopying = true; public static final String SERIALIZED_NAME_BADGES = "badges"; @SerializedName(SERIALIZED_NAME_BADGES) - private List badges = null; + @javax.annotation.Nullable + private List badges = new ArrayList<>(); + + public static final String SERIALIZED_NAME_BANNER_TYPE = "bannerType"; + @SerializedName(SERIALIZED_NAME_BANNER_TYPE) + @javax.annotation.Nullable + private String bannerType; + + public static final String SERIALIZED_NAME_BANNER_URL = "bannerUrl"; + @SerializedName(SERIALIZED_NAME_BANNER_URL) + @javax.annotation.Nullable + private String bannerUrl; public static final String SERIALIZED_NAME_BIO = "bio"; @SerializedName(SERIALIZED_NAME_BIO) + @javax.annotation.Nonnull private String bio; public static final String SERIALIZED_NAME_BIO_LINKS = "bioLinks"; @SerializedName(SERIALIZED_NAME_BIO_LINKS) + @javax.annotation.Nonnull private List bioLinks = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL = "currentAvatarImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL) + @javax.annotation.Nonnull private String currentAvatarImageUrl; public static final String SERIALIZED_NAME_CURRENT_AVATAR_TAGS = "currentAvatarTags"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_TAGS) + @javax.annotation.Nonnull private List currentAvatarTags = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL = "currentAvatarThumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nonnull private String currentAvatarThumbnailImageUrl; public static final String SERIALIZED_NAME_DATE_JOINED = "date_joined"; @SerializedName(SERIALIZED_NAME_DATE_JOINED) + @javax.annotation.Nonnull private LocalDate dateJoined; public static final String SERIALIZED_NAME_DEVELOPER_TYPE = "developerType"; @SerializedName(SERIALIZED_NAME_DEVELOPER_TYPE) + @javax.annotation.Nonnull private DeveloperType developerType = DeveloperType.NONE; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nonnull private String displayName; public static final String SERIALIZED_NAME_FRIEND_KEY = "friendKey"; @SerializedName(SERIALIZED_NAME_FRIEND_KEY) + @javax.annotation.Nonnull private String friendKey; public static final String SERIALIZED_NAME_FRIEND_REQUEST_STATUS = "friendRequestStatus"; @SerializedName(SERIALIZED_NAME_FRIEND_REQUEST_STATUS) + @javax.annotation.Nullable private String friendRequestStatus; + public static final String SERIALIZED_NAME_ICON_FRAME = "iconFrame"; + @SerializedName(SERIALIZED_NAME_ICON_FRAME) + @javax.annotation.Nullable + private String iconFrame; + + public static final String SERIALIZED_NAME_ICON_URL = "iconUrl"; + @SerializedName(SERIALIZED_NAME_ICON_URL) + @javax.annotation.Nullable + private String iconUrl; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_INSTANCE_ID = "instanceId"; @SerializedName(SERIALIZED_NAME_INSTANCE_ID) + @javax.annotation.Nullable private String instanceId; + public static final String SERIALIZED_NAME_IS_ECONOMY_CREATOR = "isEconomyCreator"; + @SerializedName(SERIALIZED_NAME_IS_ECONOMY_CREATOR) + @javax.annotation.Nullable + private Boolean isEconomyCreator; + public static final String SERIALIZED_NAME_IS_FRIEND = "isFriend"; @SerializedName(SERIALIZED_NAME_IS_FRIEND) + @javax.annotation.Nonnull private Boolean isFriend; public static final String SERIALIZED_NAME_LAST_ACTIVITY = "last_activity"; @SerializedName(SERIALIZED_NAME_LAST_ACTIVITY) + @javax.annotation.Nonnull private String lastActivity; public static final String SERIALIZED_NAME_LAST_LOGIN = "last_login"; @SerializedName(SERIALIZED_NAME_LAST_LOGIN) + @javax.annotation.Nonnull private String lastLogin; public static final String SERIALIZED_NAME_LAST_MOBILE = "last_mobile"; @SerializedName(SERIALIZED_NAME_LAST_MOBILE) + @javax.annotation.Nullable private String lastMobile; public static final String SERIALIZED_NAME_LAST_PLATFORM = "last_platform"; @SerializedName(SERIALIZED_NAME_LAST_PLATFORM) + @javax.annotation.Nonnull private String lastPlatform; public static final String SERIALIZED_NAME_LOCATION = "location"; @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable private String location; + public static final String SERIALIZED_NAME_NAMEPLATE_EFFECT = "nameplateEffect"; + @SerializedName(SERIALIZED_NAME_NAMEPLATE_EFFECT) + @javax.annotation.Nullable + private String nameplateEffect; + public static final String SERIALIZED_NAME_NOTE = "note"; @SerializedName(SERIALIZED_NAME_NOTE) + @javax.annotation.Nullable private String note; public static final String SERIALIZED_NAME_PLATFORM = "platform"; @SerializedName(SERIALIZED_NAME_PLATFORM) + @javax.annotation.Nullable private String platform; + public static final String SERIALIZED_NAME_PROFILE_EFFECT = "profileEffect"; + @SerializedName(SERIALIZED_NAME_PROFILE_EFFECT) + @javax.annotation.Nullable + private String profileEffect; + public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE = "profilePicOverride"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE) + @javax.annotation.Nonnull private String profilePicOverride; public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE_THUMBNAIL = "profilePicOverrideThumbnail"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE_THUMBNAIL) + @javax.annotation.Nonnull private String profilePicOverrideThumbnail; public static final String SERIALIZED_NAME_PRONOUNS = "pronouns"; @SerializedName(SERIALIZED_NAME_PRONOUNS) + @javax.annotation.Nonnull private String pronouns; public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nonnull private UserState state = UserState.OFFLINE; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private UserStatus status = UserStatus.OFFLINE; public static final String SERIALIZED_NAME_STATUS_DESCRIPTION = "statusDescription"; @SerializedName(SERIALIZED_NAME_STATUS_DESCRIPTION) + @javax.annotation.Nonnull private String statusDescription; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_TRAVELING_TO_INSTANCE = "travelingToInstance"; @SerializedName(SERIALIZED_NAME_TRAVELING_TO_INSTANCE) + @javax.annotation.Nullable private String travelingToInstance; public static final String SERIALIZED_NAME_TRAVELING_TO_LOCATION = "travelingToLocation"; @SerializedName(SERIALIZED_NAME_TRAVELING_TO_LOCATION) + @javax.annotation.Nullable private String travelingToLocation; public static final String SERIALIZED_NAME_TRAVELING_TO_WORLD = "travelingToWorld"; @SerializedName(SERIALIZED_NAME_TRAVELING_TO_WORLD) + @javax.annotation.Nullable private String travelingToWorld; public static final String SERIALIZED_NAME_USER_ICON = "userIcon"; @SerializedName(SERIALIZED_NAME_USER_ICON) + @javax.annotation.Nonnull private String userIcon; public static final String SERIALIZED_NAME_USERNAME = "username"; + @Deprecated @SerializedName(SERIALIZED_NAME_USERNAME) + @javax.annotation.Nullable private String username; public static final String SERIALIZED_NAME_WORLD_ID = "worldId"; @SerializedName(SERIALIZED_NAME_WORLD_ID) + @javax.annotation.Nullable private String worldId; public User() { } - public User ageVerificationStatus(AgeVerificationStatus ageVerificationStatus) { - + public User ageVerificationStatus(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { this.ageVerificationStatus = ageVerificationStatus; return this; } - /** + /** * Get ageVerificationStatus * @return ageVerificationStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public AgeVerificationStatus getAgeVerificationStatus() { return ageVerificationStatus; } - - public void setAgeVerificationStatus(AgeVerificationStatus ageVerificationStatus) { + public void setAgeVerificationStatus(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { this.ageVerificationStatus = ageVerificationStatus; } - public User ageVerified(Boolean ageVerified) { - + public User ageVerified(@javax.annotation.Nonnull Boolean ageVerified) { this.ageVerified = ageVerified; return this; } - /** + /** * `true` if, user is age verified (not 18+). * @return ageVerified - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "`true` if, user is age verified (not 18+).") - public Boolean getAgeVerified() { return ageVerified; } - - public void setAgeVerified(Boolean ageVerified) { + public void setAgeVerified(@javax.annotation.Nonnull Boolean ageVerified) { this.ageVerified = ageVerified; } - public User allowAvatarCopying(Boolean allowAvatarCopying) { - + public User allowAvatarCopying(@javax.annotation.Nonnull Boolean allowAvatarCopying) { this.allowAvatarCopying = allowAvatarCopying; return this; } - /** + /** * Get allowAvatarCopying * @return allowAvatarCopying - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getAllowAvatarCopying() { return allowAvatarCopying; } - - public void setAllowAvatarCopying(Boolean allowAvatarCopying) { + public void setAllowAvatarCopying(@javax.annotation.Nonnull Boolean allowAvatarCopying) { this.allowAvatarCopying = allowAvatarCopying; } - public User badges(List badges) { - + public User badges(@javax.annotation.Nullable List badges) { this.badges = badges; return this; } @@ -292,795 +352,804 @@ public User addBadgesItem(Badge badgesItem) { return this; } - /** + /** * * @return badges - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = " ") - public List getBadges() { return badges; } - - public void setBadges(List badges) { + public void setBadges(@javax.annotation.Nullable List badges) { this.badges = badges; } - public User bio(String bio) { - + public User bannerType(@javax.annotation.Nullable String bannerType) { + this.bannerType = bannerType; + return this; + } + + /** + * Get bannerType + * @return bannerType + */ + @javax.annotation.Nullable + public String getBannerType() { + return bannerType; + } + + public void setBannerType(@javax.annotation.Nullable String bannerType) { + this.bannerType = bannerType; + } + + + public User bannerUrl(@javax.annotation.Nullable String bannerUrl) { + this.bannerUrl = bannerUrl; + return this; + } + + /** + * Get bannerUrl + * @return bannerUrl + */ + @javax.annotation.Nullable + public String getBannerUrl() { + return bannerUrl; + } + + public void setBannerUrl(@javax.annotation.Nullable String bannerUrl) { + this.bannerUrl = bannerUrl; + } + + + public User bio(@javax.annotation.Nonnull String bio) { this.bio = bio; return this; } - /** + /** * Get bio * @return bio - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getBio() { return bio; } - - public void setBio(String bio) { + public void setBio(@javax.annotation.Nonnull String bio) { this.bio = bio; } - public User bioLinks(List bioLinks) { - + public User bioLinks(@javax.annotation.Nonnull List bioLinks) { this.bioLinks = bioLinks; return this; } public User addBioLinksItem(String bioLinksItem) { + if (this.bioLinks == null) { + this.bioLinks = new ArrayList<>(); + } this.bioLinks.add(bioLinksItem); return this; } - /** + /** * Get bioLinks * @return bioLinks - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getBioLinks() { return bioLinks; } - - public void setBioLinks(List bioLinks) { + public void setBioLinks(@javax.annotation.Nonnull List bioLinks) { this.bioLinks = bioLinks; } - public User currentAvatarImageUrl(String currentAvatarImageUrl) { - + public User currentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/file/file_ae46d521-7281-4b38-b365-804b32a1d6a7/1/file", required = true, value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarImageUrl() { return currentAvatarImageUrl; } - - public void setCurrentAvatarImageUrl(String currentAvatarImageUrl) { + public void setCurrentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { this.currentAvatarImageUrl = currentAvatarImageUrl; } - public User currentAvatarTags(List currentAvatarTags) { - + public User currentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; return this; } public User addCurrentAvatarTagsItem(String currentAvatarTagsItem) { + if (this.currentAvatarTags == null) { + this.currentAvatarTags = new ArrayList<>(); + } this.currentAvatarTags.add(currentAvatarTagsItem); return this; } - /** + /** * Get currentAvatarTags * @return currentAvatarTags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getCurrentAvatarTags() { return currentAvatarTags; } - - public void setCurrentAvatarTags(List currentAvatarTags) { + public void setCurrentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; } - public User currentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { - + public User currentAvatarThumbnailImageUrl(@javax.annotation.Nonnull String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarThumbnailImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/image/file_aae83ed9-d42d-4d72-9f4b-9f1e41ed17e1/1/256", required = true, value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarThumbnailImageUrl() { return currentAvatarThumbnailImageUrl; } - - public void setCurrentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nonnull String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; } - public User dateJoined(LocalDate dateJoined) { - + public User dateJoined(@javax.annotation.Nonnull LocalDate dateJoined) { this.dateJoined = dateJoined; return this; } - /** + /** * Get dateJoined * @return dateJoined - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public LocalDate getDateJoined() { return dateJoined; } - - public void setDateJoined(LocalDate dateJoined) { + public void setDateJoined(@javax.annotation.Nonnull LocalDate dateJoined) { this.dateJoined = dateJoined; } - public User developerType(DeveloperType developerType) { - + public User developerType(@javax.annotation.Nonnull DeveloperType developerType) { this.developerType = developerType; return this; } - /** + /** * Get developerType * @return developerType - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public DeveloperType getDeveloperType() { return developerType; } - - public void setDeveloperType(DeveloperType developerType) { + public void setDeveloperType(@javax.annotation.Nonnull DeveloperType developerType) { this.developerType = developerType; } - public User displayName(String displayName) { - + public User displayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; return this; } - /** + /** * A users visual display name. This is what shows up in-game, and can different from their `username`. Changing display name is restricted to a cooldown period. * @return displayName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "A users visual display name. This is what shows up in-game, and can different from their `username`. Changing display name is restricted to a cooldown period.") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nonnull String displayName) { this.displayName = displayName; } - public User friendKey(String friendKey) { - + public User friendKey(@javax.annotation.Nonnull String friendKey) { this.friendKey = friendKey; return this; } - /** + /** * Get friendKey * @return friendKey - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getFriendKey() { return friendKey; } - - public void setFriendKey(String friendKey) { + public void setFriendKey(@javax.annotation.Nonnull String friendKey) { this.friendKey = friendKey; } - public User friendRequestStatus(String friendRequestStatus) { - + public User friendRequestStatus(@javax.annotation.Nullable String friendRequestStatus) { this.friendRequestStatus = friendRequestStatus; return this; } - /** + /** * Get friendRequestStatus * @return friendRequestStatus - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getFriendRequestStatus() { return friendRequestStatus; } - - public void setFriendRequestStatus(String friendRequestStatus) { + public void setFriendRequestStatus(@javax.annotation.Nullable String friendRequestStatus) { this.friendRequestStatus = friendRequestStatus; } - public User id(String id) { - + public User iconFrame(@javax.annotation.Nullable String iconFrame) { + this.iconFrame = iconFrame; + return this; + } + + /** + * Get iconFrame + * @return iconFrame + */ + @javax.annotation.Nullable + public String getIconFrame() { + return iconFrame; + } + + public void setIconFrame(@javax.annotation.Nullable String iconFrame) { + this.iconFrame = iconFrame; + } + + + public User iconUrl(@javax.annotation.Nullable String iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + * Get iconUrl + * @return iconUrl + */ + @javax.annotation.Nullable + public String getIconUrl() { + return iconUrl; + } + + public void setIconUrl(@javax.annotation.Nullable String iconUrl) { + this.iconUrl = iconUrl; + } + + + public User id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public User instanceId(String instanceId) { - + public User instanceId(@javax.annotation.Nullable String instanceId) { this.instanceId = instanceId; return this; } - /** + /** * InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. * @return instanceId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)", value = "InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance.") - public String getInstanceId() { return instanceId; } - - public void setInstanceId(String instanceId) { + public void setInstanceId(@javax.annotation.Nullable String instanceId) { this.instanceId = instanceId; } - public User isFriend(Boolean isFriend) { - + public User isEconomyCreator(@javax.annotation.Nullable Boolean isEconomyCreator) { + this.isEconomyCreator = isEconomyCreator; + return this; + } + + /** + * Get isEconomyCreator + * @return isEconomyCreator + */ + @javax.annotation.Nullable + public Boolean getIsEconomyCreator() { + return isEconomyCreator; + } + + public void setIsEconomyCreator(@javax.annotation.Nullable Boolean isEconomyCreator) { + this.isEconomyCreator = isEconomyCreator; + } + + + public User isFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; return this; } - /** + /** * Either their `friendKey`, or empty string if you are not friends. Unknown usage. * @return isFriend - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Either their `friendKey`, or empty string if you are not friends. Unknown usage.") - public Boolean getIsFriend() { return isFriend; } - - public void setIsFriend(Boolean isFriend) { + public void setIsFriend(@javax.annotation.Nonnull Boolean isFriend) { this.isFriend = isFriend; } - public User lastActivity(String lastActivity) { - + public User lastActivity(@javax.annotation.Nonnull String lastActivity) { this.lastActivity = lastActivity; return this; } - /** + /** * Either a date-time or empty string. * @return lastActivity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Either a date-time or empty string.") - public String getLastActivity() { return lastActivity; } - - public void setLastActivity(String lastActivity) { + public void setLastActivity(@javax.annotation.Nonnull String lastActivity) { this.lastActivity = lastActivity; } - public User lastLogin(String lastLogin) { - + public User lastLogin(@javax.annotation.Nonnull String lastLogin) { this.lastLogin = lastLogin; return this; } - /** + /** * Either a date-time or empty string. * @return lastLogin - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Either a date-time or empty string.") - public String getLastLogin() { return lastLogin; } - - public void setLastLogin(String lastLogin) { + public void setLastLogin(@javax.annotation.Nonnull String lastLogin) { this.lastLogin = lastLogin; } - public User lastMobile(String lastMobile) { - + public User lastMobile(@javax.annotation.Nullable String lastMobile) { this.lastMobile = lastMobile; return this; } - /** + /** * Get lastMobile * @return lastMobile - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getLastMobile() { return lastMobile; } - - public void setLastMobile(String lastMobile) { + public void setLastMobile(@javax.annotation.Nullable String lastMobile) { this.lastMobile = lastMobile; } - public User lastPlatform(String lastPlatform) { - + public User lastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; return this; } - /** + /** * This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. * @return lastPlatform - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "standalonewindows", required = true, value = "This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.") - public String getLastPlatform() { return lastPlatform; } - - public void setLastPlatform(String lastPlatform) { + public void setLastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; } - public User location(String location) { - + public User location(@javax.annotation.Nullable String location) { this.location = location; return this; } - /** + /** * Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list. * @return location - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd:12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2)", value = "Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list.") - public String getLocation() { return location; } - - public void setLocation(String location) { + public void setLocation(@javax.annotation.Nullable String location) { this.location = location; } - public User note(String note) { - + public User nameplateEffect(@javax.annotation.Nullable String nameplateEffect) { + this.nameplateEffect = nameplateEffect; + return this; + } + + /** + * Get nameplateEffect + * @return nameplateEffect + */ + @javax.annotation.Nullable + public String getNameplateEffect() { + return nameplateEffect; + } + + public void setNameplateEffect(@javax.annotation.Nullable String nameplateEffect) { + this.nameplateEffect = nameplateEffect; + } + + + public User note(@javax.annotation.Nullable String note) { this.note = note; return this; } - /** + /** * Get note * @return note - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getNote() { return note; } - - public void setNote(String note) { + public void setNote(@javax.annotation.Nullable String note) { this.note = note; } - public User platform(String platform) { - + public User platform(@javax.annotation.Nullable String platform) { this.platform = platform; return this; } - /** + /** * Get platform * @return platform - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPlatform() { return platform; } - - public void setPlatform(String platform) { + public void setPlatform(@javax.annotation.Nullable String platform) { this.platform = platform; } - public User profilePicOverride(String profilePicOverride) { - + public User profileEffect(@javax.annotation.Nullable String profileEffect) { + this.profileEffect = profileEffect; + return this; + } + + /** + * Get profileEffect + * @return profileEffect + */ + @javax.annotation.Nullable + public String getProfileEffect() { + return profileEffect; + } + + public void setProfileEffect(@javax.annotation.Nullable String profileEffect) { + this.profileEffect = profileEffect; + } + + + public User profilePicOverride(@javax.annotation.Nonnull String profilePicOverride) { this.profilePicOverride = profilePicOverride; return this; } - /** + /** * Get profilePicOverride * @return profilePicOverride - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getProfilePicOverride() { return profilePicOverride; } - - public void setProfilePicOverride(String profilePicOverride) { + public void setProfilePicOverride(@javax.annotation.Nonnull String profilePicOverride) { this.profilePicOverride = profilePicOverride; } - public User profilePicOverrideThumbnail(String profilePicOverrideThumbnail) { - + public User profilePicOverrideThumbnail(@javax.annotation.Nonnull String profilePicOverrideThumbnail) { this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; return this; } - /** + /** * Get profilePicOverrideThumbnail * @return profilePicOverrideThumbnail - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getProfilePicOverrideThumbnail() { return profilePicOverrideThumbnail; } - - public void setProfilePicOverrideThumbnail(String profilePicOverrideThumbnail) { + public void setProfilePicOverrideThumbnail(@javax.annotation.Nonnull String profilePicOverrideThumbnail) { this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; } - public User pronouns(String pronouns) { - + public User pronouns(@javax.annotation.Nonnull String pronouns) { this.pronouns = pronouns; return this; } - /** + /** * Get pronouns * @return pronouns - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getPronouns() { return pronouns; } - - public void setPronouns(String pronouns) { + public void setPronouns(@javax.annotation.Nonnull String pronouns) { this.pronouns = pronouns; } - public User state(UserState state) { - + public User state(@javax.annotation.Nonnull UserState state) { this.state = state; return this; } - /** + /** * Get state * @return state - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public UserState getState() { return state; } - - public void setState(UserState state) { + public void setState(@javax.annotation.Nonnull UserState state) { this.state = state; } - public User status(UserStatus status) { - + public User status(@javax.annotation.Nonnull UserStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public UserStatus getStatus() { return status; } - - public void setStatus(UserStatus status) { + public void setStatus(@javax.annotation.Nonnull UserStatus status) { this.status = status; } - public User statusDescription(String statusDescription) { - + public User statusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; return this; } - /** + /** * Get statusDescription * @return statusDescription - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getStatusDescription() { return statusDescription; } - - public void setStatusDescription(String statusDescription) { + public void setStatusDescription(@javax.annotation.Nonnull String statusDescription) { this.statusDescription = statusDescription; } - public User tags(List tags) { - + public User tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public User addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public User travelingToInstance(String travelingToInstance) { - + public User travelingToInstance(@javax.annotation.Nullable String travelingToInstance) { this.travelingToInstance = travelingToInstance; return this; } - /** + /** * Get travelingToInstance * @return travelingToInstance - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getTravelingToInstance() { return travelingToInstance; } - - public void setTravelingToInstance(String travelingToInstance) { + public void setTravelingToInstance(@javax.annotation.Nullable String travelingToInstance) { this.travelingToInstance = travelingToInstance; } - public User travelingToLocation(String travelingToLocation) { - + public User travelingToLocation(@javax.annotation.Nullable String travelingToLocation) { this.travelingToLocation = travelingToLocation; return this; } - /** + /** * Get travelingToLocation * @return travelingToLocation - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getTravelingToLocation() { return travelingToLocation; } - - public void setTravelingToLocation(String travelingToLocation) { + public void setTravelingToLocation(@javax.annotation.Nullable String travelingToLocation) { this.travelingToLocation = travelingToLocation; } - public User travelingToWorld(String travelingToWorld) { - + public User travelingToWorld(@javax.annotation.Nullable String travelingToWorld) { this.travelingToWorld = travelingToWorld; return this; } - /** + /** * Get travelingToWorld * @return travelingToWorld - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getTravelingToWorld() { return travelingToWorld; } - - public void setTravelingToWorld(String travelingToWorld) { + public void setTravelingToWorld(@javax.annotation.Nullable String travelingToWorld) { this.travelingToWorld = travelingToWorld; } - public User userIcon(String userIcon) { - + public User userIcon(@javax.annotation.Nonnull String userIcon) { this.userIcon = userIcon; return this; } - /** + /** * Get userIcon * @return userIcon - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getUserIcon() { return userIcon; } - - public void setUserIcon(String userIcon) { + public void setUserIcon(@javax.annotation.Nonnull String userIcon) { this.userIcon = userIcon; } - public User username(String username) { - + @Deprecated + public User username(@javax.annotation.Nullable String username) { this.username = username; return this; } - /** + /** * -| A users unique name, used during login. This is different from `displayName` which is what shows up in-game. A users `username` can never be changed.' **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). * @return username * @deprecated - **/ + */ @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "-| A users unique name, used during login. This is different from `displayName` which is what shows up in-game. A users `username` can never be changed.' **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).") - public String getUsername() { return username; } - - public void setUsername(String username) { + @Deprecated + public void setUsername(@javax.annotation.Nullable String username) { this.username = username; } - public User worldId(String worldId) { - + public User worldId(@javax.annotation.Nullable String worldId) { this.worldId = worldId; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return worldId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getWorldId() { return worldId; } - - public void setWorldId(String worldId) { + public void setWorldId(@javax.annotation.Nullable String worldId) { this.worldId = worldId; } @@ -1099,6 +1168,8 @@ public boolean equals(Object o) { Objects.equals(this.ageVerified, user.ageVerified) && Objects.equals(this.allowAvatarCopying, user.allowAvatarCopying) && Objects.equals(this.badges, user.badges) && + Objects.equals(this.bannerType, user.bannerType) && + Objects.equals(this.bannerUrl, user.bannerUrl) && Objects.equals(this.bio, user.bio) && Objects.equals(this.bioLinks, user.bioLinks) && Objects.equals(this.currentAvatarImageUrl, user.currentAvatarImageUrl) && @@ -1109,16 +1180,21 @@ public boolean equals(Object o) { Objects.equals(this.displayName, user.displayName) && Objects.equals(this.friendKey, user.friendKey) && Objects.equals(this.friendRequestStatus, user.friendRequestStatus) && + Objects.equals(this.iconFrame, user.iconFrame) && + Objects.equals(this.iconUrl, user.iconUrl) && Objects.equals(this.id, user.id) && Objects.equals(this.instanceId, user.instanceId) && + Objects.equals(this.isEconomyCreator, user.isEconomyCreator) && Objects.equals(this.isFriend, user.isFriend) && Objects.equals(this.lastActivity, user.lastActivity) && Objects.equals(this.lastLogin, user.lastLogin) && Objects.equals(this.lastMobile, user.lastMobile) && Objects.equals(this.lastPlatform, user.lastPlatform) && Objects.equals(this.location, user.location) && + Objects.equals(this.nameplateEffect, user.nameplateEffect) && Objects.equals(this.note, user.note) && Objects.equals(this.platform, user.platform) && + Objects.equals(this.profileEffect, user.profileEffect) && Objects.equals(this.profilePicOverride, user.profilePicOverride) && Objects.equals(this.profilePicOverrideThumbnail, user.profilePicOverrideThumbnail) && Objects.equals(this.pronouns, user.pronouns) && @@ -1140,7 +1216,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ageVerificationStatus, ageVerified, allowAvatarCopying, badges, bio, bioLinks, currentAvatarImageUrl, currentAvatarTags, currentAvatarThumbnailImageUrl, dateJoined, developerType, displayName, friendKey, friendRequestStatus, id, instanceId, isFriend, lastActivity, lastLogin, lastMobile, lastPlatform, location, note, platform, profilePicOverride, profilePicOverrideThumbnail, pronouns, state, status, statusDescription, tags, travelingToInstance, travelingToLocation, travelingToWorld, userIcon, username, worldId); + return Objects.hash(ageVerificationStatus, ageVerified, allowAvatarCopying, badges, bannerType, bannerUrl, bio, bioLinks, currentAvatarImageUrl, currentAvatarTags, currentAvatarThumbnailImageUrl, dateJoined, developerType, displayName, friendKey, friendRequestStatus, iconFrame, iconUrl, id, instanceId, isEconomyCreator, isFriend, lastActivity, lastLogin, lastMobile, lastPlatform, location, nameplateEffect, note, platform, profileEffect, profilePicOverride, profilePicOverrideThumbnail, pronouns, state, status, statusDescription, tags, travelingToInstance, travelingToLocation, travelingToWorld, userIcon, username, worldId); } private static int hashCodeNullable(JsonNullable a) { @@ -1158,6 +1234,8 @@ public String toString() { sb.append(" ageVerified: ").append(toIndentedString(ageVerified)).append("\n"); sb.append(" allowAvatarCopying: ").append(toIndentedString(allowAvatarCopying)).append("\n"); sb.append(" badges: ").append(toIndentedString(badges)).append("\n"); + sb.append(" bannerType: ").append(toIndentedString(bannerType)).append("\n"); + sb.append(" bannerUrl: ").append(toIndentedString(bannerUrl)).append("\n"); sb.append(" bio: ").append(toIndentedString(bio)).append("\n"); sb.append(" bioLinks: ").append(toIndentedString(bioLinks)).append("\n"); sb.append(" currentAvatarImageUrl: ").append(toIndentedString(currentAvatarImageUrl)).append("\n"); @@ -1168,16 +1246,21 @@ public String toString() { sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" friendKey: ").append(toIndentedString(friendKey)).append("\n"); sb.append(" friendRequestStatus: ").append(toIndentedString(friendRequestStatus)).append("\n"); + sb.append(" iconFrame: ").append(toIndentedString(iconFrame)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" instanceId: ").append(toIndentedString(instanceId)).append("\n"); + sb.append(" isEconomyCreator: ").append(toIndentedString(isEconomyCreator)).append("\n"); sb.append(" isFriend: ").append(toIndentedString(isFriend)).append("\n"); sb.append(" lastActivity: ").append(toIndentedString(lastActivity)).append("\n"); sb.append(" lastLogin: ").append(toIndentedString(lastLogin)).append("\n"); sb.append(" lastMobile: ").append(toIndentedString(lastMobile)).append("\n"); sb.append(" lastPlatform: ").append(toIndentedString(lastPlatform)).append("\n"); sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" nameplateEffect: ").append(toIndentedString(nameplateEffect)).append("\n"); sb.append(" note: ").append(toIndentedString(note)).append("\n"); sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" profileEffect: ").append(toIndentedString(profileEffect)).append("\n"); sb.append(" profilePicOverride: ").append(toIndentedString(profilePicOverride)).append("\n"); sb.append(" profilePicOverrideThumbnail: ").append(toIndentedString(profilePicOverrideThumbnail)).append("\n"); sb.append(" pronouns: ").append(toIndentedString(pronouns)).append("\n"); @@ -1200,10 +1283,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -1212,207 +1292,172 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ageVerificationStatus"); - openapiFields.add("ageVerified"); - openapiFields.add("allowAvatarCopying"); - openapiFields.add("badges"); - openapiFields.add("bio"); - openapiFields.add("bioLinks"); - openapiFields.add("currentAvatarImageUrl"); - openapiFields.add("currentAvatarTags"); - openapiFields.add("currentAvatarThumbnailImageUrl"); - openapiFields.add("date_joined"); - openapiFields.add("developerType"); - openapiFields.add("displayName"); - openapiFields.add("friendKey"); - openapiFields.add("friendRequestStatus"); - openapiFields.add("id"); - openapiFields.add("instanceId"); - openapiFields.add("isFriend"); - openapiFields.add("last_activity"); - openapiFields.add("last_login"); - openapiFields.add("last_mobile"); - openapiFields.add("last_platform"); - openapiFields.add("location"); - openapiFields.add("note"); - openapiFields.add("platform"); - openapiFields.add("profilePicOverride"); - openapiFields.add("profilePicOverrideThumbnail"); - openapiFields.add("pronouns"); - openapiFields.add("state"); - openapiFields.add("status"); - openapiFields.add("statusDescription"); - openapiFields.add("tags"); - openapiFields.add("travelingToInstance"); - openapiFields.add("travelingToLocation"); - openapiFields.add("travelingToWorld"); - openapiFields.add("userIcon"); - openapiFields.add("username"); - openapiFields.add("worldId"); + openapiFields = new HashSet(Arrays.asList("ageVerificationStatus", "ageVerified", "allowAvatarCopying", "badges", "bannerType", "bannerUrl", "bio", "bioLinks", "currentAvatarImageUrl", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "date_joined", "developerType", "displayName", "friendKey", "friendRequestStatus", "iconFrame", "iconUrl", "id", "instanceId", "isEconomyCreator", "isFriend", "last_activity", "last_login", "last_mobile", "last_platform", "location", "nameplateEffect", "note", "platform", "profileEffect", "profilePicOverride", "profilePicOverrideThumbnail", "pronouns", "state", "status", "statusDescription", "tags", "travelingToInstance", "travelingToLocation", "travelingToWorld", "userIcon", "username", "worldId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ageVerificationStatus"); - openapiRequiredFields.add("ageVerified"); - openapiRequiredFields.add("allowAvatarCopying"); - openapiRequiredFields.add("bio"); - openapiRequiredFields.add("bioLinks"); - openapiRequiredFields.add("currentAvatarImageUrl"); - openapiRequiredFields.add("currentAvatarTags"); - openapiRequiredFields.add("currentAvatarThumbnailImageUrl"); - openapiRequiredFields.add("date_joined"); - openapiRequiredFields.add("developerType"); - openapiRequiredFields.add("displayName"); - openapiRequiredFields.add("friendKey"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("isFriend"); - openapiRequiredFields.add("last_activity"); - openapiRequiredFields.add("last_login"); - openapiRequiredFields.add("last_platform"); - openapiRequiredFields.add("profilePicOverride"); - openapiRequiredFields.add("profilePicOverrideThumbnail"); - openapiRequiredFields.add("pronouns"); - openapiRequiredFields.add("state"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("statusDescription"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("userIcon"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to User - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!User.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in User is not found in the empty JSON string", User.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("ageVerificationStatus", "ageVerified", "allowAvatarCopying", "bio", "bioLinks", "currentAvatarImageUrl", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "date_joined", "developerType", "displayName", "friendKey", "id", "isFriend", "last_activity", "last_login", "last_platform", "profilePicOverride", "profilePicOverrideThumbnail", "pronouns", "state", "status", "statusDescription", "tags", "userIcon")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to User + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!User.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in User is not found in the empty JSON string", User.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!User.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `User` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `User` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : User.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `ageVerificationStatus` + AgeVerificationStatus.validateJsonElement(jsonObj.get("ageVerificationStatus")); if (jsonObj.get("badges") != null && !jsonObj.get("badges").isJsonNull()) { JsonArray jsonArraybadges = jsonObj.getAsJsonArray("badges"); if (jsonArraybadges != null) { // ensure the json data is an array if (!jsonObj.get("badges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `badges` to be an array in the JSON string but got `%s`", jsonObj.get("badges").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `badges` to be an array in the JSON string but got `%s`", jsonObj.get("badges").toString())); } // validate the optional field `badges` (array) for (int i = 0; i < jsonArraybadges.size(); i++) { - Badge.validateJsonObject(jsonArraybadges.get(i).getAsJsonObject()); + Badge.validateJsonElement(jsonArraybadges.get(i)); }; } } + if ((jsonObj.get("bannerType") != null && !jsonObj.get("bannerType").isJsonNull()) && !jsonObj.get("bannerType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerType").toString())); + } + if ((jsonObj.get("bannerUrl") != null && !jsonObj.get("bannerUrl").isJsonNull()) && !jsonObj.get("bannerUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bannerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bannerUrl").toString())); + } if (!jsonObj.get("bio").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bio` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bio").toString())); } // ensure the required json array is present if (jsonObj.get("bioLinks") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("bioLinks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bioLinks` to be an array in the JSON string but got `%s`", jsonObj.get("bioLinks").toString())); } if (!jsonObj.get("currentAvatarImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarImageUrl").toString())); } // ensure the required json array is present if (jsonObj.get("currentAvatarTags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("currentAvatarTags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); } if (!jsonObj.get("currentAvatarThumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); } + // validate the required field `developerType` + DeveloperType.validateJsonElement(jsonObj.get("developerType")); if (!jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if (!jsonObj.get("friendKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `friendKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friendKey").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `friendKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friendKey").toString())); } if ((jsonObj.get("friendRequestStatus") != null && !jsonObj.get("friendRequestStatus").isJsonNull()) && !jsonObj.get("friendRequestStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `friendRequestStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friendRequestStatus").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `friendRequestStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friendRequestStatus").toString())); + } + if ((jsonObj.get("iconFrame") != null && !jsonObj.get("iconFrame").isJsonNull()) && !jsonObj.get("iconFrame").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconFrame` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconFrame").toString())); + } + if ((jsonObj.get("iconUrl") != null && !jsonObj.get("iconUrl").isJsonNull()) && !jsonObj.get("iconUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `iconUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iconUrl").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("instanceId") != null && !jsonObj.get("instanceId").isJsonNull()) && !jsonObj.get("instanceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `instanceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `instanceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceId").toString())); } if (!jsonObj.get("last_activity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_activity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_activity").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_activity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_activity").toString())); } if (!jsonObj.get("last_login").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_login` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_login").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_login` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_login").toString())); } if ((jsonObj.get("last_mobile") != null && !jsonObj.get("last_mobile").isJsonNull()) && !jsonObj.get("last_mobile").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_mobile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_mobile").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_mobile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_mobile").toString())); } if (!jsonObj.get("last_platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `last_platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_platform").toString())); } if ((jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) && !jsonObj.get("location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); + } + if ((jsonObj.get("nameplateEffect") != null && !jsonObj.get("nameplateEffect").isJsonNull()) && !jsonObj.get("nameplateEffect").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `nameplateEffect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nameplateEffect").toString())); } if ((jsonObj.get("note") != null && !jsonObj.get("note").isJsonNull()) && !jsonObj.get("note").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); } if ((jsonObj.get("platform") != null && !jsonObj.get("platform").isJsonNull()) && !jsonObj.get("platform").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + } + if ((jsonObj.get("profileEffect") != null && !jsonObj.get("profileEffect").isJsonNull()) && !jsonObj.get("profileEffect").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profileEffect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profileEffect").toString())); } if (!jsonObj.get("profilePicOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); } if (!jsonObj.get("profilePicOverrideThumbnail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverrideThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverrideThumbnail").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverrideThumbnail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverrideThumbnail").toString())); } if (!jsonObj.get("pronouns").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `pronouns` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronouns").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `pronouns` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pronouns").toString())); } + // validate the required field `state` + UserState.validateJsonElement(jsonObj.get("state")); + // validate the required field `status` + UserStatus.validateJsonElement(jsonObj.get("status")); if (!jsonObj.get("statusDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `statusDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusDescription").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if ((jsonObj.get("travelingToInstance") != null && !jsonObj.get("travelingToInstance").isJsonNull()) && !jsonObj.get("travelingToInstance").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `travelingToInstance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToInstance").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `travelingToInstance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToInstance").toString())); } if ((jsonObj.get("travelingToLocation") != null && !jsonObj.get("travelingToLocation").isJsonNull()) && !jsonObj.get("travelingToLocation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `travelingToLocation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToLocation").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `travelingToLocation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToLocation").toString())); } if ((jsonObj.get("travelingToWorld") != null && !jsonObj.get("travelingToWorld").isJsonNull()) && !jsonObj.get("travelingToWorld").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `travelingToWorld` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToWorld").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `travelingToWorld` to be a primitive type in the JSON string but got `%s`", jsonObj.get("travelingToWorld").toString())); } if (!jsonObj.get("userIcon").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("worldId") != null && !jsonObj.get("worldId").isJsonNull()) && !jsonObj.get("worldId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `worldId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldId").toString())); } } @@ -1436,31 +1481,31 @@ public void write(JsonWriter out, User value) throws IOException { @Override public User read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of User given an JSON string - * - * @param jsonString JSON string - * @return An instance of User - * @throws IOException if the JSON string is invalid with respect to User - */ + /** + * Create an instance of User given an JSON string + * + * @param jsonString JSON string + * @return An instance of User + * @throws IOException if the JSON string is invalid with respect to User + */ public static User fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, User.class); } - /** - * Convert an instance of User to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of User to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UserCreditsEligible.java b/src/main/java/io/github/vrchatapi/model/UserCreditsEligible.java index 4dd37132..a472a152 100644 --- a/src/main/java/io/github/vrchatapi/model/UserCreditsEligible.java +++ b/src/main/java/io/github/vrchatapi/model/UserCreditsEligible.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * UserCreditsEligible */ -@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 UserCreditsEligible { public static final String SERIALIZED_NAME_ELIGIBLE = "eligible"; @SerializedName(SERIALIZED_NAME_ELIGIBLE) + @javax.annotation.Nonnull private Boolean eligible; public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nullable private String reason; public UserCreditsEligible() { } - public UserCreditsEligible eligible(Boolean eligible) { - + public UserCreditsEligible eligible(@javax.annotation.Nonnull Boolean eligible) { this.eligible = eligible; return this; } - /** + /** * Get eligible * @return eligible - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getEligible() { return eligible; } - - public void setEligible(Boolean eligible) { + public void setEligible(@javax.annotation.Nonnull Boolean eligible) { this.eligible = eligible; } - public UserCreditsEligible reason(String reason) { - + public UserCreditsEligible reason(@javax.annotation.Nullable String reason) { this.reason = reason; return this; } - /** + /** * Get reason * @return reason - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getReason() { return reason; } - - public void setReason(String reason) { + public void setReason(@javax.annotation.Nullable String reason) { this.reason = reason; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,44 +143,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eligible"); - openapiFields.add("reason"); + openapiFields = new HashSet(Arrays.asList("eligible", "reason")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("eligible"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UserCreditsEligible - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UserCreditsEligible.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserCreditsEligible is not found in the empty JSON string", UserCreditsEligible.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("eligible")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserCreditsEligible + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserCreditsEligible.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UserCreditsEligible is not found in the empty JSON string", UserCreditsEligible.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UserCreditsEligible.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserCreditsEligible` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UserCreditsEligible` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UserCreditsEligible.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } } @@ -213,31 +202,31 @@ public void write(JsonWriter out, UserCreditsEligible value) throws IOException @Override public UserCreditsEligible read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UserCreditsEligible given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserCreditsEligible - * @throws IOException if the JSON string is invalid with respect to UserCreditsEligible - */ + /** + * Create an instance of UserCreditsEligible given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserCreditsEligible + * @throws IOException if the JSON string is invalid with respect to UserCreditsEligible + */ public static UserCreditsEligible fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UserCreditsEligible.class); } - /** - * Convert an instance of UserCreditsEligible to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UserCreditsEligible to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UserExists.java b/src/main/java/io/github/vrchatapi/model/UserExists.java index e18e6aa6..ecff544f 100644 --- a/src/main/java/io/github/vrchatapi/model/UserExists.java +++ b/src/main/java/io/github/vrchatapi/model/UserExists.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,62 +47,55 @@ /** * Status object representing if a queried user by username or userId exists or not. This model is primarily used by the `/auth/exists` endpoint, which in turn is used during registration. Please see the documentation on that endpoint for more information on usage. */ -@ApiModel(description = "Status object representing if a queried user by username or userId exists or not. This model is primarily used by the `/auth/exists` endpoint, which in turn is used during registration. Please see the documentation on that endpoint for more information on usage.") -@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 UserExists { public static final String SERIALIZED_NAME_NAME_OK = "nameOk"; @SerializedName(SERIALIZED_NAME_NAME_OK) + @javax.annotation.Nullable private Boolean nameOk = false; public static final String SERIALIZED_NAME_USER_EXISTS = "userExists"; @SerializedName(SERIALIZED_NAME_USER_EXISTS) + @javax.annotation.Nonnull private Boolean userExists = false; public UserExists() { } - public UserExists nameOk(Boolean nameOk) { - + public UserExists nameOk(@javax.annotation.Nullable Boolean nameOk) { this.nameOk = nameOk; return this; } - /** + /** * Is the username valid? * @return nameOk - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Is the username valid?") - public Boolean getNameOk() { return nameOk; } - - public void setNameOk(Boolean nameOk) { + public void setNameOk(@javax.annotation.Nullable Boolean nameOk) { this.nameOk = nameOk; } - public UserExists userExists(Boolean userExists) { - + public UserExists userExists(@javax.annotation.Nonnull Boolean userExists) { this.userExists = userExists; return this; } - /** + /** * Status if a user exist with that username or userId. * @return userExists - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Status if a user exist with that username or userId.") - public Boolean getUserExists() { return userExists; } - - public void setUserExists(Boolean userExists) { + public void setUserExists(@javax.annotation.Nonnull Boolean userExists) { this.userExists = userExists; } @@ -141,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -153,42 +143,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("nameOk"); - openapiFields.add("userExists"); + openapiFields = new HashSet(Arrays.asList("nameOk", "userExists")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("userExists"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UserExists - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UserExists.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserExists is not found in the empty JSON string", UserExists.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("userExists")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserExists + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserExists.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UserExists is not found in the empty JSON string", UserExists.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UserExists.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserExists` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UserExists` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UserExists.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -211,31 +199,31 @@ public void write(JsonWriter out, UserExists value) throws IOException { @Override public UserExists read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UserExists given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserExists - * @throws IOException if the JSON string is invalid with respect to UserExists - */ + /** + * Create an instance of UserExists given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserExists + * @throws IOException if the JSON string is invalid with respect to UserExists + */ public static UserExists fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UserExists.class); } - /** - * Convert an instance of UserExists to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UserExists to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UserNote.java b/src/main/java/io/github/vrchatapi/model/UserNote.java index cfd6707f..438ae06a 100644 --- a/src/main/java/io/github/vrchatapi/model/UserNote.java +++ b/src/main/java/io/github/vrchatapi/model/UserNote.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,17 +13,15 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.UserNoteTargetUser; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -35,13 +33,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -49,169 +49,151 @@ /** * UserNote */ -@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 UserNote { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_NOTE = "note"; @SerializedName(SERIALIZED_NAME_NOTE) + @javax.annotation.Nonnull private String note; public static final String SERIALIZED_NAME_TARGET_USER = "targetUser"; @SerializedName(SERIALIZED_NAME_TARGET_USER) + @javax.annotation.Nullable private UserNoteTargetUser targetUser; public static final String SERIALIZED_NAME_TARGET_USER_ID = "targetUserId"; @SerializedName(SERIALIZED_NAME_TARGET_USER_ID) + @javax.annotation.Nonnull private String targetUserId; public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nonnull private String userId; public UserNote() { } - public UserNote createdAt(OffsetDateTime createdAt) { - + public UserNote createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public UserNote id(String id) { - + public UserNote id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "unt_e9074848-d107-4019-b4aa-bbd19e67660d", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public UserNote note(String note) { - + public UserNote note(@javax.annotation.Nonnull String note) { this.note = note; return this; } - /** + /** * Get note * @return note - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getNote() { return note; } - - public void setNote(String note) { + public void setNote(@javax.annotation.Nonnull String note) { this.note = note; } - public UserNote targetUser(UserNoteTargetUser targetUser) { - + public UserNote targetUser(@javax.annotation.Nullable UserNoteTargetUser targetUser) { this.targetUser = targetUser; return this; } - /** + /** * Get targetUser * @return targetUser - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public UserNoteTargetUser getTargetUser() { return targetUser; } - - public void setTargetUser(UserNoteTargetUser targetUser) { + public void setTargetUser(@javax.annotation.Nullable UserNoteTargetUser targetUser) { this.targetUser = targetUser; } - public UserNote targetUserId(String targetUserId) { - + public UserNote targetUserId(@javax.annotation.Nonnull String targetUserId) { this.targetUserId = targetUserId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return targetUserId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getTargetUserId() { return targetUserId; } - - public void setTargetUserId(String targetUserId) { + public void setTargetUserId(@javax.annotation.Nonnull String targetUserId) { this.targetUserId = targetUserId; } - public UserNote userId(String userId) { - + public UserNote userId(@javax.annotation.Nonnull String userId) { this.userId = userId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return userId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getUserId() { return userId; } - - public void setUserId(String userId) { + public void setUserId(@javax.annotation.Nonnull String userId) { this.userId = userId; } @@ -258,10 +240,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -270,65 +249,55 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("createdAt"); - openapiFields.add("id"); - openapiFields.add("note"); - openapiFields.add("targetUser"); - openapiFields.add("targetUserId"); - openapiFields.add("userId"); + openapiFields = new HashSet(Arrays.asList("createdAt", "id", "note", "targetUser", "targetUserId", "userId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("note"); - openapiRequiredFields.add("targetUserId"); - openapiRequiredFields.add("userId"); + openapiRequiredFields = new HashSet(Arrays.asList("createdAt", "id", "note", "targetUserId", "userId")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UserNote - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UserNote.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserNote is not found in the empty JSON string", UserNote.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserNote + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserNote.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UserNote is not found in the empty JSON string", UserNote.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UserNote.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserNote` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UserNote` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UserNote.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("note").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); } // validate the optional field `targetUser` if (jsonObj.get("targetUser") != null && !jsonObj.get("targetUser").isJsonNull()) { - UserNoteTargetUser.validateJsonObject(jsonObj.getAsJsonObject("targetUser")); + UserNoteTargetUser.validateJsonElement(jsonObj.get("targetUser")); } if (!jsonObj.get("targetUserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `targetUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetUserId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `targetUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetUserId").toString())); } if (!jsonObj.get("userId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); } } @@ -352,31 +321,31 @@ public void write(JsonWriter out, UserNote value) throws IOException { @Override public UserNote read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UserNote given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserNote - * @throws IOException if the JSON string is invalid with respect to UserNote - */ + /** + * Create an instance of UserNote given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserNote + * @throws IOException if the JSON string is invalid with respect to UserNote + */ public static UserNote fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UserNote.class); } - /** - * Convert an instance of UserNote to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UserNote to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UserNoteTargetUser.java b/src/main/java/io/github/vrchatapi/model/UserNoteTargetUser.java index b78b6edb..bc868317 100644 --- a/src/main/java/io/github/vrchatapi/model/UserNoteTargetUser.java +++ b/src/main/java/io/github/vrchatapi/model/UserNoteTargetUser.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,16 +13,14 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -36,13 +34,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -50,60 +50,61 @@ /** * UserNoteTargetUser */ -@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 UserNoteTargetUser { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private String id; public static final String SERIALIZED_NAME_CURRENT_AVATAR_TAGS = "currentAvatarTags"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_TAGS) - private List currentAvatarTags = null; + @javax.annotation.Nullable + private List currentAvatarTags = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL = "currentAvatarThumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nullable private String currentAvatarThumbnailImageUrl; public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + @javax.annotation.Nullable private String displayName; public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE = "profilePicOverride"; @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE) + @javax.annotation.Nullable private String profilePicOverride; public static final String SERIALIZED_NAME_USER_ICON = "userIcon"; @SerializedName(SERIALIZED_NAME_USER_ICON) + @javax.annotation.Nullable private String userIcon; public UserNoteTargetUser() { } - public UserNoteTargetUser id(String id) { - + public UserNoteTargetUser id(@javax.annotation.Nullable String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "unt_e9074848-d107-4019-b4aa-bbd19e67660d", value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public UserNoteTargetUser currentAvatarTags(List currentAvatarTags) { - + public UserNoteTargetUser currentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; return this; } @@ -116,111 +117,92 @@ public UserNoteTargetUser addCurrentAvatarTagsItem(String currentAvatarTagsItem) return this; } - /** + /** * Get currentAvatarTags * @return currentAvatarTags - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getCurrentAvatarTags() { return currentAvatarTags; } - - public void setCurrentAvatarTags(List currentAvatarTags) { + public void setCurrentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { this.currentAvatarTags = currentAvatarTags; } - public UserNoteTargetUser currentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { - + public UserNoteTargetUser currentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; return this; } - /** + /** * When profilePicOverride is not empty, use it instead. * @return currentAvatarThumbnailImageUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "https://api.vrchat.cloud/api/1/image/file_aae83ed9-d42d-4d72-9f4b-9f1e41ed17e1/1/256", value = "When profilePicOverride is not empty, use it instead.") - public String getCurrentAvatarThumbnailImageUrl() { return currentAvatarThumbnailImageUrl; } - - public void setCurrentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; } - public UserNoteTargetUser displayName(String displayName) { - + public UserNoteTargetUser displayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; return this; } - /** + /** * Get displayName * @return displayName - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { + public void setDisplayName(@javax.annotation.Nullable String displayName) { this.displayName = displayName; } - public UserNoteTargetUser profilePicOverride(String profilePicOverride) { - + public UserNoteTargetUser profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; return this; } - /** + /** * Get profilePicOverride * @return profilePicOverride - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getProfilePicOverride() { return profilePicOverride; } - - public void setProfilePicOverride(String profilePicOverride) { + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { this.profilePicOverride = profilePicOverride; } - public UserNoteTargetUser userIcon(String userIcon) { - + public UserNoteTargetUser userIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; return this; } - /** + /** * Get userIcon * @return userIcon - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getUserIcon() { return userIcon; } - - public void setUserIcon(String userIcon) { + public void setUserIcon(@javax.annotation.Nullable String userIcon) { this.userIcon = userIcon; } @@ -278,10 +260,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -290,56 +269,51 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("currentAvatarTags"); - openapiFields.add("currentAvatarThumbnailImageUrl"); - openapiFields.add("displayName"); - openapiFields.add("profilePicOverride"); - openapiFields.add("userIcon"); + openapiFields = new HashSet(Arrays.asList("id", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "displayName", "profilePicOverride", "userIcon")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UserNoteTargetUser - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UserNoteTargetUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserNoteTargetUser is not found in the empty JSON string", UserNoteTargetUser.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserNoteTargetUser + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserNoteTargetUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UserNoteTargetUser is not found in the empty JSON string", UserNoteTargetUser.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UserNoteTargetUser.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserNoteTargetUser` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UserNoteTargetUser` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("currentAvatarTags") != null && !jsonObj.get("currentAvatarTags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); + if (jsonObj.get("currentAvatarTags") != null && !jsonObj.get("currentAvatarTags").isJsonNull() && !jsonObj.get("currentAvatarTags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarTags` to be an array in the JSON string but got `%s`", jsonObj.get("currentAvatarTags").toString())); } if ((jsonObj.get("currentAvatarThumbnailImageUrl") != null && !jsonObj.get("currentAvatarThumbnailImageUrl").isJsonNull()) && !jsonObj.get("currentAvatarThumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `currentAvatarThumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentAvatarThumbnailImageUrl").toString())); } if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("profilePicOverride") != null && !jsonObj.get("profilePicOverride").isJsonNull()) && !jsonObj.get("profilePicOverride").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `profilePicOverride` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profilePicOverride").toString())); } if ((jsonObj.get("userIcon") != null && !jsonObj.get("userIcon").isJsonNull()) && !jsonObj.get("userIcon").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); } } @@ -363,31 +337,31 @@ public void write(JsonWriter out, UserNoteTargetUser value) throws IOException { @Override public UserNoteTargetUser read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UserNoteTargetUser given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserNoteTargetUser - * @throws IOException if the JSON string is invalid with respect to UserNoteTargetUser - */ + /** + * Create an instance of UserNoteTargetUser given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserNoteTargetUser + * @throws IOException if the JSON string is invalid with respect to UserNoteTargetUser + */ public static UserNoteTargetUser fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UserNoteTargetUser.class); } - /** - * Convert an instance of UserNoteTargetUser to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UserNoteTargetUser to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UserState.java b/src/main/java/io/github/vrchatapi/model/UserState.java index fd720607..808186be 100644 --- a/src/main/java/io/github/vrchatapi/model/UserState.java +++ b/src/main/java/io/github/vrchatapi/model/UserState.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -71,5 +70,10 @@ public UserState read(final JsonReader jsonReader) throws IOException { return UserState.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UserState.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/UserStatus.java b/src/main/java/io/github/vrchatapi/model/UserStatus.java index ff77f4ea..f7aa95f4 100644 --- a/src/main/java/io/github/vrchatapi/model/UserStatus.java +++ b/src/main/java/io/github/vrchatapi/model/UserStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,11 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; -import io.swagger.annotations.ApiModel; import com.google.gson.annotations.SerializedName; import java.io.IOException; import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; @@ -75,5 +74,10 @@ public UserStatus read(final JsonReader jsonReader) throws IOException { return UserStatus.fromValue(value); } } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + UserStatus.fromValue(value); + } } diff --git a/src/main/java/io/github/vrchatapi/model/UserSubscription.java b/src/main/java/io/github/vrchatapi/model/UserSubscription.java index df57a7de..4f642b4b 100644 --- a/src/main/java/io/github/vrchatapi/model/UserSubscription.java +++ b/src/main/java/io/github/vrchatapi/model/UserSubscription.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,12 +20,11 @@ import com.google.gson.stream.JsonWriter; import io.github.vrchatapi.model.SubscriptionPeriod; import io.github.vrchatapi.model.TransactionStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -39,13 +37,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -53,472 +53,423 @@ /** * */ -@ApiModel(description = "") -@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 UserSubscription { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) + @javax.annotation.Nonnull private Boolean active = true; public static final String SERIALIZED_NAME_AMOUNT = "amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) + @javax.annotation.Nonnull private BigDecimal amount; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_EXPIRES = "expires"; @SerializedName(SERIALIZED_NAME_EXPIRES) + @javax.annotation.Nonnull private OffsetDateTime expires; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IS_BULK_GIFT = "isBulkGift"; @SerializedName(SERIALIZED_NAME_IS_BULK_GIFT) + @javax.annotation.Nonnull private Boolean isBulkGift = false; public static final String SERIALIZED_NAME_IS_GIFT = "isGift"; @SerializedName(SERIALIZED_NAME_IS_GIFT) + @javax.annotation.Nonnull private Boolean isGift = false; public static final String SERIALIZED_NAME_LICENSE_GROUPS = "licenseGroups"; @SerializedName(SERIALIZED_NAME_LICENSE_GROUPS) + @javax.annotation.Nonnull private List licenseGroups = new ArrayList<>(); public static final String SERIALIZED_NAME_PERIOD = "period"; @SerializedName(SERIALIZED_NAME_PERIOD) + @javax.annotation.Nonnull private SubscriptionPeriod period = SubscriptionPeriod.MONTH; public static final String SERIALIZED_NAME_STARTS = "starts"; @SerializedName(SERIALIZED_NAME_STARTS) + @javax.annotation.Nullable private String starts; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull private TransactionStatus status = TransactionStatus.ACTIVE; public static final String SERIALIZED_NAME_STEAM_ITEM_ID = "steamItemId"; @SerializedName(SERIALIZED_NAME_STEAM_ITEM_ID) + @javax.annotation.Nullable private String steamItemId; public static final String SERIALIZED_NAME_STORE = "store"; @SerializedName(SERIALIZED_NAME_STORE) + @javax.annotation.Nonnull private String store; public static final String SERIALIZED_NAME_TIER = "tier"; @SerializedName(SERIALIZED_NAME_TIER) + @javax.annotation.Nonnull private Integer tier; public static final String SERIALIZED_NAME_TRANSACTION_ID = "transactionId"; @SerializedName(SERIALIZED_NAME_TRANSACTION_ID) + @javax.annotation.Nonnull private String transactionId; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public UserSubscription() { } - public UserSubscription active(Boolean active) { - + public UserSubscription active(@javax.annotation.Nonnull Boolean active) { this.active = active; return this; } - /** + /** * Get active * @return active - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getActive() { return active; } - - public void setActive(Boolean active) { + public void setActive(@javax.annotation.Nonnull Boolean active) { this.active = active; } - public UserSubscription amount(BigDecimal amount) { - + public UserSubscription amount(@javax.annotation.Nonnull BigDecimal amount) { this.amount = amount; return this; } - /** + /** * Get amount * @return amount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "9999", required = true, value = "") - public BigDecimal getAmount() { return amount; } - - public void setAmount(BigDecimal amount) { + public void setAmount(@javax.annotation.Nonnull BigDecimal amount) { this.amount = amount; } - public UserSubscription createdAt(OffsetDateTime createdAt) { - + public UserSubscription createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public UserSubscription description(String description) { - + public UserSubscription description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "VRChat Plus (Yearly)", required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public UserSubscription expires(OffsetDateTime expires) { - + public UserSubscription expires(@javax.annotation.Nonnull OffsetDateTime expires) { this.expires = expires; return this; } - /** + /** * Get expires * @return expires - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getExpires() { return expires; } - - public void setExpires(OffsetDateTime expires) { + public void setExpires(@javax.annotation.Nonnull OffsetDateTime expires) { this.expires = expires; } - public UserSubscription id(String id) { - + public UserSubscription id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * Get id * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "vrchatplus-yearly", required = true, value = "") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public UserSubscription isBulkGift(Boolean isBulkGift) { - + public UserSubscription isBulkGift(@javax.annotation.Nonnull Boolean isBulkGift) { this.isBulkGift = isBulkGift; return this; } - /** + /** * Get isBulkGift * @return isBulkGift - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsBulkGift() { return isBulkGift; } - - public void setIsBulkGift(Boolean isBulkGift) { + public void setIsBulkGift(@javax.annotation.Nonnull Boolean isBulkGift) { this.isBulkGift = isBulkGift; } - public UserSubscription isGift(Boolean isGift) { - + public UserSubscription isGift(@javax.annotation.Nonnull Boolean isGift) { this.isGift = isGift; return this; } - /** + /** * Get isGift * @return isGift - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getIsGift() { return isGift; } - - public void setIsGift(Boolean isGift) { + public void setIsGift(@javax.annotation.Nonnull Boolean isGift) { this.isGift = isGift; } - public UserSubscription licenseGroups(List licenseGroups) { - + public UserSubscription licenseGroups(@javax.annotation.Nonnull List licenseGroups) { this.licenseGroups = licenseGroups; return this; } public UserSubscription addLicenseGroupsItem(String licenseGroupsItem) { + if (this.licenseGroups == null) { + this.licenseGroups = new ArrayList<>(); + } this.licenseGroups.add(licenseGroupsItem); return this; } - /** + /** * Get licenseGroups * @return licenseGroups - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public List getLicenseGroups() { return licenseGroups; } - - public void setLicenseGroups(List licenseGroups) { + public void setLicenseGroups(@javax.annotation.Nonnull List licenseGroups) { this.licenseGroups = licenseGroups; } - public UserSubscription period(SubscriptionPeriod period) { - + public UserSubscription period(@javax.annotation.Nonnull SubscriptionPeriod period) { this.period = period; return this; } - /** + /** * Get period * @return period - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public SubscriptionPeriod getPeriod() { return period; } - - public void setPeriod(SubscriptionPeriod period) { + public void setPeriod(@javax.annotation.Nonnull SubscriptionPeriod period) { this.period = period; } - public UserSubscription starts(String starts) { - + public UserSubscription starts(@javax.annotation.Nullable String starts) { this.starts = starts; return this; } - /** + /** * Get starts * @return starts - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getStarts() { return starts; } - - public void setStarts(String starts) { + public void setStarts(@javax.annotation.Nullable String starts) { this.starts = starts; } - public UserSubscription status(TransactionStatus status) { - + public UserSubscription status(@javax.annotation.Nonnull TransactionStatus status) { this.status = status; return this; } - /** + /** * Get status * @return status - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public TransactionStatus getStatus() { return status; } - - public void setStatus(TransactionStatus status) { + public void setStatus(@javax.annotation.Nonnull TransactionStatus status) { this.status = status; } - public UserSubscription steamItemId(String steamItemId) { - + public UserSubscription steamItemId(@javax.annotation.Nullable String steamItemId) { this.steamItemId = steamItemId; return this; } - /** + /** * Get steamItemId * @return steamItemId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "5000", value = "") - public String getSteamItemId() { return steamItemId; } - - public void setSteamItemId(String steamItemId) { + public void setSteamItemId(@javax.annotation.Nullable String steamItemId) { this.steamItemId = steamItemId; } - public UserSubscription store(String store) { - + public UserSubscription store(@javax.annotation.Nonnull String store) { this.store = store; return this; } - /** + /** * Which \"Store\" it came from. Right now only Stores are \"Steam\" and \"Admin\". * @return store - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "Steam", required = true, value = "Which \"Store\" it came from. Right now only Stores are \"Steam\" and \"Admin\".") - public String getStore() { return store; } - - public void setStore(String store) { + public void setStore(@javax.annotation.Nonnull String store) { this.store = store; } - public UserSubscription tier(Integer tier) { - + public UserSubscription tier(@javax.annotation.Nonnull Integer tier) { this.tier = tier; return this; } - /** + /** * Get tier * @return tier - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "5", required = true, value = "") - public Integer getTier() { return tier; } - - public void setTier(Integer tier) { + public void setTier(@javax.annotation.Nonnull Integer tier) { this.tier = tier; } - public UserSubscription transactionId(String transactionId) { - + public UserSubscription transactionId(@javax.annotation.Nonnull String transactionId) { this.transactionId = transactionId; return this; } - /** + /** * Get transactionId * @return transactionId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "txn_e5c72948-e735-4880-8245-24b2a41198b0", required = true, value = "") - public String getTransactionId() { return transactionId; } - - public void setTransactionId(String transactionId) { + public void setTransactionId(@javax.annotation.Nonnull String transactionId) { this.transactionId = transactionId; } - public UserSubscription updatedAt(OffsetDateTime updatedAt) { - + public UserSubscription updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -587,10 +538,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -599,94 +547,67 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("active"); - openapiFields.add("amount"); - openapiFields.add("created_at"); - openapiFields.add("description"); - openapiFields.add("expires"); - openapiFields.add("id"); - openapiFields.add("isBulkGift"); - openapiFields.add("isGift"); - openapiFields.add("licenseGroups"); - openapiFields.add("period"); - openapiFields.add("starts"); - openapiFields.add("status"); - openapiFields.add("steamItemId"); - openapiFields.add("store"); - openapiFields.add("tier"); - openapiFields.add("transactionId"); - openapiFields.add("updated_at"); + openapiFields = new HashSet(Arrays.asList("active", "amount", "created_at", "description", "expires", "id", "isBulkGift", "isGift", "licenseGroups", "period", "starts", "status", "steamItemId", "store", "tier", "transactionId", "updated_at")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("active"); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("expires"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("isBulkGift"); - openapiRequiredFields.add("isGift"); - openapiRequiredFields.add("licenseGroups"); - openapiRequiredFields.add("period"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("store"); - openapiRequiredFields.add("tier"); - openapiRequiredFields.add("transactionId"); - openapiRequiredFields.add("updated_at"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UserSubscription - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UserSubscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserSubscription is not found in the empty JSON string", UserSubscription.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("active", "amount", "created_at", "description", "expires", "id", "isBulkGift", "isGift", "licenseGroups", "period", "status", "store", "tier", "transactionId", "updated_at")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserSubscription + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserSubscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UserSubscription is not found in the empty JSON string", UserSubscription.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UserSubscription.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserSubscription` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UserSubscription` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UserSubscription.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // ensure the required json array is present if (jsonObj.get("licenseGroups") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("licenseGroups").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `licenseGroups` to be an array in the JSON string but got `%s`", jsonObj.get("licenseGroups").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `licenseGroups` to be an array in the JSON string but got `%s`", jsonObj.get("licenseGroups").toString())); } + // validate the required field `period` + SubscriptionPeriod.validateJsonElement(jsonObj.get("period")); if ((jsonObj.get("starts") != null && !jsonObj.get("starts").isJsonNull()) && !jsonObj.get("starts").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `starts` to be a primitive type in the JSON string but got `%s`", jsonObj.get("starts").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `starts` to be a primitive type in the JSON string but got `%s`", jsonObj.get("starts").toString())); } + // validate the required field `status` + TransactionStatus.validateJsonElement(jsonObj.get("status")); if ((jsonObj.get("steamItemId") != null && !jsonObj.get("steamItemId").isJsonNull()) && !jsonObj.get("steamItemId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `steamItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamItemId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `steamItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamItemId").toString())); } if (!jsonObj.get("store").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `store` to be a primitive type in the JSON string but got `%s`", jsonObj.get("store").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `store` to be a primitive type in the JSON string but got `%s`", jsonObj.get("store").toString())); } if (!jsonObj.get("transactionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transactionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transactionId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `transactionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transactionId").toString())); } } @@ -710,31 +631,31 @@ public void write(JsonWriter out, UserSubscription value) throws IOException { @Override public UserSubscription read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UserSubscription given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserSubscription - * @throws IOException if the JSON string is invalid with respect to UserSubscription - */ + /** + * Create an instance of UserSubscription given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserSubscription + * @throws IOException if the JSON string is invalid with respect to UserSubscription + */ public static UserSubscription fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UserSubscription.class); } - /** - * Convert an instance of UserSubscription to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UserSubscription to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/UserSubscriptionEligible.java b/src/main/java/io/github/vrchatapi/model/UserSubscriptionEligible.java index 9184379a..45d0f31a 100644 --- a/src/main/java/io/github/vrchatapi/model/UserSubscriptionEligible.java +++ b/src/main/java/io/github/vrchatapi/model/UserSubscriptionEligible.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,169 +47,151 @@ /** * UserSubscriptionEligible */ -@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 UserSubscriptionEligible { public static final String SERIALIZED_NAME_ACTIVE_CANCELLED_SUBSCRIPTION = "activeCancelledSubscription"; @SerializedName(SERIALIZED_NAME_ACTIVE_CANCELLED_SUBSCRIPTION) + @javax.annotation.Nonnull private Boolean activeCancelledSubscription; public static final String SERIALIZED_NAME_GIFT_ELIGIBLE = "giftEligible"; @SerializedName(SERIALIZED_NAME_GIFT_ELIGIBLE) + @javax.annotation.Nonnull private Boolean giftEligible; public static final String SERIALIZED_NAME_NON_EXTEND_VENDOR_WILL_LOSE_GIFT_TIME = "nonExtendVendorWillLoseGiftTime"; @SerializedName(SERIALIZED_NAME_NON_EXTEND_VENDOR_WILL_LOSE_GIFT_TIME) + @javax.annotation.Nonnull private Boolean nonExtendVendorWillLoseGiftTime; public static final String SERIALIZED_NAME_PURCHASE_ELIGIBLE = "purchaseEligible"; @SerializedName(SERIALIZED_NAME_PURCHASE_ELIGIBLE) + @javax.annotation.Nonnull private Boolean purchaseEligible; public static final String SERIALIZED_NAME_SUBSCRIPTION_ELIGIBLE = "subscriptionEligible"; @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ELIGIBLE) + @javax.annotation.Nonnull private Boolean subscriptionEligible; public static final String SERIALIZED_NAME_SUBSCRIPTION_ON_ALT_ACCOUNT = "subscriptionOnAltAccount"; @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ON_ALT_ACCOUNT) + @javax.annotation.Nonnull private Boolean subscriptionOnAltAccount; public UserSubscriptionEligible() { } - public UserSubscriptionEligible activeCancelledSubscription(Boolean activeCancelledSubscription) { - + public UserSubscriptionEligible activeCancelledSubscription(@javax.annotation.Nonnull Boolean activeCancelledSubscription) { this.activeCancelledSubscription = activeCancelledSubscription; return this; } - /** + /** * Get activeCancelledSubscription * @return activeCancelledSubscription - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getActiveCancelledSubscription() { return activeCancelledSubscription; } - - public void setActiveCancelledSubscription(Boolean activeCancelledSubscription) { + public void setActiveCancelledSubscription(@javax.annotation.Nonnull Boolean activeCancelledSubscription) { this.activeCancelledSubscription = activeCancelledSubscription; } - public UserSubscriptionEligible giftEligible(Boolean giftEligible) { - + public UserSubscriptionEligible giftEligible(@javax.annotation.Nonnull Boolean giftEligible) { this.giftEligible = giftEligible; return this; } - /** + /** * Get giftEligible * @return giftEligible - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getGiftEligible() { return giftEligible; } - - public void setGiftEligible(Boolean giftEligible) { + public void setGiftEligible(@javax.annotation.Nonnull Boolean giftEligible) { this.giftEligible = giftEligible; } - public UserSubscriptionEligible nonExtendVendorWillLoseGiftTime(Boolean nonExtendVendorWillLoseGiftTime) { - + public UserSubscriptionEligible nonExtendVendorWillLoseGiftTime(@javax.annotation.Nonnull Boolean nonExtendVendorWillLoseGiftTime) { this.nonExtendVendorWillLoseGiftTime = nonExtendVendorWillLoseGiftTime; return this; } - /** + /** * Get nonExtendVendorWillLoseGiftTime * @return nonExtendVendorWillLoseGiftTime - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getNonExtendVendorWillLoseGiftTime() { return nonExtendVendorWillLoseGiftTime; } - - public void setNonExtendVendorWillLoseGiftTime(Boolean nonExtendVendorWillLoseGiftTime) { + public void setNonExtendVendorWillLoseGiftTime(@javax.annotation.Nonnull Boolean nonExtendVendorWillLoseGiftTime) { this.nonExtendVendorWillLoseGiftTime = nonExtendVendorWillLoseGiftTime; } - public UserSubscriptionEligible purchaseEligible(Boolean purchaseEligible) { - + public UserSubscriptionEligible purchaseEligible(@javax.annotation.Nonnull Boolean purchaseEligible) { this.purchaseEligible = purchaseEligible; return this; } - /** + /** * Get purchaseEligible * @return purchaseEligible - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getPurchaseEligible() { return purchaseEligible; } - - public void setPurchaseEligible(Boolean purchaseEligible) { + public void setPurchaseEligible(@javax.annotation.Nonnull Boolean purchaseEligible) { this.purchaseEligible = purchaseEligible; } - public UserSubscriptionEligible subscriptionEligible(Boolean subscriptionEligible) { - + public UserSubscriptionEligible subscriptionEligible(@javax.annotation.Nonnull Boolean subscriptionEligible) { this.subscriptionEligible = subscriptionEligible; return this; } - /** + /** * Get subscriptionEligible * @return subscriptionEligible - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getSubscriptionEligible() { return subscriptionEligible; } - - public void setSubscriptionEligible(Boolean subscriptionEligible) { + public void setSubscriptionEligible(@javax.annotation.Nonnull Boolean subscriptionEligible) { this.subscriptionEligible = subscriptionEligible; } - public UserSubscriptionEligible subscriptionOnAltAccount(Boolean subscriptionOnAltAccount) { - + public UserSubscriptionEligible subscriptionOnAltAccount(@javax.annotation.Nonnull Boolean subscriptionOnAltAccount) { this.subscriptionOnAltAccount = subscriptionOnAltAccount; return this; } - /** + /** * Get subscriptionOnAltAccount * @return subscriptionOnAltAccount - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getSubscriptionOnAltAccount() { return subscriptionOnAltAccount; } - - public void setSubscriptionOnAltAccount(Boolean subscriptionOnAltAccount) { + public void setSubscriptionOnAltAccount(@javax.annotation.Nonnull Boolean subscriptionOnAltAccount) { this.subscriptionOnAltAccount = subscriptionOnAltAccount; } @@ -256,10 +238,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -268,51 +247,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("activeCancelledSubscription"); - openapiFields.add("giftEligible"); - openapiFields.add("nonExtendVendorWillLoseGiftTime"); - openapiFields.add("purchaseEligible"); - openapiFields.add("subscriptionEligible"); - openapiFields.add("subscriptionOnAltAccount"); + openapiFields = new HashSet(Arrays.asList("activeCancelledSubscription", "giftEligible", "nonExtendVendorWillLoseGiftTime", "purchaseEligible", "subscriptionEligible", "subscriptionOnAltAccount")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("activeCancelledSubscription"); - openapiRequiredFields.add("giftEligible"); - openapiRequiredFields.add("nonExtendVendorWillLoseGiftTime"); - openapiRequiredFields.add("purchaseEligible"); - openapiRequiredFields.add("subscriptionEligible"); - openapiRequiredFields.add("subscriptionOnAltAccount"); + openapiRequiredFields = new HashSet(Arrays.asList("activeCancelledSubscription", "giftEligible", "nonExtendVendorWillLoseGiftTime", "purchaseEligible", "subscriptionEligible", "subscriptionOnAltAccount")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to UserSubscriptionEligible - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UserSubscriptionEligible.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserSubscriptionEligible is not found in the empty JSON string", UserSubscriptionEligible.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UserSubscriptionEligible + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UserSubscriptionEligible.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in UserSubscriptionEligible is not found in the empty JSON string", UserSubscriptionEligible.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!UserSubscriptionEligible.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserSubscriptionEligible` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `UserSubscriptionEligible` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UserSubscriptionEligible.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -335,31 +303,31 @@ public void write(JsonWriter out, UserSubscriptionEligible value) throws IOExcep @Override public UserSubscriptionEligible read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of UserSubscriptionEligible given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserSubscriptionEligible - * @throws IOException if the JSON string is invalid with respect to UserSubscriptionEligible - */ + /** + * Create an instance of UserSubscriptionEligible given an JSON string + * + * @param jsonString JSON string + * @return An instance of UserSubscriptionEligible + * @throws IOException if the JSON string is invalid with respect to UserSubscriptionEligible + */ public static UserSubscriptionEligible fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UserSubscriptionEligible.class); } - /** - * Convert an instance of UserSubscriptionEligible to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of UserSubscriptionEligible to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Verify2FAEmailCodeResult.java b/src/main/java/io/github/vrchatapi/model/Verify2FAEmailCodeResult.java index c505b236..16f22c13 100644 --- a/src/main/java/io/github/vrchatapi/model/Verify2FAEmailCodeResult.java +++ b/src/main/java/io/github/vrchatapi/model/Verify2FAEmailCodeResult.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * Verify2FAEmailCodeResult */ -@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 Verify2FAEmailCodeResult { public static final String SERIALIZED_NAME_VERIFIED = "verified"; @SerializedName(SERIALIZED_NAME_VERIFIED) + @javax.annotation.Nonnull private Boolean verified; public Verify2FAEmailCodeResult() { } - public Verify2FAEmailCodeResult verified(Boolean verified) { - + public Verify2FAEmailCodeResult verified(@javax.annotation.Nonnull Boolean verified) { this.verified = verified; return this; } - /** + /** * Get verified * @return verified - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getVerified() { return verified; } - - public void setVerified(Boolean verified) { + public void setVerified(@javax.annotation.Nonnull Boolean verified) { this.verified = verified; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("verified"); + openapiFields = new HashSet(Arrays.asList("verified")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("verified"); + openapiRequiredFields = new HashSet(Arrays.asList("verified")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Verify2FAEmailCodeResult - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Verify2FAEmailCodeResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Verify2FAEmailCodeResult is not found in the empty JSON string", Verify2FAEmailCodeResult.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Verify2FAEmailCodeResult + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Verify2FAEmailCodeResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Verify2FAEmailCodeResult is not found in the empty JSON string", Verify2FAEmailCodeResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Verify2FAEmailCodeResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Verify2FAEmailCodeResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Verify2FAEmailCodeResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Verify2FAEmailCodeResult.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -180,31 +173,31 @@ public void write(JsonWriter out, Verify2FAEmailCodeResult value) throws IOExcep @Override public Verify2FAEmailCodeResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Verify2FAEmailCodeResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of Verify2FAEmailCodeResult - * @throws IOException if the JSON string is invalid with respect to Verify2FAEmailCodeResult - */ + /** + * Create an instance of Verify2FAEmailCodeResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of Verify2FAEmailCodeResult + * @throws IOException if the JSON string is invalid with respect to Verify2FAEmailCodeResult + */ public static Verify2FAEmailCodeResult fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Verify2FAEmailCodeResult.class); } - /** - * Convert an instance of Verify2FAEmailCodeResult to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Verify2FAEmailCodeResult to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/Verify2FAResult.java b/src/main/java/io/github/vrchatapi/model/Verify2FAResult.java index 5a27ccbe..38b7dcaa 100644 --- a/src/main/java/io/github/vrchatapi/model/Verify2FAResult.java +++ b/src/main/java/io/github/vrchatapi/model/Verify2FAResult.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * Verify2FAResult */ -@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 Verify2FAResult { public static final String SERIALIZED_NAME_ENABLED = "enabled"; @SerializedName(SERIALIZED_NAME_ENABLED) + @javax.annotation.Nullable private Boolean enabled = true; public static final String SERIALIZED_NAME_VERIFIED = "verified"; @SerializedName(SERIALIZED_NAME_VERIFIED) + @javax.annotation.Nonnull private Boolean verified; public Verify2FAResult() { } - public Verify2FAResult enabled(Boolean enabled) { - + public Verify2FAResult enabled(@javax.annotation.Nullable Boolean enabled) { this.enabled = enabled; return this; } - /** + /** * Get enabled * @return enabled - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public Boolean getEnabled() { return enabled; } - - public void setEnabled(Boolean enabled) { + public void setEnabled(@javax.annotation.Nullable Boolean enabled) { this.enabled = enabled; } - public Verify2FAResult verified(Boolean verified) { - + public Verify2FAResult verified(@javax.annotation.Nonnull Boolean verified) { this.verified = verified; return this; } - /** + /** * Get verified * @return verified - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getVerified() { return verified; } - - public void setVerified(Boolean verified) { + public void setVerified(@javax.annotation.Nonnull Boolean verified) { this.verified = verified; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,42 +143,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("enabled"); - openapiFields.add("verified"); + openapiFields = new HashSet(Arrays.asList("enabled", "verified")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("verified"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Verify2FAResult - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Verify2FAResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Verify2FAResult is not found in the empty JSON string", Verify2FAResult.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("verified")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Verify2FAResult + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Verify2FAResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Verify2FAResult is not found in the empty JSON string", Verify2FAResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!Verify2FAResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Verify2FAResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Verify2FAResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Verify2FAResult.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -210,31 +199,31 @@ public void write(JsonWriter out, Verify2FAResult value) throws IOException { @Override public Verify2FAResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of Verify2FAResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of Verify2FAResult - * @throws IOException if the JSON string is invalid with respect to Verify2FAResult - */ + /** + * Create an instance of Verify2FAResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of Verify2FAResult + * @throws IOException if the JSON string is invalid with respect to Verify2FAResult + */ public static Verify2FAResult fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Verify2FAResult.class); } - /** - * Convert an instance of Verify2FAResult to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of Verify2FAResult to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/VerifyAuthTokenResult.java b/src/main/java/io/github/vrchatapi/model/VerifyAuthTokenResult.java index d1fe42f7..a4ace41c 100644 --- a/src/main/java/io/github/vrchatapi/model/VerifyAuthTokenResult.java +++ b/src/main/java/io/github/vrchatapi/model/VerifyAuthTokenResult.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * VerifyAuthTokenResult */ -@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 VerifyAuthTokenResult { public static final String SERIALIZED_NAME_OK = "ok"; @SerializedName(SERIALIZED_NAME_OK) + @javax.annotation.Nonnull private Boolean ok; public static final String SERIALIZED_NAME_TOKEN = "token"; @SerializedName(SERIALIZED_NAME_TOKEN) + @javax.annotation.Nonnull private String token; public VerifyAuthTokenResult() { } - public VerifyAuthTokenResult ok(Boolean ok) { - + public VerifyAuthTokenResult ok(@javax.annotation.Nonnull Boolean ok) { this.ok = ok; return this; } - /** + /** * Get ok * @return ok - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getOk() { return ok; } - - public void setOk(Boolean ok) { + public void setOk(@javax.annotation.Nonnull Boolean ok) { this.ok = ok; } - public VerifyAuthTokenResult token(String token) { - + public VerifyAuthTokenResult token(@javax.annotation.Nonnull String token) { this.token = token; return this; } - /** + /** * Get token * @return token - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getToken() { return token; } - - public void setToken(String token) { + public void setToken(@javax.annotation.Nonnull String token) { this.token = token; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,45 +143,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ok"); - openapiFields.add("token"); + openapiFields = new HashSet(Arrays.asList("ok", "token")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ok"); - openapiRequiredFields.add("token"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VerifyAuthTokenResult - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VerifyAuthTokenResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VerifyAuthTokenResult is not found in the empty JSON string", VerifyAuthTokenResult.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("ok", "token")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VerifyAuthTokenResult + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VerifyAuthTokenResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in VerifyAuthTokenResult is not found in the empty JSON string", VerifyAuthTokenResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!VerifyAuthTokenResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VerifyAuthTokenResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `VerifyAuthTokenResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VerifyAuthTokenResult.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); } } @@ -214,31 +202,31 @@ public void write(JsonWriter out, VerifyAuthTokenResult value) throws IOExceptio @Override public VerifyAuthTokenResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of VerifyAuthTokenResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of VerifyAuthTokenResult - * @throws IOException if the JSON string is invalid with respect to VerifyAuthTokenResult - */ + /** + * Create an instance of VerifyAuthTokenResult given an JSON string + * + * @param jsonString JSON string + * @return An instance of VerifyAuthTokenResult + * @throws IOException if the JSON string is invalid with respect to VerifyAuthTokenResult + */ public static VerifyAuthTokenResult fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, VerifyAuthTokenResult.class); } - /** - * Convert an instance of VerifyAuthTokenResult to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of VerifyAuthTokenResult to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/World.java b/src/main/java/io/github/vrchatapi/model/World.java index 07c8ab22..db0838f9 100644 --- a/src/main/java/io/github/vrchatapi/model/World.java +++ b/src/main/java/io/github/vrchatapi/model/World.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,6 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,11 +21,10 @@ import io.github.vrchatapi.model.InstanceContentSettings; import io.github.vrchatapi.model.ReleaseStatus; import io.github.vrchatapi.model.UnityPackage; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; @@ -40,13 +38,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -54,401 +54,388 @@ /** * */ -@ApiModel(description = "") -@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 World { public static final String SERIALIZED_NAME_AUTHOR_ID = "authorId"; @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nonnull private String authorId; public static final String SERIALIZED_NAME_AUTHOR_NAME = "authorName"; @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nonnull private String authorName; public static final String SERIALIZED_NAME_CAPACITY = "capacity"; @SerializedName(SERIALIZED_NAME_CAPACITY) + @javax.annotation.Nonnull private Integer capacity; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_DEFAULT_CONTENT_SETTINGS = "defaultContentSettings"; @SerializedName(SERIALIZED_NAME_DEFAULT_CONTENT_SETTINGS) + @javax.annotation.Nullable private InstanceContentSettings defaultContentSettings; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_FAVORITES = "favorites"; @SerializedName(SERIALIZED_NAME_FAVORITES) + @javax.annotation.Nullable private Integer favorites = 0; public static final String SERIALIZED_NAME_FEATURED = "featured"; @SerializedName(SERIALIZED_NAME_FEATURED) + @javax.annotation.Nonnull private Boolean featured = false; public static final String SERIALIZED_NAME_HEAT = "heat"; @SerializedName(SERIALIZED_NAME_HEAT) + @javax.annotation.Nonnull private Integer heat = 0; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_IMAGE_URL = "imageUrl"; @SerializedName(SERIALIZED_NAME_IMAGE_URL) + @javax.annotation.Nonnull private String imageUrl; public static final String SERIALIZED_NAME_INSTANCES = "instances"; @SerializedName(SERIALIZED_NAME_INSTANCES) - private List> instances = null; + @javax.annotation.Nullable + private List> instances = new ArrayList<>(); public static final String SERIALIZED_NAME_LABS_PUBLICATION_DATE = "labsPublicationDate"; @SerializedName(SERIALIZED_NAME_LABS_PUBLICATION_DATE) + @javax.annotation.Nonnull private String labsPublicationDate; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) + @javax.annotation.Nullable private String namespace; public static final String SERIALIZED_NAME_OCCUPANTS = "occupants"; @SerializedName(SERIALIZED_NAME_OCCUPANTS) + @javax.annotation.Nullable private Integer occupants = 0; public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; @SerializedName(SERIALIZED_NAME_ORGANIZATION) + @javax.annotation.Nonnull private String organization = "vrchat"; public static final String SERIALIZED_NAME_POPULARITY = "popularity"; @SerializedName(SERIALIZED_NAME_POPULARITY) + @javax.annotation.Nonnull private Integer popularity = 0; public static final String SERIALIZED_NAME_PREVIEW_YOUTUBE_ID = "previewYoutubeId"; @SerializedName(SERIALIZED_NAME_PREVIEW_YOUTUBE_ID) + @javax.annotation.Nullable private String previewYoutubeId; public static final String SERIALIZED_NAME_PRIVATE_OCCUPANTS = "privateOccupants"; @SerializedName(SERIALIZED_NAME_PRIVATE_OCCUPANTS) + @javax.annotation.Nullable private Integer privateOccupants = 0; public static final String SERIALIZED_NAME_PUBLIC_OCCUPANTS = "publicOccupants"; @SerializedName(SERIALIZED_NAME_PUBLIC_OCCUPANTS) + @javax.annotation.Nullable private Integer publicOccupants = 0; public static final String SERIALIZED_NAME_PUBLICATION_DATE = "publicationDate"; @SerializedName(SERIALIZED_NAME_PUBLICATION_DATE) + @javax.annotation.Nonnull private String publicationDate; public static final String SERIALIZED_NAME_RECOMMENDED_CAPACITY = "recommendedCapacity"; @SerializedName(SERIALIZED_NAME_RECOMMENDED_CAPACITY) + @javax.annotation.Nonnull private Integer recommendedCapacity; public static final String SERIALIZED_NAME_RELEASE_STATUS = "releaseStatus"; @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) + @javax.annotation.Nonnull private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; public static final String SERIALIZED_NAME_STORE_ID = "storeId"; @SerializedName(SERIALIZED_NAME_STORE_ID) + @javax.annotation.Nullable private String storeId; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull private List tags = new ArrayList<>(); public static final String SERIALIZED_NAME_THUMBNAIL_IMAGE_URL = "thumbnailImageUrl"; @SerializedName(SERIALIZED_NAME_THUMBNAIL_IMAGE_URL) + @javax.annotation.Nonnull private String thumbnailImageUrl; public static final String SERIALIZED_NAME_UDON_PRODUCTS = "udonProducts"; @SerializedName(SERIALIZED_NAME_UDON_PRODUCTS) - private List udonProducts = null; + @javax.annotation.Nullable + private List udonProducts = new ArrayList<>(); public static final String SERIALIZED_NAME_UNITY_PACKAGES = "unityPackages"; @SerializedName(SERIALIZED_NAME_UNITY_PACKAGES) - private List unityPackages = null; + @javax.annotation.Nullable + private List unityPackages = new ArrayList<>(); public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_URL_LIST = "urlList"; @SerializedName(SERIALIZED_NAME_URL_LIST) - private List urlList = null; + @javax.annotation.Nullable + private List urlList = new ArrayList<>(); public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nonnull private Integer version = 0; public static final String SERIALIZED_NAME_VISITS = "visits"; @SerializedName(SERIALIZED_NAME_VISITS) + @javax.annotation.Nonnull private Integer visits = 0; public World() { } - public World authorId(String authorId) { - + public World authorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; return this; } - /** + /** * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. * @return authorId - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469", required = true, value = "A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.") - public String getAuthorId() { return authorId; } - - public void setAuthorId(String authorId) { + public void setAuthorId(@javax.annotation.Nonnull String authorId) { this.authorId = authorId; } - public World authorName(String authorName) { - + public World authorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; return this; } - /** + /** * Get authorName * @return authorName - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getAuthorName() { return authorName; } - - public void setAuthorName(String authorName) { + public void setAuthorName(@javax.annotation.Nonnull String authorName) { this.authorName = authorName; } - public World capacity(Integer capacity) { - + public World capacity(@javax.annotation.Nonnull Integer capacity) { this.capacity = capacity; return this; } - /** + /** * Get capacity * @return capacity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "8", required = true, value = "") - public Integer getCapacity() { return capacity; } - - public void setCapacity(Integer capacity) { + public void setCapacity(@javax.annotation.Nonnull Integer capacity) { this.capacity = capacity; } - public World createdAt(OffsetDateTime createdAt) { - + public World createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } - /** + /** * Get createdAt * @return createdAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getCreatedAt() { return createdAt; } - - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; } - public World defaultContentSettings(InstanceContentSettings defaultContentSettings) { - + public World defaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { this.defaultContentSettings = defaultContentSettings; return this; } - /** + /** * Get defaultContentSettings * @return defaultContentSettings - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public InstanceContentSettings getDefaultContentSettings() { return defaultContentSettings; } - - public void setDefaultContentSettings(InstanceContentSettings defaultContentSettings) { + public void setDefaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { this.defaultContentSettings = defaultContentSettings; } - public World description(String description) { - + public World description(@javax.annotation.Nonnull String description) { this.description = description; return this; } - /** + /** * Get description * @return description - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getDescription() { return description; } - - public void setDescription(String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public World favorites(Integer favorites) { - + public World favorites(@javax.annotation.Nullable Integer favorites) { this.favorites = favorites; return this; } - /** + /** * Get favorites * minimum: 0 * @return favorites - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "12024", value = "") - public Integer getFavorites() { return favorites; } - - public void setFavorites(Integer favorites) { + public void setFavorites(@javax.annotation.Nullable Integer favorites) { this.favorites = favorites; } - public World featured(Boolean featured) { - + public World featured(@javax.annotation.Nonnull Boolean featured) { this.featured = featured; return this; } - /** + /** * Get featured * @return featured - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getFeatured() { return featured; } - - public void setFeatured(Boolean featured) { + public void setFeatured(@javax.annotation.Nonnull Boolean featured) { this.featured = featured; } - public World heat(Integer heat) { - + public World heat(@javax.annotation.Nonnull Integer heat) { this.heat = heat; return this; } - /** + /** * Get heat * minimum: 0 * @return heat - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "5", required = true, value = "") - public Integer getHeat() { return heat; } - - public void setHeat(Integer heat) { + public void setHeat(@javax.annotation.Nonnull Integer heat) { this.heat = heat; } - public World id(String id) { - + public World id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public World imageUrl(String imageUrl) { - + public World imageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; return this; } - /** + /** * Get imageUrl * @return imageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getImageUrl() { return imageUrl; } - - public void setImageUrl(String imageUrl) { + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { this.imageUrl = imageUrl; } - public World instances(List> instances) { - + public World instances(@javax.annotation.Nullable List> instances) { this.instances = instances; return this; } @@ -461,379 +448,318 @@ public World addInstancesItem(List instancesItem) { return this; } - /** + /** * Will always be an empty list when unauthenticated. * @return instances - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Will always be an empty list when unauthenticated.") - public List> getInstances() { return instances; } - - public void setInstances(List> instances) { + public void setInstances(@javax.annotation.Nullable List> instances) { this.instances = instances; } - public World labsPublicationDate(String labsPublicationDate) { - + public World labsPublicationDate(@javax.annotation.Nonnull String labsPublicationDate) { this.labsPublicationDate = labsPublicationDate; return this; } - /** + /** * Get labsPublicationDate * @return labsPublicationDate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "none", required = true, value = "") - public String getLabsPublicationDate() { return labsPublicationDate; } - - public void setLabsPublicationDate(String labsPublicationDate) { + public void setLabsPublicationDate(@javax.annotation.Nonnull String labsPublicationDate) { this.labsPublicationDate = labsPublicationDate; } - public World name(String name) { - + public World name(@javax.annotation.Nonnull String name) { this.name = name; return this; } - /** + /** * Get name * @return name - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getName() { return name; } - - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public World namespace(String namespace) { - + public World namespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; return this; } - /** + /** * Get namespace * @return namespace - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getNamespace() { return namespace; } - - public void setNamespace(String namespace) { + public void setNamespace(@javax.annotation.Nullable String namespace) { this.namespace = namespace; } - public World occupants(Integer occupants) { - + public World occupants(@javax.annotation.Nullable Integer occupants) { this.occupants = occupants; return this; } - /** + /** * Will always be `0` when unauthenticated. * minimum: 0 * @return occupants - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "47", value = "Will always be `0` when unauthenticated.") - public Integer getOccupants() { return occupants; } - - public void setOccupants(Integer occupants) { + public void setOccupants(@javax.annotation.Nullable Integer occupants) { this.occupants = occupants; } - public World organization(String organization) { - + public World organization(@javax.annotation.Nonnull String organization) { this.organization = organization; return this; } - /** + /** * Get organization * @return organization - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getOrganization() { return organization; } - - public void setOrganization(String organization) { + public void setOrganization(@javax.annotation.Nonnull String organization) { this.organization = organization; } - public World popularity(Integer popularity) { - + public World popularity(@javax.annotation.Nonnull Integer popularity) { this.popularity = popularity; return this; } - /** + /** * Get popularity * minimum: 0 * @return popularity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "8", required = true, value = "") - public Integer getPopularity() { return popularity; } - - public void setPopularity(Integer popularity) { + public void setPopularity(@javax.annotation.Nonnull Integer popularity) { this.popularity = popularity; } - public World previewYoutubeId(String previewYoutubeId) { - + public World previewYoutubeId(@javax.annotation.Nullable String previewYoutubeId) { this.previewYoutubeId = previewYoutubeId; return this; } - /** + /** * Get previewYoutubeId * @return previewYoutubeId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getPreviewYoutubeId() { return previewYoutubeId; } - - public void setPreviewYoutubeId(String previewYoutubeId) { + public void setPreviewYoutubeId(@javax.annotation.Nullable String previewYoutubeId) { this.previewYoutubeId = previewYoutubeId; } - public World privateOccupants(Integer privateOccupants) { - + public World privateOccupants(@javax.annotation.Nullable Integer privateOccupants) { this.privateOccupants = privateOccupants; return this; } - /** + /** * Will always be `0` when unauthenticated. * minimum: 0 * @return privateOccupants - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1", value = "Will always be `0` when unauthenticated.") - public Integer getPrivateOccupants() { return privateOccupants; } - - public void setPrivateOccupants(Integer privateOccupants) { + public void setPrivateOccupants(@javax.annotation.Nullable Integer privateOccupants) { this.privateOccupants = privateOccupants; } - public World publicOccupants(Integer publicOccupants) { - + public World publicOccupants(@javax.annotation.Nullable Integer publicOccupants) { this.publicOccupants = publicOccupants; return this; } - /** + /** * Will always be `0` when unauthenticated. * minimum: 0 * @return publicOccupants - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "46", value = "Will always be `0` when unauthenticated.") - public Integer getPublicOccupants() { return publicOccupants; } - - public void setPublicOccupants(Integer publicOccupants) { + public void setPublicOccupants(@javax.annotation.Nullable Integer publicOccupants) { this.publicOccupants = publicOccupants; } - public World publicationDate(String publicationDate) { - + public World publicationDate(@javax.annotation.Nonnull String publicationDate) { this.publicationDate = publicationDate; return this; } - /** + /** * Get publicationDate * @return publicationDate - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "none", required = true, value = "") - public String getPublicationDate() { return publicationDate; } - - public void setPublicationDate(String publicationDate) { + public void setPublicationDate(@javax.annotation.Nonnull String publicationDate) { this.publicationDate = publicationDate; } - public World recommendedCapacity(Integer recommendedCapacity) { - + public World recommendedCapacity(@javax.annotation.Nonnull Integer recommendedCapacity) { this.recommendedCapacity = recommendedCapacity; return this; } - /** + /** * Get recommendedCapacity * @return recommendedCapacity - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "4", required = true, value = "") - public Integer getRecommendedCapacity() { return recommendedCapacity; } - - public void setRecommendedCapacity(Integer recommendedCapacity) { + public void setRecommendedCapacity(@javax.annotation.Nonnull Integer recommendedCapacity) { this.recommendedCapacity = recommendedCapacity; } - public World releaseStatus(ReleaseStatus releaseStatus) { - + public World releaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; return this; } - /** + /** * Get releaseStatus * @return releaseStatus - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public ReleaseStatus getReleaseStatus() { return releaseStatus; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { + public void setReleaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { this.releaseStatus = releaseStatus; } - public World storeId(String storeId) { - + public World storeId(@javax.annotation.Nullable String storeId) { this.storeId = storeId; return this; } - /** + /** * Get storeId * @return storeId - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "esto_713b247d-2b5d-41a0-bba3-50db28dc1498", value = "") - public String getStoreId() { return storeId; } - - public void setStoreId(String storeId) { + public void setStoreId(@javax.annotation.Nullable String storeId) { this.storeId = storeId; } - public World tags(List tags) { - + public World tags(@javax.annotation.Nonnull List tags) { this.tags = tags; return this; } public World addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } this.tags.add(tagsItem); return this; } - /** + /** * * @return tags - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = " ") - public List getTags() { return tags; } - - public void setTags(List tags) { + public void setTags(@javax.annotation.Nonnull List tags) { this.tags = tags; } - public World thumbnailImageUrl(String thumbnailImageUrl) { - + public World thumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; return this; } - /** + /** * Get thumbnailImageUrl * @return thumbnailImageUrl - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public String getThumbnailImageUrl() { return thumbnailImageUrl; } - - public void setThumbnailImageUrl(String thumbnailImageUrl) { + public void setThumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { this.thumbnailImageUrl = thumbnailImageUrl; } - public World udonProducts(List udonProducts) { - + public World udonProducts(@javax.annotation.Nullable List udonProducts) { this.udonProducts = udonProducts; return this; } @@ -846,25 +772,21 @@ public World addUdonProductsItem(String udonProductsItem) { return this; } - /** + /** * Get udonProducts * @return udonProducts - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getUdonProducts() { return udonProducts; } - - public void setUdonProducts(List udonProducts) { + public void setUdonProducts(@javax.annotation.Nullable List udonProducts) { this.udonProducts = udonProducts; } - public World unityPackages(List unityPackages) { - + public World unityPackages(@javax.annotation.Nullable List unityPackages) { this.unityPackages = unityPackages; return this; } @@ -877,48 +799,40 @@ public World addUnityPackagesItem(UnityPackage unityPackagesItem) { return this; } - /** + /** * Empty if unauthenticated. * @return unityPackages - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Empty if unauthenticated.") - public List getUnityPackages() { return unityPackages; } - - public void setUnityPackages(List unityPackages) { + public void setUnityPackages(@javax.annotation.Nullable List unityPackages) { this.unityPackages = unityPackages; } - public World updatedAt(OffsetDateTime updatedAt) { - + public World updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } - /** + /** * Get updatedAt * @return updatedAt - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public OffsetDateTime getUpdatedAt() { return updatedAt; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } - public World urlList(List urlList) { - + public World urlList(@javax.annotation.Nullable List urlList) { this.urlList = urlList; return this; } @@ -931,67 +845,56 @@ public World addUrlListItem(String urlListItem) { return this; } - /** + /** * Get urlList * @return urlList - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public List getUrlList() { return urlList; } - - public void setUrlList(List urlList) { + public void setUrlList(@javax.annotation.Nullable List urlList) { this.urlList = urlList; } - public World version(Integer version) { - + public World version(@javax.annotation.Nonnull Integer version) { this.version = version; return this; } - /** + /** * Get version * minimum: 0 * @return version - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "68", required = true, value = "") - public Integer getVersion() { return version; } - - public void setVersion(Integer version) { + public void setVersion(@javax.annotation.Nonnull Integer version) { this.version = version; } - public World visits(Integer visits) { - + public World visits(@javax.annotation.Nonnull Integer visits) { this.visits = visits; return this; } - /** + /** * Get visits * minimum: 0 * @return visits - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "9988675", required = true, value = "") - public Integer getVisits() { return visits; } - - public void setVisits(Integer visits) { + public void setVisits(@javax.annotation.Nonnull Integer visits) { this.visits = visits; } @@ -1103,10 +1006,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -1115,167 +1015,116 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("authorId"); - openapiFields.add("authorName"); - openapiFields.add("capacity"); - openapiFields.add("created_at"); - openapiFields.add("defaultContentSettings"); - openapiFields.add("description"); - openapiFields.add("favorites"); - openapiFields.add("featured"); - openapiFields.add("heat"); - openapiFields.add("id"); - openapiFields.add("imageUrl"); - openapiFields.add("instances"); - openapiFields.add("labsPublicationDate"); - openapiFields.add("name"); - openapiFields.add("namespace"); - openapiFields.add("occupants"); - openapiFields.add("organization"); - openapiFields.add("popularity"); - openapiFields.add("previewYoutubeId"); - openapiFields.add("privateOccupants"); - openapiFields.add("publicOccupants"); - openapiFields.add("publicationDate"); - openapiFields.add("recommendedCapacity"); - openapiFields.add("releaseStatus"); - openapiFields.add("storeId"); - openapiFields.add("tags"); - openapiFields.add("thumbnailImageUrl"); - openapiFields.add("udonProducts"); - openapiFields.add("unityPackages"); - openapiFields.add("updated_at"); - openapiFields.add("urlList"); - openapiFields.add("version"); - openapiFields.add("visits"); + openapiFields = new HashSet(Arrays.asList("authorId", "authorName", "capacity", "created_at", "defaultContentSettings", "description", "favorites", "featured", "heat", "id", "imageUrl", "instances", "labsPublicationDate", "name", "namespace", "occupants", "organization", "popularity", "previewYoutubeId", "privateOccupants", "publicOccupants", "publicationDate", "recommendedCapacity", "releaseStatus", "storeId", "tags", "thumbnailImageUrl", "udonProducts", "unityPackages", "updated_at", "urlList", "version", "visits")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("authorId"); - openapiRequiredFields.add("authorName"); - openapiRequiredFields.add("capacity"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("featured"); - openapiRequiredFields.add("heat"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("imageUrl"); - openapiRequiredFields.add("labsPublicationDate"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("organization"); - openapiRequiredFields.add("popularity"); - openapiRequiredFields.add("publicationDate"); - openapiRequiredFields.add("recommendedCapacity"); - openapiRequiredFields.add("releaseStatus"); - openapiRequiredFields.add("tags"); - openapiRequiredFields.add("thumbnailImageUrl"); - openapiRequiredFields.add("updated_at"); - openapiRequiredFields.add("version"); - openapiRequiredFields.add("visits"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to World - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!World.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in World is not found in the empty JSON string", World.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("authorId", "authorName", "capacity", "created_at", "description", "featured", "heat", "id", "imageUrl", "labsPublicationDate", "name", "organization", "popularity", "publicationDate", "recommendedCapacity", "releaseStatus", "tags", "thumbnailImageUrl", "updated_at", "version", "visits")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to World + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!World.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in World is not found in the empty JSON string", World.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!World.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `World` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `World` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : World.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("authorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorId").toString())); } if (!jsonObj.get("authorName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `authorName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorName").toString())); } // validate the optional field `defaultContentSettings` if (jsonObj.get("defaultContentSettings") != null && !jsonObj.get("defaultContentSettings").isJsonNull()) { - InstanceContentSettings.validateJsonObject(jsonObj.getAsJsonObject("defaultContentSettings")); + InstanceContentSettings.validateJsonElement(jsonObj.get("defaultContentSettings")); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("imageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `imageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageUrl").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("instances") != null && !jsonObj.get("instances").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `instances` to be an array in the JSON string but got `%s`", jsonObj.get("instances").toString())); + if (jsonObj.get("instances") != null && !jsonObj.get("instances").isJsonNull() && !jsonObj.get("instances").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `instances` to be an array in the JSON string but got `%s`", jsonObj.get("instances").toString())); } if (!jsonObj.get("labsPublicationDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `labsPublicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("labsPublicationDate").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `labsPublicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("labsPublicationDate").toString())); } if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); } if (!jsonObj.get("organization").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `organization` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `organization` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization").toString())); } if ((jsonObj.get("previewYoutubeId") != null && !jsonObj.get("previewYoutubeId").isJsonNull()) && !jsonObj.get("previewYoutubeId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `previewYoutubeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previewYoutubeId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `previewYoutubeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previewYoutubeId").toString())); } if (!jsonObj.get("publicationDate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `publicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publicationDate").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `publicationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publicationDate").toString())); } + // validate the required field `releaseStatus` + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); if ((jsonObj.get("storeId") != null && !jsonObj.get("storeId").isJsonNull()) && !jsonObj.get("storeId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `storeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storeId").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `storeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storeId").toString())); } // ensure the required json array is present if (jsonObj.get("tags") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } if (!jsonObj.get("thumbnailImageUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `thumbnailImageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailImageUrl").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("udonProducts") != null && !jsonObj.get("udonProducts").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `udonProducts` to be an array in the JSON string but got `%s`", jsonObj.get("udonProducts").toString())); + if (jsonObj.get("udonProducts") != null && !jsonObj.get("udonProducts").isJsonNull() && !jsonObj.get("udonProducts").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `udonProducts` to be an array in the JSON string but got `%s`", jsonObj.get("udonProducts").toString())); } if (jsonObj.get("unityPackages") != null && !jsonObj.get("unityPackages").isJsonNull()) { JsonArray jsonArrayunityPackages = jsonObj.getAsJsonArray("unityPackages"); if (jsonArrayunityPackages != null) { // ensure the json data is an array if (!jsonObj.get("unityPackages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `unityPackages` to be an array in the JSON string but got `%s`", jsonObj.get("unityPackages").toString())); } // validate the optional field `unityPackages` (array) for (int i = 0; i < jsonArrayunityPackages.size(); i++) { - UnityPackage.validateJsonObject(jsonArrayunityPackages.get(i).getAsJsonObject()); + UnityPackage.validateJsonElement(jsonArrayunityPackages.get(i)); }; } } // ensure the optional json data is an array if present - if (jsonObj.get("urlList") != null && !jsonObj.get("urlList").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `urlList` to be an array in the JSON string but got `%s`", jsonObj.get("urlList").toString())); + if (jsonObj.get("urlList") != null && !jsonObj.get("urlList").isJsonNull() && !jsonObj.get("urlList").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `urlList` to be an array in the JSON string but got `%s`", jsonObj.get("urlList").toString())); } } @@ -1299,31 +1148,31 @@ public void write(JsonWriter out, World value) throws IOException { @Override public World read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of World given an JSON string - * - * @param jsonString JSON string - * @return An instance of World - * @throws IOException if the JSON string is invalid with respect to World - */ + /** + * Create an instance of World given an JSON string + * + * @param jsonString JSON string + * @return An instance of World + * @throws IOException if the JSON string is invalid with respect to World + */ public static World fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, World.class); } - /** - * Convert an instance of World to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of World to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/WorldMetadata.java b/src/main/java/io/github/vrchatapi/model/WorldMetadata.java index 5859953f..9ebc6eef 100644 --- a/src/main/java/io/github/vrchatapi/model/WorldMetadata.java +++ b/src/main/java/io/github/vrchatapi/model/WorldMetadata.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,61 +47,55 @@ /** * WorldMetadata */ -@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 WorldMetadata { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull private String id; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull private Object metadata; public WorldMetadata() { } - public WorldMetadata id(String id) { - + public WorldMetadata id(@javax.annotation.Nonnull String id) { this.id = id; return this; } - /** + /** * WorldID be \"offline\" on User profiles if you are not friends with that user. * @return id - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getId() { return id; } - - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public WorldMetadata metadata(Object metadata) { - + public WorldMetadata metadata(@javax.annotation.Nonnull Object metadata) { this.metadata = metadata; return this; } - /** + /** * Get metadata * @return metadata - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Object getMetadata() { return metadata; } - - public void setMetadata(Object metadata) { + public void setMetadata(@javax.annotation.Nonnull Object metadata) { this.metadata = metadata; } @@ -140,10 +134,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -152,45 +143,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("metadata"); + openapiFields = new HashSet(Arrays.asList("id", "metadata")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("metadata"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to WorldMetadata - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!WorldMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WorldMetadata is not found in the empty JSON string", WorldMetadata.openapiRequiredFields.toString())); + openapiRequiredFields = new HashSet(Arrays.asList("id", "metadata")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WorldMetadata + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WorldMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in WorldMetadata is not found in the empty JSON string", WorldMetadata.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!WorldMetadata.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WorldMetadata` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `WorldMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WorldMetadata.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } @@ -214,31 +202,31 @@ public void write(JsonWriter out, WorldMetadata value) throws IOException { @Override public WorldMetadata read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of WorldMetadata given an JSON string - * - * @param jsonString JSON string - * @return An instance of WorldMetadata - * @throws IOException if the JSON string is invalid with respect to WorldMetadata - */ + /** + * Create an instance of WorldMetadata given an JSON string + * + * @param jsonString JSON string + * @return An instance of WorldMetadata + * @throws IOException if the JSON string is invalid with respect to WorldMetadata + */ public static WorldMetadata fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, WorldMetadata.class); } - /** - * Convert an instance of WorldMetadata to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of WorldMetadata to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } diff --git a/src/main/java/io/github/vrchatapi/model/WorldPublishStatus.java b/src/main/java/io/github/vrchatapi/model/WorldPublishStatus.java index 9e2fa8d9..0fc74ebf 100644 --- a/src/main/java/io/github/vrchatapi/model/WorldPublishStatus.java +++ b/src/main/java/io/github/vrchatapi/model/WorldPublishStatus.java @@ -1,7 +1,7 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.20.7 + * The version of the OpenAPI document: 1.20.8-nightly.20 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,15 +13,13 @@ package io.github.vrchatapi.model; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,13 +31,15 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; -import java.lang.reflect.Type; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.github.vrchatapi.JSON; @@ -47,34 +47,31 @@ /** * WorldPublishStatus */ -@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 WorldPublishStatus { public static final String SERIALIZED_NAME_CAN_PUBLISH = "canPublish"; @SerializedName(SERIALIZED_NAME_CAN_PUBLISH) + @javax.annotation.Nonnull private Boolean canPublish = true; public WorldPublishStatus() { } - public WorldPublishStatus canPublish(Boolean canPublish) { - + public WorldPublishStatus canPublish(@javax.annotation.Nonnull Boolean canPublish) { this.canPublish = canPublish; return this; } - /** + /** * Get canPublish * @return canPublish - **/ + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getCanPublish() { return canPublish; } - - public void setCanPublish(Boolean canPublish) { + public void setCanPublish(@javax.annotation.Nonnull Boolean canPublish) { this.canPublish = canPublish; } @@ -111,10 +108,7 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } @@ -123,41 +117,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("canPublish"); + openapiFields = new HashSet(Arrays.asList("canPublish")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("canPublish"); + openapiRequiredFields = new HashSet(Arrays.asList("canPublish")); } - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to WorldPublishStatus - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!WorldPublishStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WorldPublishStatus is not found in the empty JSON string", WorldPublishStatus.openapiRequiredFields.toString())); + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WorldPublishStatus + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WorldPublishStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in WorldPublishStatus is not found in the empty JSON string", WorldPublishStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!WorldPublishStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WorldPublishStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `WorldPublishStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WorldPublishStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -180,31 +173,31 @@ public void write(JsonWriter out, WorldPublishStatus value) throws IOException { @Override public WorldPublishStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } - /** - * Create an instance of WorldPublishStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of WorldPublishStatus - * @throws IOException if the JSON string is invalid with respect to WorldPublishStatus - */ + /** + * Create an instance of WorldPublishStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of WorldPublishStatus + * @throws IOException if the JSON string is invalid with respect to WorldPublishStatus + */ public static WorldPublishStatus fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, WorldPublishStatus.class); } - /** - * Convert an instance of WorldPublishStatus to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of WorldPublishStatus to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); }